/* * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) * Licensed under the GPL *//* 2001-09-28...2002-04-17 * Partition stuff by James_McMechan@hotmail.com * old style ubd by setting UBD_SHIFT to 0 * 2002-09-27...2002-10-18 massive tinkering for 2.5 * partitions have changed in 2.5 * 2003-01-29 more tinkering for 2.5.59-1 * This should now address the sysfs problems and has * the symlink for devfs to allow for booting with * the common /dev/ubd/discX/... names rather than * only /dev/ubdN/discN this version also has lots of * clean ups preparing for ubd-many. * James McMechan */#define UBD_SHIFT 4#include"linux/kernel.h"#include"linux/module.h"#include"linux/blkdev.h"#include"linux/ata.h"#include"linux/hdreg.h"#include"linux/init.h"#include"linux/cdrom.h"#include"linux/proc_fs.h"#include"linux/seq_file.h"#include"linux/ctype.h"#include"linux/capability.h"#include"linux/mm.h"#include"linux/slab.h"#include"linux/vmalloc.h"#include"linux/blkpg.h"#include"linux/genhd.h"#include"linux/spinlock.h"#include"linux/platform_device.h"#include"linux/scatterlist.h"#include"asm/segment.h"#include"asm/uaccess.h"#include"asm/irq.h"#include"asm/types.h"#include"asm/tlbflush.h"#include"mem_user.h"#include"kern_util.h"#include"kern.h"#include"mconsole_kern.h"#include"init.h"#include"irq_user.h"#include"irq_kern.h"#include"ubd_user.h"#include"os.h"#include"mem.h"#include"mem_kern.h"#include"cow.h"enumubd_req{UBD_READ,UBD_WRITE};structio_thread_req{structrequest*req;enumubd_reqop;intfds[2];unsignedlongoffsets[2];unsignedlonglongoffset;unsignedlonglength;char*buffer;intsectorsize;