Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
zram_drv.h File Reference
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include "../zsmalloc/zsmalloc.h"

Go to the source code of this file.

Data Structures

struct  table
 
struct  zram_stats
 
struct  zram
 

Macros

#define SECTOR_SHIFT   9
 
#define SECTOR_SIZE   (1 << SECTOR_SHIFT)
 
#define SECTORS_PER_PAGE_SHIFT   (PAGE_SHIFT - SECTOR_SHIFT)
 
#define SECTORS_PER_PAGE   (1 << SECTORS_PER_PAGE_SHIFT)
 
#define ZRAM_LOGICAL_BLOCK_SHIFT   12
 
#define ZRAM_LOGICAL_BLOCK_SIZE   (1 << ZRAM_LOGICAL_BLOCK_SHIFT)
 
#define ZRAM_SECTOR_PER_LOGICAL_BLOCK   (1 << (ZRAM_LOGICAL_BLOCK_SHIFT - SECTOR_SHIFT))
 

Enumerations

enum  zram_pageflags { ZRAM_ZERO, __NR_ZRAM_PAGEFLAGS }
 

Functions

struct table __aligned (4)
 
unsigned int zram_get_num_devices (void)
 
int zram_init_device (struct zram *zram)
 
void __zram_reset_device (struct zram *zram)
 

Variables

unsigned long handle
 
u16 size
 
u8 count
 
u8 flags
 
struct zram_stats __aligned
 
struct zramzram_devices
 

Macro Definition Documentation

#define SECTOR_SHIFT   9

Definition at line 48 of file zram_drv.h.

#define SECTOR_SIZE   (1 << SECTOR_SHIFT)

Definition at line 49 of file zram_drv.h.

#define SECTORS_PER_PAGE   (1 << SECTORS_PER_PAGE_SHIFT)

Definition at line 51 of file zram_drv.h.

#define SECTORS_PER_PAGE_SHIFT   (PAGE_SHIFT - SECTOR_SHIFT)

Definition at line 50 of file zram_drv.h.

#define ZRAM_LOGICAL_BLOCK_SHIFT   12

Definition at line 52 of file zram_drv.h.

#define ZRAM_LOGICAL_BLOCK_SIZE   (1 << ZRAM_LOGICAL_BLOCK_SHIFT)

Definition at line 53 of file zram_drv.h.

#define ZRAM_SECTOR_PER_LOGICAL_BLOCK   (1 << (ZRAM_LOGICAL_BLOCK_SHIFT - SECTOR_SHIFT))

Definition at line 54 of file zram_drv.h.

Enumeration Type Documentation

Enumerator:
ZRAM_ZERO 
__NR_ZRAM_PAGEFLAGS 

Definition at line 58 of file zram_drv.h.

Function Documentation

struct table __aligned ( )
void __zram_reset_device ( struct zram zram)

Definition at line 513 of file zram_drv.c.

unsigned int zram_get_num_devices ( void  )

Definition at line 712 of file zram_drv.c.

int zram_init_device ( struct zram zram)

Definition at line 554 of file zram_drv.c.

Variable Documentation

struct zram_stats __aligned
u8 count

Definition at line 76 of file zram_drv.h.

u8 flags

Definition at line 77 of file zram_drv.h.

unsigned long handle

Definition at line 74 of file zram_drv.h.

u16 size

Definition at line 75 of file zram_drv.h.

struct zram* zram_devices

Definition at line 40 of file zram_drv.c.