1 diff -Nur linux.orig/Documentation/Configure.help linux/Documentation/Configure.help
2 --- linux.orig/Documentation/Configure.help Mon Oct 22 14:57:05 2001
3 +++ linux/Documentation/Configure.help Mon Oct 22 15:08:52 2001
9 +Network disk device support
11 + If you say Y here, your kernel will be able to act as network disk
12 + client and provide you with network disk block devices. This is
13 + similar to NBD in that the driver forwards block device requests
14 + over network to server, which performs the operations on files on
15 + its local filesystem and returns results back to the client. The
16 + driver will enlarge your kernel by about 8 KiB.
18 + Unlike NBD though, NWD it uses RPC to transfer block device requests
19 + to the server. The network disk devices can be also used for root
20 + filesystems, making it easy to setup diskless environment -- all you
21 + need is kernel image with network drivers. The RPC transport protocol
22 + can be either TCP/IP or UDP/IP, the latter being the default one and
23 + probably the one more suitable for reliable, local area networks. The
24 + driver utilizes built-in kernel SunRPC infrastructure, thus saying Y
25 + here will force SunRPC into your kernel, which will enlarge it by
28 + Consult <file:Documentation/nwd.txt> for more information concerning
29 + the kernel client driver and user space server.
31 + If you want to compile this driver as a module (i.e. code which can be
32 + inserted in and removed from the running kernel whenever you want),
33 + say M here and read <file:Documentation/modules.txt>. The module will be
38 ATA/IDE/MFM/RLL support
40 diff -Nur linux.orig/Makefile linux/Makefile
41 --- linux.orig/Makefile Mon Oct 22 14:57:05 2001
42 +++ linux/Makefile Mon Oct 22 15:08:52 2001
44 DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
45 DRIVERS-$(CONFIG_VT) += drivers/video/video.o
46 DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
47 +DRIVERS-$(CONFIG_BLK_DEV_NWD) += drivers/block/nwd/nwd.o
48 DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
49 DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
50 DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
51 diff -Nur linux.orig/drivers/block/Config.in linux/drivers/block/Config.in
52 --- linux.orig/drivers/block/Config.in Mon Oct 22 14:54:31 2001
53 +++ linux/drivers/block/Config.in Mon Oct 22 15:08:52 2001
56 dep_mbool ' Encryption support (see Crypto section) (EXPERIMENTAL)' CONFIG_BLK_DEV_LOOP_GEN $CONFIG_BLK_DEV_LOOP
57 dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
58 +dep_tristate 'Network disk device support' CONFIG_BLK_DEV_NWD $CONFIG_NET
60 tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
61 if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
62 diff -Nur linux.orig/drivers/block/Makefile linux/drivers/block/Makefile
63 --- linux.orig/drivers/block/Makefile Fri Dec 29 23:07:21 2000
64 +++ linux/drivers/block/Makefile Mon Oct 22 15:08:52 2001
66 obj-$(CONFIG_BLK_DEV_NBD) += nbd.o
68 subdir-$(CONFIG_PARIDE) += paride
69 +subdir-$(CONFIG_BLK_DEV_NWD) += nwd
71 include $(TOPDIR)/Rules.make
72 diff -Nur linux.orig/include/linux/blk.h linux/include/linux/blk.h
73 --- linux.orig/include/linux/blk.h Fri Jul 20 21:53:47 2001
74 +++ linux/include/linux/blk.h Mon Oct 22 15:08:52 2001
76 #define DEVICE_REQUEST do_nbd_request
77 #define DEVICE_NR(device) (MINOR(device))
79 +#elif (MAJOR_NR == NWD_MAJOR)
81 +#define DEVICE_NAME "nwd"
82 +#define DEVICE_REQUEST nwd_request
83 +#define DEVICE_NR(device) (MINOR(device))
85 #elif (MAJOR_NR == MDISK_MAJOR)
87 #define DEVICE_NAME "mdisk"
88 diff -Nur linux.orig/include/linux/major.h linux/include/linux/major.h
89 --- linux.orig/include/linux/major.h Mon Oct 22 14:54:51 2001
90 +++ linux/include/linux/major.h Mon Oct 22 15:08:52 2001
93 #define LVM_BLK_MAJOR 58 /* Logical Volume Manager */
95 +#define NWD_MAJOR 62 /* Network disk driver */
97 #define SCSI_DISK1_MAJOR 65
98 #define SCSI_DISK2_MAJOR 66
99 #define SCSI_DISK3_MAJOR 67
100 diff -Nur linux.orig/init/main.c linux/init/main.c
101 --- linux.orig/init/main.c Mon Oct 22 14:54:48 2001
102 +++ linux/init/main.c Mon Oct 22 15:10:44 2001
106 extern void ecard_init(void);
107 +extern int nwd_boot_init(void);
109 #if defined(CONFIG_SYSVIPC)
110 extern void ipc_init(void);
112 { "apblock", APBLOCK_MAJOR << 8},
113 { "ddv", DDV_MAJOR << 8},
114 { "jsfd", JSFD_MAJOR << 8},
115 +#ifdef CONFIG_BLK_DEV_NWD
119 #if defined(CONFIG_ARCH_S390)
120 { "dasda", (DASD_MAJOR << MINORBITS) },
121 { "dasdb", (DASD_MAJOR << MINORBITS) + (1 << 2) },
123 start_context_thread();
126 +#ifdef CONFIG_BLK_DEV_NWD
127 + /* Must be done after NET/RPC initialization */
128 + if (nwd_boot_init())
129 + panic ("Unable to setup network disk root device.");
134 irda_device_init(); /* Must be done after protocol initialization */