Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
brd.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/major.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/highmem.h>
#include <linux/mutex.h>
#include <linux/radix-tree.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  brd_device
 

Macros

#define SECTOR_SHIFT   9
 
#define PAGE_SECTORS_SHIFT   (PAGE_SHIFT - SECTOR_SHIFT)
 
#define PAGE_SECTORS   (1 << PAGE_SECTORS_SHIFT)
 
#define FREE_BATCH   16
 

Functions

 module_param (rd_nr, int, S_IRUGO)
 
 MODULE_PARM_DESC (rd_nr,"Maximum number of brd devices")
 
 module_param (rd_size, int, S_IRUGO)
 
 MODULE_PARM_DESC (rd_size,"Size of each RAM disk in kbytes.")
 
 module_param (max_part, int, S_IRUGO)
 
 MODULE_PARM_DESC (max_part,"Maximum number of partitions per RAM disk")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_BLOCKDEV_MAJOR (RAMDISK_MAJOR)
 
 MODULE_ALIAS ("rd")
 
 __setup ("ramdisk_size=", ramdisk_size)
 
 module_init (brd_init)
 
 module_exit (brd_exit)
 

Variables

int rd_size = CONFIG_BLK_DEV_RAM_SIZE
 

Macro Definition Documentation

#define FREE_BATCH   16

Definition at line 160 of file brd.c.

#define PAGE_SECTORS   (1 << PAGE_SECTORS_SHIFT)

Definition at line 27 of file brd.c.

#define PAGE_SECTORS_SHIFT   (PAGE_SHIFT - SECTOR_SHIFT)

Definition at line 26 of file brd.c.

#define SECTOR_SHIFT   9

Definition at line 25 of file brd.c.

Function Documentation

__setup ( )
MODULE_ALIAS ( "rd"  )
MODULE_ALIAS_BLOCKDEV_MAJOR ( RAMDISK_MAJOR  )
module_exit ( brd_exit  )
module_init ( brd_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( rd_nr  ,
int  ,
S_IRUGO   
)
module_param ( rd_size  ,
int  ,
S_IRUGO   
)
module_param ( max_part  ,
int  ,
S_IRUGO   
)
MODULE_PARM_DESC ( rd_nr  ,
"Maximum number of brd devices  
)
MODULE_PARM_DESC ( rd_size  ,
"Size of each RAM disk in kbytes."   
)
MODULE_PARM_DESC ( max_part  ,
"Maximum number of partitions per RAM disk"   
)

Variable Documentation

int rd_size = CONFIG_BLK_DEV_RAM_SIZE

Definition at line 433 of file brd.c.