#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/ata.h>
#include <linux/hdreg.h>
#include <linux/cdrom.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/platform_device.h>
#include <linux/scatterlist.h>
#include <asm/tlbflush.h>
#include <kern_util.h>
#include "mconsole_kern.h"
#include <init.h>
#include <irq_kern.h>
#include "ubd.h"
#include <os.h>
#include "cow.h"
Go to the source code of this file.
|
| __setup ("fake_ide", fake_ide_setup) |
|
| __uml_help (fake_ide_setup,"fake_ide\n"" Create ide0 entries that map onto ubd devices.\n\n") |
|
| __setup ("ubd", ubd_setup) |
|
| __uml_help (ubd_setup,"ubd<n><flags>=<filename>[(:|,)<filename2>]\n"" This is used to associate a device with a file in the underlying\n"" filesystem. When specifying two filenames, the first one is the\n"" COW name and the second is the backing file name. As separator you can\n"" use either a ':' or a ',': the first one allows writing things like;\n"" ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n"" while with a ',' the shell would not expand the 2nd '~'.\n"" When using only one filename, UML will detect whether to treat it like\n"" a COW file or a backing file. To override this detection, add the 'd'\n"" flag:\n"" ubd0d=BackingFile\n"" Usually, there is a filesystem in the file, but \n"" that's not required. Swap devices containing swap files can be\n"" specified like this. Also, a file which doesn't contain a\n"" filesystem can have its contents read in the virtual \n"" machine by running 'dd' on the device. <n> must be in the range\n"" 0 to 7. Appending an 'r' to the number will cause that device\n"" to be mounted read-only. For example ubd1r=./ext_fs. Appending\n"" an 's' will cause data to be written to disk on the host immediately.\n"" 'c' will cause the device to be treated as being shared between multiple\n"" UMLs and file locking will be turned off - this is appropriate for a\n"" cluster filesystem and inappropriate at almost all other times.\n\n") |
|
| __setup ("udb", udb_setup) |
|
| __uml_help (udb_setup,"udb\n"" This option is here solely to catch ubd -> udb typos, which can be\n"" to impossible to catch visually unless you specifically look for\n"" them. The only result of any option starting with 'udb' is an error\n"" in the boot output.\n\n") |
|
| __uml_exitcall (kill_io_thread) |
|
| __initcall (ubd_mc_init) |
|
| __initcall (ubd0_init) |
|
| late_initcall (ubd_init) |
|
| device_initcall (ubd_driver_init) |
|
int | io_thread (void *arg) |
|
Value:{ \
.fd = -1, \
.bitmap_offset = 0, \
.data_offset = 0, \
}
Definition at line 154 of file ubd_kern.c.
Value:{ \
.count = 0, \
.fd = -1, \
.size = -1, \
.no_cow = 0, \
.shared = 0, \
.start_sg = 0, \
.end_sg = 0, \
.rq_pos = 0, \
}
Definition at line 162 of file ubd_kern.c.
#define DRIVER_NAME "uml-blkdev" |
Value:((
struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \
.cl = 1 })
Definition at line 114 of file ubd_kern.c.
#define ROUND_BLOCK |
( |
|
n | ) |
((n + ((1 << 9) - 1)) & (-1 << 9)) |
__initcall |
( |
ubd_mc_init |
| ) |
|
__setup |
( |
"fake_ide" |
, |
|
|
fake_ide_setup |
|
|
) |
| |
__setup |
( |
"ubd" |
, |
|
|
ubd_setup |
|
|
) |
| |
__setup |
( |
"udb" |
, |
|
|
udb_setup |
|
|
) |
| |
__uml_exitcall |
( |
kill_io_thread |
| ) |
|
device_initcall |
( |
ubd_driver_init |
| ) |
|
late_initcall |
( |
ubd_init |
| ) |
|