All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] C99 initializers for drivers/ide/pci
From: Art Haas @ 2002-12-11 20:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

Hi.

I think these two patches are needed (unless I've inadvertently reverted
something and am now patching back to what should be). These patches
convert the two files to use C99 initializers. The patches are against
2.5.51.

Art Haas

--- linux-2.5.51/drivers/ide/pci/cs5520.h.old	2002-11-29 09:23:59.000000000 -0600
+++ linux-2.5.51/drivers/ide/pci/cs5520.h	2002-12-10 13:52:04.000000000 -0600
@@ -17,10 +17,10 @@
 
 static ide_pci_host_proc_t cs5520_procs[] __initdata = {
 	{
-		name:		"cs5520",
-		set:		1,
-		get_info:	cs5520_get_info,
-		parent:		NULL,
+		.name		= "cs5520",
+		.set		= 1,
+		.get_info	= cs5520_get_info,
+		.parent		= NULL,
 	},
 };
 #endif  /* defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) */
@@ -31,32 +31,32 @@
 
 static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
 	{
-		vendor:		PCI_VENDOR_ID_CYRIX,
-		device:		PCI_DEVICE_ID_CYRIX_5510,
-		name:		"Cyrix 5510",
-		init_chipset:	init_chipset_cs5520,
-		init_setup_dma: cs5520_init_setup_dma,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_cs5520,
-		isa_ports:	1,
-		channels:	2,
-		autodma:	AUTODMA,
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_CYRIX,
+		.device		= PCI_DEVICE_ID_CYRIX_5510,
+		.name		= "Cyrix 5510",
+		.init_chipset	= init_chipset_cs5520,
+		.init_setup_dma = cs5520_init_setup_dma,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_cs5520,
+		.isa_ports	= 1,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},
 	{
-		vendor:		PCI_VENDOR_ID_CYRIX,
-		device:		PCI_DEVICE_ID_CYRIX_5520,
-		name:		"Cyrix 5520",
-		init_chipset:	init_chipset_cs5520,
-		init_setup_dma: cs5520_init_setup_dma,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_cs5520,
-		isa_ports:	1,
-		channels:	2,
-		autodma:	AUTODMA,
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_CYRIX,
+		.device		= PCI_DEVICE_ID_CYRIX_5520,
+		.name		= "Cyrix 5520",
+		.init_chipset	= init_chipset_cs5520,
+		.init_setup_dma = cs5520_init_setup_dma,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_cs5520,
+		.isa_ports	= 1,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	}
 };
 
--- linux-2.5.51/drivers/ide/pci/sc1200.h.old	2002-11-29 09:24:00.000000000 -0600
+++ linux-2.5.51/drivers/ide/pci/sc1200.h	2002-12-10 13:52:04.000000000 -0600
@@ -17,10 +17,10 @@
 
 static ide_pci_host_proc_t sc1200_procs[] __initdata = {
 	{
-		name:		"sc1200",
-		set:		1,
-		get_info:	sc1200_get_info,
-		parent:		NULL,
+		.name		= "sc1200",
+		.set		= 1,
+		.get_info	= sc1200_get_info,
+		.parent		= NULL,
 	},
 };
 #endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */
@@ -31,23 +31,23 @@
 
 static ide_pci_device_t sc1200_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_NS,
-		device:		PCI_DEVICE_ID_NS_SCx200_IDE,
-		name:		"SC1200",
-		init_chipset:	init_chipset_sc1200,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_sc1200,
-		init_dma:	init_dma_sc1200,
-		channels:	2,
-		autodma:	AUTODMA,
-		enablebits:	{{0x00,0x00,0x00}, {0x00,0x00,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_NS,
+		.device		= PCI_DEVICE_ID_NS_SCx200_IDE,
+		.name		= "SC1200",
+		.init_chipset	= init_chipset_sc1200,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_sc1200,
+		.init_dma	= init_dma_sc1200,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

^ permalink raw reply

* RE: [LARTC] Unable to delete qdisc / class
From: Serge Maandag @ 2002-12-11 20:04 UTC (permalink / raw)
  To: lartc
In-Reply-To: <marc-lartc-103961111406865@msgid-missing>

Thanx, but this is what I get:

sh-2.04# tc qdisc del dev eth0 root handle 22:
RTNETLINK answers: Invalid argument


So then I did:
sh-2.04# tc qdisc del dev eth0 root help
Usage: tc qdisc [ add | del | replace | change | get ] dev STRING
       [ handle QHANDLE ] [ root | ingress | parent CLASSID ]
       [ estimator INTERVAL TIME_CONSTANT ]
       [ [ QDISC_KIND ] [ help | OPTIONS ] ]

       tc qdisc show [ dev STRING ] [ingress]
Where:
QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }
OPTIONS := ... try tc qdisc add <desired QDISC_KIND> help


And I saw that handle is shown before root, so I tried:

sh-2.04# tc qdisc del dev eth0 handle 22: root
RTNETLINK answers: Invalid argument

It's about to drive me mad :(

Serge.

-----Original Message-----
From: Stef Coene [mailto:stef.coene@docum.org]
Sent: Wednesday, December 11, 2002 6:54 PM
To: Serge Maandag; lartc@mailman.ds9a.nl
Subject: Re: [LARTC] Unable to delete qdisc / class


On Wednesday 11 December 2002 13:50, Serge Maandag wrote:
> Dear list,
>
> I have setup a qdisc that I'd like to remove, but somehow it seems
> impossible.
>
> -----------------
> Output of show:
>
> sh-2.04# tc -d qdisc show
> qdisc cbq 22: dev eth0 rate 100Mbit cell 8b mpu 64b (bounded,isolated)
> prio no-transmit/8 weight 100Mbit allot 1514b
> level 0 ewma 5 avpkt 1000b maxidle 1us
>
> sh-2.04# tc -d class show dev eth0
> class cbq 22: root rate 100Mbit cell 8b mpu 64b (bounded,isolated) prio
> no-transmit/8 weight 100Mbit allot 1514b
> level 0 ewma 5 avpkt 1000b maxidle 1us
>
> sh-2.04# tc -d filter show dev eth0
> <nothing>
> -----------------
>
> If I do "tc qdisc del dev eth0 root" it says "RTNETLINK answers: No such
> file or directory".
Mhh.  This should work.  
Try this :
tc qdisc del dev eth0 root handle 22:

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply

* Problems compiling 2.4.20 - fail just in 'make' - please help
From: system_lists @ 2002-12-11 20:11 UTC (permalink / raw)
  To: linux-kernel
In-Reply-To: <Pine.LNX.4.33L2.0212111138530.15702-100000@dragon.pdx.osdl .net>



My gcc compiler:

server01:/usr/src/linux-2.4.20# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared 
--with-system-zlib --enable-nls --without-included-gettext 
--enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm 
--enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.2 20021202 (Debian prerelease)


------- the fail --------

server01:/usr/src/linux-2.4.20# make
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686   -DKBUILD_BASENAME=main -c 
-o init/main.o init/main.c
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686  -DUTS_MACHINE='"i386"' 
-DKBUILD_BASENAME=version -c -o init/version.o init/version.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 
-march=i686   -DKBUILD_BASENAME=do_mounts -c -o init/do_mounts.o 
init/do_mounts.c
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 " 
-C  kernel
make[1]: Entering directory `/usr/src/linux-2.4.20/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.20/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix 
include -DKBUILD_BASENAME=sched  -fno-omit-frame-pointer -c -o sched.o sched.c
In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
                  from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                  from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                  from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                  from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                  from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                  from sched.c:23:
/usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such file 
or directory
In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
                  from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                  from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                  from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                  from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                  from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                  from sched.c:23:
/usr/src/linux-2.4.20/include/linux/kernel.h:74: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:74: warning: function 
declaration isn't a prototype
/usr/src/linux-2.4.20/include/linux/kernel.h:77: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:77: warning: function 
declaration isn't a prototype
/usr/src/linux-2.4.20/include/linux/kernel.h:81: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:81: warning: function 
declaration isn't a prototype
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make: *** [_dir_kernel] Error 2
server01:/usr/src/linux-2.4.20#



???????


^ permalink raw reply

* [PATCH] C99 initializers for drivers/net
From: Art Haas @ 2002-12-11 20:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

Hi.

Here's a small patchset for various files in drivers/net that switch
these files to use C99 initializers. The patches are against 2.5.51.

Art Haas

--- linux-2.5.51/drivers/net/e100/e100_main.c.old	2002-12-10 09:33:52.000000000 -0600
+++ linux-2.5.51/drivers/net/e100/e100_main.c	2002-12-10 14:06:42.000000000 -0600
@@ -145,17 +145,17 @@
 static int e100_suspend(struct pci_dev *pcid, u32 state);
 static int e100_resume(struct pci_dev *pcid);
 struct notifier_block e100_notifier_reboot = {
-        notifier_call:  e100_notify_reboot,
-        next:           NULL,
-        priority:       0
+        .notifier_call  = e100_notify_reboot,
+        .next           = NULL,
+        .priority       = 0
 };
 #endif
 static int e100_notify_netdev(struct notifier_block *, unsigned long event, void *ptr);
  
 struct notifier_block e100_notifier_netdev = {
-	notifier_call:  e100_notify_netdev,
-	next:           NULL,
-	priority:       0
+	.notifier_call  = e100_notify_netdev,
+	.next           = NULL,
+	.priority       = 0
 };
 
 static void e100_get_mdix_status(struct e100_private *bdp);
--- linux-2.5.51/drivers/net/irda/irda-usb.c.old	2002-12-10 09:33:52.000000000 -0600
+++ linux-2.5.51/drivers/net/irda/irda-usb.c	2002-12-10 14:06:42.000000000 -0600
@@ -75,16 +75,16 @@
 /* These are the currently known IrDA USB dongles. Add new dongles here */
 static struct usb_device_id dongles[] = {
 	/* ACTiSYS Corp,  ACT-IR2000U FIR-USB Adapter */
-	{ USB_DEVICE(0x9c4, 0x011), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ USB_DEVICE(0x9c4, 0x011), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
 	/* KC Technology Inc.,  KC-180 USB IrDA Device */
-	{ USB_DEVICE(0x50f, 0x180), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ USB_DEVICE(0x50f, 0x180), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
 	/* Extended Systems, Inc.,  XTNDAccess IrDA USB (ESI-9685) */
-	{ USB_DEVICE(0x8e9, 0x100), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
-	{ match_flags: USB_DEVICE_ID_MATCH_INT_CLASS |
+	{ USB_DEVICE(0x8e9, 0x100), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
 	               USB_DEVICE_ID_MATCH_INT_SUBCLASS,
-	  bInterfaceClass: USB_CLASS_APP_SPEC,
-	  bInterfaceSubClass: USB_CLASS_IRDA,
-	  driver_info: IUC_DEFAULT, },
+	  .bInterfaceClass = USB_CLASS_APP_SPEC,
+	  .bInterfaceSubClass = USB_CLASS_IRDA,
+	  .driver_info = IUC_DEFAULT, },
 	{ }, /* The end */
 };
 
--- linux-2.5.51/drivers/net/irda/vlsi_ir.c.old	2002-11-29 09:24:09.000000000 -0600
+++ linux-2.5.51/drivers/net/irda/vlsi_ir.c	2002-12-10 14:06:42.000000000 -0600
@@ -495,10 +495,10 @@
 }
 
 static struct file_operations vlsi_proc_fops = {
-	open:		vlsi_proc_open,
-	llseek:		vlsi_proc_lseek,
-	read:		vlsi_proc_read,
-	release:	vlsi_proc_release,
+	.open		= vlsi_proc_open,
+	.llseek		= vlsi_proc_lseek,
+	.read		= vlsi_proc_read,
+	.release	= vlsi_proc_release,
 };
 #endif
 
--- linux-2.5.51/drivers/net/irda/toshoboe.c.old	2002-09-28 10:35:04.000000000 -0500
+++ linux-2.5.51/drivers/net/irda/toshoboe.c	2002-12-10 14:06:42.000000000 -0600
@@ -938,12 +938,12 @@
 }
 
 static struct pci_driver toshoboe_pci_driver = {
-  name		: "toshoboe",
-  id_table	: toshoboe_pci_tbl,
-  probe		: toshoboe_probe,
-  remove	: toshoboe_remove,
-  suspend	: toshoboe_suspend,
-  resume	: toshoboe_resume 
+	.name		= "toshoboe",
+	.id_table	= toshoboe_pci_tbl,
+	.probe		= toshoboe_probe,
+	.remove		= toshoboe_remove,
+	.suspend	= toshoboe_suspend,
+	.resume		= toshoboe_resume 
 };
 
 int __init
--- linux-2.5.51/drivers/net/appletalk/cops.c.old	2002-12-10 09:33:51.000000000 -0600
+++ linux-2.5.51/drivers/net/appletalk/cops.c	2002-12-10 14:06:42.000000000 -0600
@@ -1012,7 +1012,7 @@
 }
 
 #ifdef MODULE
-static struct net_device cops0_dev = { init: cops_probe };
+static struct net_device cops0_dev = { .init = cops_probe };
 
 MODULE_LICENSE("GPL");
 MODULE_PARM(io, "i");
--- linux-2.5.51/drivers/net/fc/iph5526_scsi.h.old	2002-07-24 19:42:25.000000000 -0500
+++ linux-2.5.51/drivers/net/fc/iph5526_scsi.h	2002-12-10 14:06:42.000000000 -0600
@@ -3,21 +3,21 @@
 
 #define IPH5526_CAN_QUEUE	32
 #define IPH5526_SCSI_FC { 						 				\
-        name:                   "Interphase 5526 Fibre Channel SCSI Adapter",   \
-        detect:                 iph5526_detect,                  \
-        release:                iph5526_release,                 \
-        info:                   iph5526_info,                    \
-        queuecommand:           iph5526_queuecommand,            \
-		bios_param:				iph5526_biosparam,               \
-        can_queue:              IPH5526_CAN_QUEUE,               \
-        this_id:                -1,                              \
-        sg_tablesize:           255,                             \
-        cmd_per_lun:            8,                               \
-        use_clustering:         DISABLE_CLUSTERING,              \
-        eh_abort_handler:       iph5526_abort,                   \
-        eh_device_reset_handler:NULL,                            \
-        eh_bus_reset_handler:   NULL,                            \
-        eh_host_reset_handler:  NULL,                            \
+        .name                   = "Interphase 5526 Fibre Channel SCSI Adapter",   \
+        .detect                 = iph5526_detect,                  \
+        .release                = iph5526_release,                 \
+        .info                   = iph5526_info,                    \
+        .queuecommand           = iph5526_queuecommand,            \
+	.bios_param		= iph5526_biosparam,               \
+        .can_queue              = IPH5526_CAN_QUEUE,               \
+        .this_id                = -1,                              \
+        .sg_tablesize           = 255,                             \
+        .cmd_per_lun            = 8,                               \
+        .use_clustering         = DISABLE_CLUSTERING,              \
+        .eh_abort_handler       = iph5526_abort,                   \
+        .eh_device_reset_handler = NULL,                            \
+        .eh_bus_reset_handler   = NULL,                            \
+        .eh_host_reset_handler  = NULL,                            \
 }
 
 int iph5526_detect(Scsi_Host_Template *tmpt);
--- linux-2.5.51/drivers/net/e1000/e1000_param.c.old	2002-10-19 11:21:31.000000000 -0500
+++ linux-2.5.51/drivers/net/e1000/e1000_param.c	2002-12-10 14:06:42.000000000 -0600
@@ -310,7 +310,7 @@
 			.name = "Transmit Descriptors",
 			.err  = "using default of " __MODULE_STRING(DEFAULT_TXD),
 			.def  = DEFAULT_TXD,
-			.arg  = { r: { min: MIN_TXD }}
+			.arg  = { .r = { .min = MIN_TXD }}
 		};
 		struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -327,7 +327,7 @@
 			.name = "Receive Descriptors",
 			.err  = "using default of " __MODULE_STRING(DEFAULT_RXD),
 			.def  = DEFAULT_RXD,
-			.arg  = { r: { min: MIN_RXD }}
+			.arg  = { .r = { .min = MIN_RXD }}
 		};
 		struct e1000_desc_ring *rx_ring = &adapter->rx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -363,7 +363,7 @@
 			.name = "Flow Control",
 			.err  = "reading default settings from EEPROM",
 			.def  = e1000_fc_default,
-			.arg  = { l: { nr: ARRAY_SIZE(fc_list), p: fc_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(fc_list), .p = fc_list }}
 		};
 
 		int fc = FlowControl[bd];
@@ -375,7 +375,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Transmit Interrupt Delay",
-			.arg  = { r: { min: MIN_TXDELAY, max: MAX_TXDELAY }}
+			.arg  = { .r = { .min = MIN_TXDELAY, .max = MAX_TXDELAY }}
 		};
 		opt.def = DEFAULT_TIDV;
 		opt.err = tidv;
@@ -388,7 +388,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Transmit Absolute Interrupt Delay",
-			.arg  = { r: { min: MIN_TXABSDELAY, max: MAX_TXABSDELAY }}
+			.arg  = { .r = { .min = MIN_TXABSDELAY, .max = MAX_TXABSDELAY }}
 		};
 		opt.def = DEFAULT_TADV;
 		opt.err = tadv;
@@ -401,7 +401,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Receive Interrupt Delay",
-			.arg  = { r: { min: MIN_RXDELAY, max: MAX_RXDELAY }}
+			.arg  = { .r = { .min = MIN_RXDELAY, .max = MAX_RXDELAY }}
 		};
 		opt.def = DEFAULT_RDTR;
 		opt.err = rdtr;
@@ -414,7 +414,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Receive Absolute Interrupt Delay",
-			.arg  = { r: { min: MIN_RXABSDELAY, max: MAX_RXABSDELAY }}
+			.arg  = { .r = { .min = MIN_RXABSDELAY, .max = MAX_RXABSDELAY }}
 		};
 		opt.def = DEFAULT_RADV;
 		opt.err = radv;
@@ -486,7 +486,7 @@
 			.name = "Speed",
 			.err  = "parameter ignored",
 			.def  = 0,
-			.arg  = { l: { nr: ARRAY_SIZE(speed_list), p: speed_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(speed_list), .p = speed_list }}
 		};
 
 		speed = Speed[bd];
@@ -501,7 +501,7 @@
 			.name = "Duplex",
 			.err  = "parameter ignored",
 			.def  = 0,
-			.arg  = { l: { nr: ARRAY_SIZE(dplx_list), p: dplx_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(dplx_list), .p = dplx_list }}
 		};
 
 		dplx = Duplex[bd];
@@ -553,7 +553,7 @@
 			.name = "AutoNeg",
 			.err  = "parameter ignored",
 			.def  = AUTONEG_ADV_DEFAULT,
-			.arg  = { l: { nr: ARRAY_SIZE(an_list), p: an_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(an_list), .p = an_list }}
 		};
 
 		int an = AutoNeg[bd];
--- linux-2.5.51/drivers/net/wireless/orinoco_cs.c.old	2002-11-22 19:45:14.000000000 -0600
+++ linux-2.5.51/drivers/net/wireless/orinoco_cs.c	2002-12-10 14:06:42.000000000 -0600
@@ -369,7 +369,7 @@
 	CS_CHECK(GetFirstTuple, handle, &tuple);
 	while (1) {
 		cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
-		cistpl_cftable_entry_t dflt = { index: 0 };
+		cistpl_cftable_entry_t dflt = { .index = 0 };
 
 		CFG_CHECK(GetTupleData, handle, &tuple);
 		CFG_CHECK(ParseTuple, handle, &tuple, &parse);
--- linux-2.5.51/drivers/net/sungem.c.old	2002-12-10 09:33:54.000000000 -0600
+++ linux-2.5.51/drivers/net/sungem.c	2002-12-10 14:06:42.000000000 -0600
@@ -2557,7 +2557,7 @@
 		
 	switch(ecmd.cmd) {
         case ETHTOOL_GDRVINFO: {
-		struct ethtool_drvinfo info = { cmd: ETHTOOL_GDRVINFO };
+		struct ethtool_drvinfo info = { .cmd = ETHTOOL_GDRVINFO };
 
 		strncpy(info.driver, DRV_NAME, ETHTOOL_BUSINFO_LEN);
 		strncpy(info.version, DRV_VERSION, ETHTOOL_BUSINFO_LEN);
@@ -2652,7 +2652,7 @@
 
 	/* get link status */
 	case ETHTOOL_GLINK: {
-		struct ethtool_value edata = { cmd: ETHTOOL_GLINK };
+		struct ethtool_value edata = { .cmd = ETHTOOL_GLINK };
 
 		edata.data = (gp->lstate == link_up);
 		if (copy_to_user(ep_user, &edata, sizeof(edata)))
@@ -2662,7 +2662,7 @@
 
 	/* get message-level */
 	case ETHTOOL_GMSGLVL: {
-		struct ethtool_value edata = { cmd: ETHTOOL_GMSGLVL };
+		struct ethtool_value edata = { .cmd = ETHTOOL_GMSGLVL };
 
 		edata.data = gp->msg_enable;
 		if (copy_to_user(ep_user, &edata, sizeof(edata)))
--- linux-2.5.51/drivers/net/ni65.c.old	2002-12-10 09:33:52.000000000 -0600
+++ linux-2.5.51/drivers/net/ni65.c	2002-12-10 14:06:42.000000000 -0600
@@ -1210,7 +1210,7 @@
 }
 
 #ifdef MODULE
-static struct net_device dev_ni65 = { base_addr: 0x360, irq: 9, init: ni65_probe };
+static struct net_device dev_ni65 = { .base_addr = 0x360, .irq = 9, .init = ni65_probe };
 
 /* set: io,irq,dma or set it when calling insmod */
 static int irq;
--- linux-2.5.51/drivers/net/seeq8005.c.old	2002-11-22 19:45:09.000000000 -0600
+++ linux-2.5.51/drivers/net/seeq8005.c	2002-12-10 14:06:42.000000000 -0600
@@ -707,7 +707,7 @@
 	
 #ifdef MODULE
 
-static struct net_device dev_seeq = { init: seeq8005_probe };
+static struct net_device dev_seeq = { .init = seeq8005_probe };
 static int io = 0x320;
 static int irq = 10;
 MODULE_LICENSE("GPL");
--- linux-2.5.51/drivers/net/82596.c.old	2002-11-22 19:45:03.000000000 -0600
+++ linux-2.5.51/drivers/net/82596.c	2002-12-10 14:06:42.000000000 -0600
@@ -1525,7 +1525,7 @@
 }
 
 #ifdef MODULE
-static struct net_device dev_82596 = { init: i82596_probe };
+static struct net_device dev_82596 = { .init = i82596_probe };
 
 #ifdef ENABLE_APRICOT
 static int io = 0x300;
--- linux-2.5.51/drivers/net/sunhme.c.old	2002-12-10 09:33:54.000000000 -0600
+++ linux-2.5.51/drivers/net/sunhme.c	2002-12-10 14:06:42.000000000 -0600
@@ -181,10 +181,10 @@
 
 struct pci_device_id happymeal_pci_ids[] __initdata = {
 	{
-	  vendor: PCI_VENDOR_ID_SUN,
-	  device: PCI_DEVICE_ID_SUN_HAPPYMEAL,
-	  subvendor: PCI_ANY_ID,
-	  subdevice: PCI_ANY_ID,
+	  .vendor	= PCI_VENDOR_ID_SUN,
+	  .device	= PCI_DEVICE_ID_SUN_HAPPYMEAL,
+	  .subvendor	= PCI_ANY_ID,
+	  .subdevice	= PCI_ANY_ID,
 	},
 	{ }			/* Terminating entry */
 };
--- linux-2.5.51/drivers/net/pcnet32.c.old	2002-11-22 19:45:09.000000000 -0600
+++ linux-2.5.51/drivers/net/pcnet32.c	2002-12-10 14:06:42.000000000 -0600
@@ -392,13 +392,13 @@
 }
 
 static struct pcnet32_access pcnet32_wio = {
-    read_csr:	pcnet32_wio_read_csr,
-    write_csr:	pcnet32_wio_write_csr,
-    read_bcr:	pcnet32_wio_read_bcr,
-    write_bcr:	pcnet32_wio_write_bcr,
-    read_rap:	pcnet32_wio_read_rap,
-    write_rap:	pcnet32_wio_write_rap,
-    reset:	pcnet32_wio_reset
+    .read_csr	= pcnet32_wio_read_csr,
+    .write_csr	= pcnet32_wio_write_csr,
+    .read_bcr	= pcnet32_wio_read_bcr,
+    .write_bcr	= pcnet32_wio_write_bcr,
+    .read_rap	= pcnet32_wio_read_rap,
+    .write_rap	= pcnet32_wio_write_rap,
+    .reset	= pcnet32_wio_reset
 };
 
 static u16 pcnet32_dwio_read_csr (unsigned long addr, int index)
@@ -447,13 +447,13 @@
 }
 
 static struct pcnet32_access pcnet32_dwio = {
-    read_csr:	pcnet32_dwio_read_csr,
-    write_csr:	pcnet32_dwio_write_csr,
-    read_bcr:	pcnet32_dwio_read_bcr,
-    write_bcr:	pcnet32_dwio_write_bcr,
-    read_rap:	pcnet32_dwio_read_rap,
-    write_rap:	pcnet32_dwio_write_rap,
-    reset:	pcnet32_dwio_reset
+    .read_csr	= pcnet32_dwio_read_csr,
+    .write_csr	= pcnet32_dwio_write_csr,
+    .read_bcr	= pcnet32_dwio_read_bcr,
+    .write_bcr	= pcnet32_dwio_write_bcr,
+    .read_rap	= pcnet32_dwio_read_rap,
+    .write_rap	= pcnet32_dwio_write_rap,
+    .reset	= pcnet32_dwio_reset
 };
 
 
@@ -1682,9 +1682,9 @@
 }
 
 static struct pci_driver pcnet32_driver = {
-    name:	DRV_NAME,
-    probe:	pcnet32_probe_pci,
-    id_table:	pcnet32_pci_tbl,
+    .name	= DRV_NAME,
+    .probe	= pcnet32_probe_pci,
+    .id_table	= pcnet32_pci_tbl,
 };
 
 MODULE_PARM(debug, "i");
--- linux-2.5.51/drivers/net/sundance.c.old	2002-11-11 07:14:41.000000000 -0600
+++ linux-2.5.51/drivers/net/sundance.c	2002-12-10 14:06:42.000000000 -0600
@@ -1753,10 +1753,10 @@
 }
 
 static struct pci_driver sundance_driver = {
-	name:		DRV_NAME,
-	id_table:	sundance_pci_tbl,
-	probe:		sundance_probe1,
-	remove:		__devexit_p(sundance_remove1),
+	.name		= DRV_NAME,
+	.id_table	= sundance_pci_tbl,
+	.probe		= sundance_probe1,
+	.remove		= __devexit_p(sundance_remove1),
 };
 
 static int __init sundance_init(void)
--- linux-2.5.51/drivers/net/rrunner.c.old	2002-11-18 01:02:01.000000000 -0600
+++ linux-2.5.51/drivers/net/rrunner.c	2002-12-10 14:06:42.000000000 -0600
@@ -1761,10 +1761,10 @@
 MODULE_DEVICE_TABLE(pci, rr_pci_tbl);
 
 static struct pci_driver rr_driver = {
-	name:		"rrunner",
-	id_table:	rr_pci_tbl,
-	probe:		rr_init_one,
-	remove:		rr_remove_one,
+	.name		= "rrunner",
+	.id_table	= rr_pci_tbl,
+	.probe		= rr_init_one,
+	.remove		= rr_remove_one,
 };
 
 static int __init rr_init_module(void)
--- linux-2.5.51/drivers/net/lasi_82596.c.old	2002-11-22 19:45:07.000000000 -0600
+++ linux-2.5.51/drivers/net/lasi_82596.c	2002-12-10 14:06:42.000000000 -0600
@@ -1565,9 +1565,9 @@
 MODULE_DEVICE_TABLE(parisc, lan_tbl);
 
 static struct parisc_driver lan_driver = {
-	name:		"Apricot",
-	id_table:	lan_tbl,
-	probe:		lan_init_chip,
+	.name		= "Apricot",
+	.id_table	= lan_tbl,
+	.probe		= lan_init_chip,
 };
 
 static int __devinit lasi_82596_init(void)
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

^ permalink raw reply

* Re: Firewall help
From: Marcello Scacchetti @ 2002-12-11 20:01 UTC (permalink / raw)
  To: netfilter
In-Reply-To: <000301c2a14e$7733f510$0114a8c0@CyberDawn.Net>

Hi,
make sure you have enabled ip forwarding into
/proc/sys/net/ipv4/ip_forward, if this file contains 0 do an:
echo "1" > /proc/sys/net/ipv4/ip_forward. This should solve the problem
between internal network and dmz. For the external network you probably
need nat or masq. This is because each machine on dmz and internal
network should have default gateway set to firewall interfaces suppose
for dmz the gateway could be: 192.168.1.1 and for internal network could
be: 192.168.2.1. Each of this addresses should be configured on firewall
interfaces as (for example) eth0 and eth1. To be able to talk with
public services you must use nat or set on all public servers something
like: route add -net 192.168.1.0 netmask 255.255.255.0 gw
xxx.xxx.xxx.xxx
and
route add -net 192.168.2.0 netmask 255.255.255.0 gw xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is your firewall external interface ip address (in
my example eth2 interface address).
This of course could lead to many security risks, so i can't suggest
this to you, really. Better could be to set a masq on packets coming
from your dmz and internal network going to external networks. This
could be done on the firewall using something like:
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
where eth2 is your external firewall interface.
Hope to have solved your problem,

			Marcello


Il mer, 2002-12-11 alle 20:49, DeWet van Rooyen ha scritto:
> I installed a machine with Redhat 8 and are trying to set up a iptables
> firewall with 2 internal segments (DMZ and internal network).
> My machine have 3 Network cards.
>  
>  Is this possible ?
>  
>  I can seem to get all the segments to see each other. Can you give me an
>  idea on how to do this. Is it just a question of routes / Nat and Arp
>  entries ?
>  
> DMZ - 192.168.1.0 / 255.255.255.0
> Internal Network / 192.168.2.0 / 255.255.255.0
> For the external interface, I have 64 ip addresses - 255.255.255.192
-- 
Marcello Scacchetti <marcello.scacchetti@nextrem.it>


^ permalink raw reply

* Re: IDE feature request & problem
From: Vojtech Pavlik @ 2002-12-11 20:04 UTC (permalink / raw)
  To: Alan Cox; +Cc: Milan Roubal, Petr Sebor, Linux Kernel Mailing List
In-Reply-To: <1039569643.14166.105.camel@irongate.swansea.linux.org.uk>

On Wed, Dec 11, 2002 at 01:20:43AM +0000, Alan Cox wrote:
> On Wed, 2002-12-11 at 00:24, Milan Roubal wrote:
> > Hi Alan,
> > I have got xfs partition and man fsck.xfs say
> > that it will run automatically on reboot.
> 
> You need to force one. Something (I assume XFS) asked the disk for a
> stupid sector number. Thats mostly likely due to some kind of internal
> corruption on the XFS

Or the power supply doesn't give enough power to the drives anymore (my
350W PSU is having heavy problems with five or more drives), and the IDE
transfers get garbled. Note that there is no CRC protection for non-data
xfers even when UDMA is in use, which includes LBA sector addressing.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply

* Re: Why does C3 CPU downgrade in kernel 2.4.20?
From: Joel Jaeggli @ 2002-12-11 19:51 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Bill Davidsen, Alan Cox, Daniel Egger, Dave Jones, Joseph,
	Linux Kernel Mailing List
In-Reply-To: <20021211194244.GA9554@gtf.org>

On Wed, 11 Dec 2002, Jeff Garzik wrote:

> On Wed, Dec 11, 2002 at 01:51:13PM -0500, Bill Davidsen wrote:
> > Is this the CPU in the $200 "Lindows" PC Wal-Mart is selling? I was
> > thinking of one for a low volume router, and it looks as if there are two
> > VIA chips called C3 (or advertizers have hacked the specs).
> 
> We don't know for sure; however the cnn.com story on these PCs had a
> "Via C3" logo in the story's graphic, so it's strongly probable :)

http://www.walmart.com/catalog/product.gsp?product_id=2009643&cat=3951&type=19&dept=3944&path=0%3A3944%3A3951

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
-------------------------------------------------------------------------- 
Joel Jaeggli	      Academic User Services   joelja@darkwing.uoregon.edu    
--    PGP Key Fingerprint: 1DE9 8FCA 51FB 4195 B42A 9C32 A30D 121E      --
  In Dr. Johnson's famous dictionary patriotism is defined as the last
  resort of the scoundrel.  With all due respect to an enlightened but
  inferior lexicographer I beg to submit that it is the first.
	   	            -- Ambrose Bierce, "The Devil's Dictionary"



^ permalink raw reply

* [PATCH] C99 initializers for drivers/char
From: Art Haas @ 2002-12-11 20:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

Hi.

Here's a small patchset that fixes various files under drivers/char to
use C99 initializers. The patch is against 2.5.51.

Art Haas

--- linux-2.5.51/drivers/char/rio/rio_linux.c.old	2002-10-19 11:21:27.000000000 -0500
+++ linux-2.5.51/drivers/char/rio/rio_linux.c	2002-12-10 13:51:11.000000000 -0600
@@ -276,8 +276,8 @@
  */
 
 static struct file_operations rio_fw_fops = {
-	owner:		THIS_MODULE,
-	ioctl:		rio_fw_ioctl,
+	.owner		= THIS_MODULE,
+	.ioctl		= rio_fw_ioctl,
 };
 
 struct miscdevice rio_fw_device = {
--- linux-2.5.51/drivers/char/ftape/zftape/zftape-init.c.old	2002-12-10 09:33:42.000000000 -0600
+++ linux-2.5.51/drivers/char/ftape/zftape/zftape-init.c	2002-12-10 13:51:11.000000000 -0600
@@ -96,13 +96,13 @@
 
 static struct file_operations zft_cdev =
 {
-	owner:		THIS_MODULE,
-	read:		zft_read,
-	write:		zft_write,
-	ioctl:		zft_ioctl,
-	mmap:		zft_mmap,
-	open:		zft_open,
-	release:	zft_close,
+	.owner		= THIS_MODULE,
+	.read		= zft_read,
+	.write		= zft_write,
+	.ioctl		= zft_ioctl,
+	.mmap		= zft_mmap,
+	.open		= zft_open,
+	.release	= zft_close,
 };
 
 /*      Open floppy tape device
--- linux-2.5.51/drivers/char/drm/ffb_drv.c.old	2002-07-05 18:42:27.000000000 -0500
+++ linux-2.5.51/drivers/char/drm/ffb_drv.c	2002-12-10 13:51:11.000000000 -0600
@@ -28,16 +28,16 @@
 
 #define DRIVER_FOPS						\
 static struct file_operations	DRM(fops) = {			\
-	owner:   		THIS_MODULE,			\
-	open:	 		DRM(open),			\
-	flush:	 		DRM(flush),			\
-	release: 		DRM(release),			\
-	ioctl:	 		DRM(ioctl),			\
-	mmap:	 		DRM(mmap),			\
-	read:	 		DRM(read),			\
-	fasync:	 		DRM(fasync),			\
-	poll:	 		DRM(poll),			\
-	get_unmapped_area:	ffb_get_unmapped_area,		\
+	.owner   		= THIS_MODULE,			\
+	.open	 		= DRM(open),			\
+	.flush	 		= DRM(flush),			\
+	.release 		= DRM(release),			\
+	.ioctl	 		= DRM(ioctl),			\
+	.mmap	 		= DRM(mmap),			\
+	.read	 		= DRM(read),			\
+	.fasync	 		= DRM(fasync),			\
+	.poll	 		= DRM(poll),			\
+	.get_unmapped_area	= ffb_get_unmapped_area,		\
 }
 
 #define DRIVER_COUNT_CARDS()	ffb_count_card_instances()
--- linux-2.5.51/drivers/char/mwave/mwavedd.c.old	2002-11-18 01:01:56.000000000 -0600
+++ linux-2.5.51/drivers/char/mwave/mwavedd.c	2002-12-10 13:51:11.000000000 -0600
@@ -429,12 +429,12 @@
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static struct file_operations mwave_fops = {
-	owner:THIS_MODULE,
-	read:mwave_read,
-	write:mwave_write,
-	ioctl:mwave_ioctl,
-	open:mwave_open,
-	release:mwave_close
+	.owner		= THIS_MODULE,
+	.read		= mwave_read,
+	.write		= mwave_write,
+	.ioctl		= mwave_ioctl,
+	.open		= mwave_open,
+	.release	= mwave_close
 };
 #else
 static struct file_operations mwave_fops = {
--- linux-2.5.51/drivers/char/watchdog/softdog.c.old	2002-11-22 19:45:01.000000000 -0600
+++ linux-2.5.51/drivers/char/watchdog/softdog.c	2002-12-10 13:51:11.000000000 -0600
@@ -139,7 +139,7 @@
 	unsigned int cmd, unsigned long arg)
 {
 	static struct watchdog_info ident = {
-		identity: "Software Watchdog",
+		.identity = "Software Watchdog",
 	};
 	switch (cmd) {
 		default:
@@ -158,17 +158,17 @@
 }
 
 static struct file_operations softdog_fops = {
-	owner:		THIS_MODULE,
-	write:		softdog_write,
-	ioctl:		softdog_ioctl,
-	open:		softdog_open,
-	release:	softdog_release,
+	.owner		= THIS_MODULE,
+	.write		= softdog_write,
+	.ioctl		= softdog_ioctl,
+	.open		= softdog_open,
+	.release	= softdog_release,
 };
 
 static struct miscdevice softdog_miscdev = {
-	minor:		WATCHDOG_MINOR,
-	name:		"watchdog",
-	fops:		&softdog_fops,
+	.minor		= WATCHDOG_MINOR,
+	.name		= "watchdog",
+	.fops		= &softdog_fops,
 };
 
 static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.06, soft_margin: %d sec, nowayout: %d\n";
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

^ permalink raw reply

* Firewall help
From: DeWet van Rooyen @ 2002-12-11 19:49 UTC (permalink / raw)
  To: netfilter

I installed a machine with Redhat 8 and are trying to set up a iptables
firewall with 2 internal segments (DMZ and internal network).
My machine have 3 Network cards.
 
 Is this possible ?
 
 I can seem to get all the segments to see each other. Can you give me an
 idea on how to do this. Is it just a question of routes / Nat and Arp
 entries ?
 
DMZ - 192.168.1.0 / 255.255.255.0
Internal Network / 192.168.2.0 / 255.255.255.0
For the external interface, I have 64 ip addresses - 255.255.255.192


^ permalink raw reply

* Re: [2.4]ALi M5451 sound hangs on init; workaround
From: Fedor Karpelevitch @ 2002-12-11 19:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: lkml, Vicente Aguilar, alsa-devel, Debian-Laptops
In-Reply-To: <1039635588.18587.8.camel@irongate.swansea.linux.org.uk>

> On Wed, 2002-12-11 at 18:36, Fedor Karpelevitch wrote:
> > almost as I posted before, just passing pointers to the read
> > method. It works, but the question as to what is this supposed to
> > affect remains...
>
> If I am reading the docs right then its just a thinko in the code
> and it is meant to be toggling that bit not whacking the entire
> register.

So I wonder what toggling those bits is supposed to change. I would 
test that somehow then


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/

^ permalink raw reply

* Re: [PATCH] intermezzo fixes for 2.5.50
From: Randy.Dunlap @ 2002-12-11 19:43 UTC (permalink / raw)
  To: Peter Braam; +Cc: torvalds, linux-kernel, intermezzo-devel
In-Reply-To: <20021211192105.GA1649@localhost.localdomain>

On Wed, 11 Dec 2002, Peter Braam wrote:

| Hello,
|
| Please find attached relatively straightforward fixes for intermezzo
| problems in 2.5.50.  I think all of them related to:
|  - two missing headers
|  - use of timespec instead of time_t.
|
| - Peter -


Patch doesn't apply cleanly to 2.5.51.
File include/linux/fsfilter.h is already in 2.5.51.

After ingoring above:  intermezzo doesn't build.
Makefile still contains io_daemon.o, but that should be deleted.

Patch for that is below.

-- 
~Randy



--- ./fs/intermezzo/Makefile%IMZ	Mon Dec  9 18:46:14 2002
+++ ./fs/intermezzo/Makefile	Wed Dec 11 11:40:55 2002
@@ -5,7 +5,7 @@
 obj-$(CONFIG_INTERMEZZO_FS) += intermezzo.o

 intermezzo-objs := cache.o dcache.o dir.o ext_attr.o file.o fileset.o \
-	           inode.o io_daemon.o journal.o journal_ext2.o journal_ext3.o \
+	           inode.o journal.o journal_ext2.o journal_ext3.o \
 	           journal_obdfs.o journal_reiserfs.o journal_tmpfs.o journal_xfs.o \
 	           kml_reint.o kml_unpack.o methods.o presto.o psdev.o replicator.o \
 	           super.o sysctl.o upcall.o vfs.o


^ permalink raw reply

* Re: Bug Report 2.4.20: Interrupt sharing bogus
From: Stephan von Krawczynski @ 2002-12-11 19:34 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, marcelo
In-Reply-To: <1039635955.18587.12.camel@irongate.swansea.linux.org.uk>

On 11 Dec 2002 19:45:55 +0000
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Wed, 2002-12-11 at 18:55, Stephan von Krawczynski wrote:
> > 4-port ethernet card. For tests I simply copy a lot of files via NFS to the
> > local hd. It always freezes the machine, not always ad-hoc, but within short.
> > I checked with 2.4.19 - same problem.
> > I can test patches on this, no production machine involved. Any hints appreciated.
> 
> Not all systems get on with the 4 ports and bridge stuff. Also make sure
> you have APIC disabled as the SiS io apic has some fun features 2.4
> doesnt yet have workarounds for

Is this sufficient? This is from my tried (bogus) setup:

CONFIG_X86_GOOD_APIC=y
# CONFIG_X86_UP_APIC is not set
# CONFIG_X86_UP_IOAPIC is not set

-- 
Regards,
Stephan


^ permalink raw reply

* Re: [2.4]ALi M5451 sound hangs on init; workaround
From: Alan Cox @ 2002-12-11 19:39 UTC (permalink / raw)
  To: Fedor Karpelevitch; +Cc: lkml, Vicente Aguilar, alsa-devel, Debian-Laptops
In-Reply-To: <200212111036.21771.fedor@apache.org>

On Wed, 2002-12-11 at 18:36, Fedor Karpelevitch wrote:
> almost as I posted before, just passing pointers to the read method.
> It works, but the question as to what is this supposed to affect 
> remains...

If I am reading the docs right then its just a thinko in the code and it
is meant to be toggling that bit not whacking the entire register.

^ permalink raw reply

* Re: 2.5 Changes doc update.
From: Robert Love @ 2002-12-11 19:46 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel
In-Reply-To: <20021211172559.GA8613@suse.de>

On Wed, 2002-12-11 at 12:25, Dave Jones wrote:

> Process scheduler improvements.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> - Another much talked about feature. Ingo Molnar reworked the process
>   scheduler to use an O(1) algorithm.  In operation, you should notice
>   no changes with low loads, and increased scalability with large numbers
>   of processes, especially on large SMP systems.
> - Robert Love wrote various utilities for changing behaviour of the
>   scheduler (binding processes to CPUs etc). You can find these tools at
>   http://tech9.net/rml/schedutils
> - Regressions to mingo@redhat.com and rml@tech9.net

Two notes here:

- The behavior of sched_yield() changed a lot.  A task that uses
  this system call should now expect to sleep for possibly a very
  long time.  Tasks that do not really desire to give up the
  processor for a while should probably not make heavy use of this
  function.  Unfortunately, some GUI programs (like Open Office)
  do make excessive use of this call and under load their
  performance is poor.  It seems this new 2.5 behavior is optimal
  but some user-space applications may need fixing.

- The above applies to use of yield() in the kernel, too.

- 2.5 adds system calls for manipulating a task's processor
  affinity: sched_getaffinity() and sched_setaffinity()

	Robert Love


^ permalink raw reply

* Re: [2.4]ALi M5451 sound hangs on init; workaround
From: Fedor Karpelevitch @ 2002-12-11 19:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: lkml, Vicente Aguilar, alsa-devel, Debian-Laptops
In-Reply-To: <1039635588.18587.8.camel@irongate.swansea.linux.org.uk>

> On Wed, 2002-12-11 at 18:36, Fedor Karpelevitch wrote:
> > almost as I posted before, just passing pointers to the read
> > method. It works, but the question as to what is this supposed to
> > affect remains...
>
> If I am reading the docs right then its just a thinko in the code
> and it is meant to be toggling that bit not whacking the entire
> register.

So I wonder what toggling those bits is supposed to change. I would 
test that somehow then

^ permalink raw reply

* Re: mounting udf DVD-RAM changes owner
From: Andries Brouwer @ 2002-12-11 19:43 UTC (permalink / raw)
  To: TomF; +Cc: linux-kernel
In-Reply-To: <20021211000033.3b9fe22a.TomF@sjpc.org>

On Wed, Dec 11, 2002 at 12:00:33AM -0800, TomF wrote:

> Before I mount a udf cartridge, I get
> 
> [Tom@localhost Tom]$ ls -l /mnt
> ...
> drwxr-xr-x    2 Tom      root         4096 Nov  5 11:20 dvd
> 
> [Tom@localhost Tom]$ mount /mnt/dvd
> [Tom@localhost Tom]$ ls -l /mnt
> ...
> drwxr-xr-x    4 root     root          140 Dec  6 19:13 dvd

Read mount(8), especially the sentence

       The
       previous contents (if any)  and  owner  and  mode  of  dir
       become  invisible, and as long as this file system remains
       mounted, the pathname dir refers to the root of  the  file
       system on device.


^ permalink raw reply

* Re: Why does C3 CPU downgrade in kernel 2.4.20?
From: Jeff Garzik @ 2002-12-11 19:42 UTC (permalink / raw)
  To: Bill Davidsen
  Cc: Alan Cox, Daniel Egger, Dave Jones, Joseph,
	Linux Kernel Mailing List
In-Reply-To: <Pine.LNX.3.96.1021211134909.19397B-100000@gatekeeper.tmr.com>

On Wed, Dec 11, 2002 at 01:51:13PM -0500, Bill Davidsen wrote:
> Is this the CPU in the $200 "Lindows" PC Wal-Mart is selling? I was
> thinking of one for a low volume router, and it looks as if there are two
> VIA chips called C3 (or advertizers have hacked the specs).

We don't know for sure; however the cnn.com story on these PCs had a
"Via C3" logo in the story's graphic, so it's strongly probable :)

^ permalink raw reply

* Re: 2.5 Changes doc update.
From: Robert Love @ 2002-12-11 19:42 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel
In-Reply-To: <20021211172559.GA8613@suse.de>

On Wed, 2002-12-11 at 12:25, Dave Jones wrote:

Nice work, Dave.

> - The bdflush() system call is still there and still just causes
>   the calling process to exit.  This strangeness is presumably there
>   to support people whose initscripts are trying to start the obsolete
>   'update' daemon. It's likely this will become deprecated and usage of
>   this will start logging messages to syslog.

This is now the case in 2.5-mm - bdflush() is deprecated and will print
a stern warning on use.

I suspect this will move to mainline shortly.

> Need checking.
> ~~~~~~~~~~~~~~
> - Someone reported evolution locks up when calender/tasks/contacts is selected.
>   Further digging has revealed a change to the getpeername syscall changed
>   behaviour. See http://lists.ximian.com/archives/public/evolution-hackers/2002-October/005218.html
>   for a patch to ORBit.

Yes, Evolution is broken.  The problem is actually ORBit.  I have talked
to Elliot Lee about this and we are not sure whether it is the kernel's
or ORBit's fault.  I originally thought it was ORBit's, but it is
looking like the kernel's to be honest.  The behavior of getpeername()
wrt to sun_path seems to of changed.  If any networking hacker wants to
look into it, please do :)

In the mean time, you CAN fix the problem by patching ORBit.  I have a
patch and RPM packages available at:

	http://tech9.net/rml/orbit/

Which works just fine for me.

	Robert Love


^ permalink raw reply

* Re: Destroying processes
From: Robert Love @ 2002-12-11 19:38 UTC (permalink / raw)
  To: Justin Hibbits; +Cc: linux-kernel
In-Reply-To: <20021211193049.GH147@lothlorien.cwru.edu>

On Wed, 2002-12-11 at 14:30, Justin Hibbits wrote:

> Ok, thanks for clearing that up.  My reasoning for wanting this is because a CD
> I had mounted with cdfs was screwed up in the mount (file sizes were
> misreported, etc), and I couldn't umount it, even tho I could eject it with
> cdrecord -eject.  The umount process then went to sleep (with teh 'D' showing
> in ps/top), and I couldn't use that drive again until after a reboot.  That's
> when I got the idea that I should be able to destroy the process completely,
> annihilating everything with it, destroying any connections it has with the
> kernel, etc.  I guess it's a bad idea, given your statement :P

Yah you do not want to be able to kill that hung task.

At the same time, this is a cdfs so we DO want to fix that. I.e., while
it is unsafe and not clean to kill a sleeping task, you should never
need to.  So this bug should be fixed.

	Robert Love


^ permalink raw reply

* Re: Destroying processes
From: Justin Hibbits @ 2002-12-11 19:30 UTC (permalink / raw)
  To: Robert Love; +Cc: linux-kernel
In-Reply-To: <1039634515.833.57.camel@phantasy>

On Wed, Dec 11, 2002 at 02:21:55PM -0500, Robert Love wrote:
> Cases where kill -9 fail to work are cases where it is supposed to fail.
> 
> You cannot kill zombies, that would break POSIX compliance when the
> parent's called wait.  If you task's parents are not properly calling
> wait() that is an application bug.  If the parent exits, the children
> should be reparented to init and init will reap them via wait().
> 
> You also cannot kill tasks that are sleeping (D in ps/top).  They may
> hold a semaphore or otherwise be in the middle of a critical section. 
> Killing them would be bad bad bad.
> 
> 	Robert Love

Ok, thanks for clearing that up.  My reasoning for wanting this is because a CD
I had mounted with cdfs was screwed up in the mount (file sizes were
misreported, etc), and I couldn't umount it, even tho I could eject it with
cdrecord -eject.  The umount process then went to sleep (with teh 'D' showing
in ps/top), and I couldn't use that drive again until after a reboot.  That's
when I got the idea that I should be able to destroy the process completely,
annihilating everything with it, destroying any connections it has with the
kernel, etc.  I guess it's a bad idea, given your statement :P

Anyway, thanks for the reply,

Justin

-- 
Registered Linux user 260206

"One World, One Web, One Program"
	- Microsoft Promo Ad
"Ein Volk, Ein Reich, Ein Fuhrer"
	- Adolf Hitler

I'm not paranoid.  They really *are* out to get me!


^ permalink raw reply

* flock patch for 2.5.51
From: Mark Wong @ 2002-12-11 19:20 UTC (permalink / raw)
  To: willy; +Cc: linux-fsdevel

Hi again, would it be possible to get your patch for the flock stuff
upated for 2.5.51?  It's ok if the NFS stuff still isn't working right.

Thanks,
Mark

-- 
Mark Wong - - markw@osdl.org
Open Source Development Lab Inc - A non-profit corporation
15275 SW Koll Parkway - Suite H - Beaverton OR, 97006
(503)-626-2455 x 32 (office)
(503)-626-2436      (fax)
http://www.osdl.org/archive/markw/


^ permalink raw reply

* Re: how do you successful compile or install 2.5.50?
From: Philippe Gramoullé @ 2002-12-11 19:23 UTC (permalink / raw)
  To: eric lin; +Cc: linux-kernel
In-Reply-To: <3DF5EC8E.9050603@centurytel.net>

On Tue, 10 Dec 2002 06:30:54 -0700
eric lin <fsshl@centurytel.net> wrote:


You might want to give 2.5.51 a try as i successfully buit it and modules have been working fine
(you need latest modules tools found here:

  | On Tue, 10 Dec 2002 18:04:27 +1100
  | Rusty Russell <rusty@rustcorp.com.au> wrote:

  |  Hi all,
  |  
  |  	module-init-tools 0.9.3 and the associated RPM
  |  modutils-2.4.21-7.src.rpm are out.
  |  
  |  	http://www.[CC].kernel.org/pub/linux/kernel/people/rusty/modules/

Bye

Philippe.

# uname -a
Linux test 2.5.51 #5 SMP Wed Dec 11 19:05:40 CET 2002 i686 unknown unknown GNU/Linux

# lsmod

Module                  Size  Used by
dummy                   1720  1
hid                    21186  0
sb_lib                 43181  0 [permanent]
uart401                 8461  1 sb_lib
sound                  74003  2 sb_lib uart401
uhci_hcd               27941  0
usbcore                88471  4 hid uhci_hcd
nls_utf8                1230  0
smbfs                  58934  0
ymfpci                 46876  0
ac97_codec             11702  1 ymfpci [permanent]
soundcore               6306  3 sb_lib sound ymfpci
nfs                   122403  0
nfsd                  112661  0
exportfs                4558  1 nfsd [permanent]
lockd                  58356  2 nfs nfsd
sunrpc                101860  3 nfs nfsd lockd


  |  
  |     I just wonder how do you successful compile or install that 2.5.50? 
  |  do you meet error at make modules?  if yes, how do you do ?(modify by 
  |  yourself or postto author or public waiting for reply?)
  |  
  |     highly appreciate your experience on compile or install new kernel 
  |  especailly experiamental kernel
  |  
  |  sincere ERic
  |  www.linuxspice.com
  |  linux pc for sale
  |  
  |  -
  |  To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
  |  the body of a message to majordomo@vger.kernel.org
  |  More majordomo info at  http://vger.kernel.org/majordomo-info.html
  |  Please read the FAQ at  http://www.tux.org/lkml/
  |  

^ permalink raw reply

* Re: Destroying processes
From: Robert Love @ 2002-12-11 19:21 UTC (permalink / raw)
  To: Justin Hibbits; +Cc: linux-kernel
In-Reply-To: <20021211190132.GF147@lothlorien.cwru.edu>

On Wed, 2002-12-11 at 14:01, Justin Hibbits wrote:

> Is there a system call that would destroy a process?  Sometimes I end up with
> zombie processes, other times I end up with a process attaching to a device
> driver, and hanging, so I want to be able to completely destroy the
> process...image, file handle, driver hooks, everything.  If there isn't one,
> and noone wants to do it, I'll gladly do it (may take a few weeks tho).  I just
> don't wanna do what someone else has already done.

Cases where kill -9 fail to work are cases where it is supposed to fail.

You cannot kill zombies, that would break POSIX compliance when the
parent's called wait.  If you task's parents are not properly calling
wait() that is an application bug.  If the parent exits, the children
should be reparented to init and init will reap them via wait().

You also cannot kill tasks that are sleeping (D in ps/top).  They may
hold a semaphore or otherwise be in the middle of a critical section. 
Killing them would be bad bad bad.

	Robert Love


^ permalink raw reply

* Re: Destroying processes
From: Richard B. Johnson @ 2002-12-11 19:24 UTC (permalink / raw)
  To: Justin Hibbits; +Cc: linux-kernel
In-Reply-To: <20021211190132.GF147@lothlorien.cwru.edu>

On Wed, 11 Dec 2002, Justin Hibbits wrote:

> Hey 00ber-geeks,
> 
> I'm not subscribed (yet....still too lazy to subscribe ;P ), but I have a
> question and/or suggestion.
> 
> Is there a system call that would destroy a process?  Sometimes I end up with
> zombie processes, other times I end up with a process attaching to a device
> driver, and hanging, so I want to be able to completely destroy the
> process...image, file handle, driver hooks, everything.  If there isn't one,
> and noone wants to do it, I'll gladly do it (may take a few weeks tho).  I just
> don't wanna do what someone else has already done.
> 
> Thanks,
> 
> Justin Hibbits

A process gets destroyed when it calls exit() (actually sys_exit()
in the kernel). However, in Unix/Linux machines, it will wait until
somebody executes wait(), wait3(), or similar procedures to get the
return status of the task. A task that is waiting to be "reaped"
in this manner is called a zombie task and it shows up in `ps` with
a state of "Z".

If you have zombie tasks, they are caused by incorrectly written
programs that fork() child tasks without either setting up a signal
handler for SIGCHLD or, at least executing a wait() to get the
return status. The zombie must be reaped by its parent. This means
that if the parent task didn't do this, or no longer exists, the
zombie will remain until all possible parents (parents of parents)
exit. In that case, the parent of a parents, "init" will (should)
reap the status of the child and throw it away.

So, if you run programs that create zombies, the zombies should
go away as soon as you log-off. If you are running from X-Windows,
you may need to get out of X completely. If the zombies don't go away,
you have a broken `init` which should be replaced. You need to add
the proper code to programs that execute fork(), so that they don't
generate zombies.

Programs that exit always end up closing all file-handles. The kernel
does this automatically. Therefore, there should never be any hung
processes attaching a device driver unless there are errors inside
the device driver. In that case, you need to fix the device driver.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply

* [PATCH] intermezzo fixes for 2.5.50
From: Peter Braam @ 2002-12-11 19:21 UTC (permalink / raw)
  To: torvalds, linux-kernel, intermezzo-devel, rddunlap

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Hello, 

Please find attached relatively straightforward fixes for intermezzo
problems in 2.5.50.  I think all of them related to:
 - two missing headers
 - use of timespec instead of time_t.

- Peter -

[-- Attachment #2: intermezzo.patch --]
[-- Type: text/plain, Size: 36082 bytes --]


patches to be applied to specific kernels to get intermezzo working


 fs/intermezzo/dir.c            |    6 
 fs/intermezzo/file.c           |    2 
 fs/intermezzo/journal.c        |   12 +
 fs/intermezzo/kml_reint.c      |   42 +++--
 fs/intermezzo/kml_unpack.c     |   12 +
 fs/intermezzo/presto.c         |    6 
 fs/intermezzo/replicator.c     |    3 
 fs/intermezzo/vfs.c            |    4 
 include/linux/fsfilter.h       |  134 ++++++++++++++++++
 include/linux/intermezzo_fs.h  |    2 
 include/linux/intermezzo_idl.h |  304 +++++++++++++++++++++++++++++++++++++++++
 include/linux/intermezzo_lib.h |  168 ++++++++++++++++++++++
 12 files changed, 663 insertions(+), 32 deletions(-)

--- linux-2.5.50/fs/intermezzo/dir.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/dir.c	Tue Dec 10 20:53:33 2002
@@ -342,7 +342,7 @@ int presto_setattr(struct dentry *de, st
         int error;
         struct presto_cache *cache;
         struct presto_file_set *fset;
-        struct lento_vfs_context info = { 0, 0, 0 };
+        struct lento_vfs_context info = { 0, {0}, 0 };
 
         ENTRY;
 
@@ -358,8 +358,8 @@ int presto_setattr(struct dentry *de, st
         CDEBUG(D_INODE, "valid %#x, mode %#o, uid %u, gid %u, size %Lu, "
                "atime %lu mtime %lu ctime %lu flags %d\n",
                iattr->ia_valid, iattr->ia_mode, iattr->ia_uid, iattr->ia_gid,
-               iattr->ia_size, iattr->ia_atime, iattr->ia_mtime,
-               iattr->ia_ctime, iattr->ia_attr_flags);
+               iattr->ia_size, iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec,
+               iattr->ia_ctime.tv_sec, iattr->ia_attr_flags);
         
         if ( presto_get_permit(de->d_inode) < 0 ) {
                 EXIT;
--- linux-2.5.50/fs/intermezzo/file.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/file.c	Tue Dec 10 20:53:33 2002
@@ -61,7 +61,7 @@ extern int presto_permission(struct inod
 
 static int presto_open_upcall(int minor, struct dentry *de)
 {
-        int rc;
+        int rc = 0;
         char *path, *buffer;
         struct presto_file_set *fset;
         int pathlen;
--- linux-2.5.50/fs/intermezzo/journal.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/journal.c	Tue Dec 10 20:59:09 2002
@@ -363,8 +363,10 @@ static inline char *log_dentry_version(c
 
         presto_getversion(&version, dentry->d_inode);
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
@@ -376,8 +378,10 @@ static inline char *log_version(char *bu
 
         memcpy(&version, pv, sizeof(version));
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
--- linux-2.5.50/fs/intermezzo/kml_reint.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/kml_reint.c	Tue Dec 10 21:08:12 2002
@@ -100,7 +100,8 @@ static inline int version_equal(struct p
                 return 0;
         }
 
-        if (inode->i_mtime == a->pv_mtime &&
+        if (inode->i_mtime.tv_sec == a->pv_mtime_sec &&
+            inode->i_mtime.tv_nsec == a->pv_mtime_nsec &&
             (S_ISDIR(inode->i_mode) || inode->i_size == a->pv_size))
                 return 1;
 
@@ -126,8 +127,10 @@ static int reint_close(struct kml_rec *r
                 struct iattr iattr;
 
                 iattr.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_SIZE;
-                iattr.ia_mtime = (time_t)rec->new_objectv->pv_mtime;
-                iattr.ia_ctime = (time_t)rec->new_objectv->pv_ctime;
+                iattr.ia_mtime.tv_sec = (time_t)rec->new_objectv->pv_mtime_sec;
+                iattr.ia_mtime.tv_nsec = (time_t)rec->new_objectv->pv_mtime_nsec;
+                iattr.ia_ctime.tv_sec = (time_t)rec->new_objectv->pv_ctime_sec;
+                iattr.ia_ctime.tv_nsec = (time_t)rec->new_objectv->pv_ctime_nsec;
                 iattr.ia_size = (time_t)rec->new_objectv->pv_size;
 
                 /* no kml record, but update last rcvd */
@@ -144,7 +147,8 @@ static int reint_close(struct kml_rec *r
         } else {
                 int minor = presto_f2m(fset);
 
-                info.updated_time = rec->new_objectv->pv_mtime;
+                info.updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+                info.updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
                 memcpy(&info.remote_version, rec->old_objectv, 
                        sizeof(*rec->old_objectv));
                 info.remote_ino = rec->ino;
@@ -180,7 +184,8 @@ static int reint_create(struct kml_rec *
         int     error;        ENTRY;
 
         CDEBUG (D_KML, "=====REINT_CREATE::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_create(rec->path, rec->mode, info);
         pop_ctxt(&saved_ctxt); 
@@ -198,7 +203,8 @@ static int reint_link(struct kml_rec *re
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_LINK::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_link(rec->path, rec->target, info);
         pop_ctxt(&saved_ctxt); 
@@ -216,7 +222,8 @@ static int reint_mkdir(struct kml_rec *r
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_MKDIR::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_mkdir(rec->path, rec->mode, info);
         pop_ctxt(&saved_ctxt); 
@@ -234,7 +241,8 @@ static int reint_mknod(struct kml_rec *r
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_MKNOD::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
 
         dev = rec->rdev ?: MKDEV(rec->major, rec->minor);
@@ -262,7 +270,8 @@ static int reint_rename(struct kml_rec *
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_RENAME::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_rename(rec->path, rec->target, info);
         pop_ctxt(&saved_ctxt); 
@@ -287,7 +296,8 @@ static int reint_rmdir(struct kml_rec *r
         }
 
         CDEBUG (D_KML, "=====REINT_RMDIR::%s\n", path);
-        info->updated_time = rec->new_parentv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_parentv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_parentv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_rmdir(path, info);
         pop_ctxt(&saved_ctxt); 
@@ -311,8 +321,10 @@ static int reint_setattr(struct kml_rec 
         iattr.ia_uid   = (uid_t)rec->uid;
         iattr.ia_gid   = (gid_t)rec->gid;
         iattr.ia_size  = (off_t)rec->size;
-        iattr.ia_ctime = (time_t)rec->ctime;
-        iattr.ia_mtime = (time_t)rec->mtime;
+        iattr.ia_ctime.tv_sec = rec->ctime_sec;
+        iattr.ia_ctime.tv_nsec = rec->ctime_nsec;
+        iattr.ia_mtime.tv_sec = rec->mtime_sec;
+        iattr.ia_mtime.tv_nsec = rec->mtime_nsec;
         iattr.ia_atime = iattr.ia_mtime; /* We don't track atimes. */
         iattr.ia_attr_flags = rec->flags;
 
@@ -334,7 +346,8 @@ static int reint_symlink(struct kml_rec 
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_SYMLINK::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_symlink(rec->target, rec->path, info);
         pop_ctxt(&saved_ctxt); 
@@ -359,7 +372,8 @@ static int reint_unlink(struct kml_rec *
         }
 
         CDEBUG (D_KML, "=====REINT_UNLINK::%s\n", path);
-        info->updated_time = rec->new_parentv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_parentv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_parentv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_unlink(path, info);
         pop_ctxt(&saved_ctxt); 
--- linux-2.5.50/fs/intermezzo/kml_unpack.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/kml_unpack.c	Tue Dec 10 21:12:16 2002
@@ -67,8 +67,10 @@ int kml_unpack_version(struct presto_ver
 
 	UNLOGP(*ver, struct presto_version, ptr, end);
         pv = *ver;
-        pv->pv_mtime   = NTOH__u64(pv->pv_mtime);
-        pv->pv_ctime   = NTOH__u64(pv->pv_ctime);
+        pv->pv_mtime_sec   = NTOH__u32(pv->pv_mtime_sec);
+        pv->pv_mtime_nsec   = NTOH__u32(pv->pv_mtime_nsec);
+        pv->pv_ctime_sec   = NTOH__u32(pv->pv_ctime_sec);
+        pv->pv_ctime_nsec   = NTOH__u32(pv->pv_ctime_nsec);
         pv->pv_size    = NTOH__u64(pv->pv_size);
 
 	*buf = ptr;
@@ -247,8 +249,10 @@ static int kml_unpack_setattr(struct kml
 	LUNLOGV(rec->uid, __u32, ptr, end);
 	LUNLOGV(rec->gid, __u32, ptr, end);
 	LUNLOGV(rec->size, __u64, ptr, end);
-	LUNLOGV(rec->mtime, __u64, ptr, end);
-	LUNLOGV(rec->ctime, __u64, ptr, end);
+	LUNLOGV(rec->mtime_sec, __u32, ptr, end);
+	LUNLOGV(rec->mtime_nsec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_sec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_nsec, __u32, ptr, end);
 	LUNLOGV(rec->flags, __u32, ptr, end);
         LUNLOGV(rec->old_mode, __u32, ptr, end);
         LUNLOGV(rec->old_rdev, __u32, ptr, end);
--- linux-2.5.50/fs/intermezzo/presto.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/presto.c	Tue Dec 10 21:13:20 2002
@@ -627,8 +627,10 @@ int presto_put_permit(struct inode * ino
 void presto_getversion(struct presto_version * presto_version,
                        struct inode * inode)
 {
-        presto_version->pv_mtime = (__u64)inode->i_mtime;
-        presto_version->pv_ctime = (__u64)inode->i_ctime;
+        presto_version->pv_mtime_sec = inode->i_mtime.tv_sec;
+        presto_version->pv_mtime_nsec = inode->i_mtime.tv_nsec;
+        presto_version->pv_ctime_sec = inode->i_ctime.tv_sec;
+        presto_version->pv_ctime_nsec = inode->i_ctime.tv_nsec;
         presto_version->pv_size  = (__u64)inode->i_size;
 }
 
--- linux-2.5.50/fs/intermezzo/replicator.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/replicator.c	Tue Dec 10 21:15:33 2002
@@ -29,7 +29,8 @@
 #include <asm/uaccess.h>
 
 #include <linux/errno.h>
-
+#include <linux/fs.h>
+#include <linux/fsfilter.h>
 #include <linux/intermezzo_fs.h>
 
 /*
--- linux-2.5.50/fs/intermezzo/vfs.c~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/fs/intermezzo/vfs.c	Tue Dec 10 21:17:06 2002
@@ -186,7 +186,7 @@ inline void presto_debug_fail_blkdev(str
 
         if (errorval && errorval == (long)value && !is_read_only(dev)) {
                 CDEBUG(D_SUPER, "setting device %s read only\n", kdevname(dev));
-                BLKDEV_FAIL(dev, 1);
+                BLKDEV_FAIL(kdev_val(dev), 1);
                 izo_channels[minor].uc_errorval = -kdev_val(dev);
         }
 }
@@ -475,7 +475,7 @@ int lento_setattr(const char *name, stru
                name, iattr->ia_valid, iattr->ia_mode, iattr->ia_uid,
                iattr->ia_gid, iattr->ia_size);
         CDEBUG(D_PIOCTL, "atime %#lx, mtime %#lx, ctime %#lx, attr_flags %#x\n",
-               iattr->ia_atime, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
+               iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
                iattr->ia_attr_flags);
         CDEBUG(D_PIOCTL, "offset %d, recno %d, flags %#x\n",
                info->slot_offset, info->recno, info->flags);
--- /dev/null	Fri Aug 30 17:31:37 2002
+++ linux-2.5.50-root/include/linux/fsfilter.h	Wed Nov 27 15:35:47 2002
@@ -0,0 +1,134 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
+
+#ifndef __FILTER_H_
+#define __FILTER_H_ 1
+
+#ifdef __KERNEL__
+
+/* cachetype.c */
+
+/* 
+ * it is important that things like inode, super and file operations
+ * for intermezzo are not defined statically.  If methods are NULL
+ * the VFS takes special action based on that.  Given that different
+ * cache types have NULL ops at different slots, we must install opeation 
+ * talbes for InterMezzo with NULL's in the same spot
+ */
+
+struct filter_ops { 
+        struct super_operations filter_sops;
+
+        struct inode_operations filter_dir_iops;
+        struct inode_operations filter_file_iops;
+        struct inode_operations filter_sym_iops;
+
+        struct file_operations filter_dir_fops;
+        struct file_operations filter_file_fops;
+        struct file_operations filter_sym_fops;
+
+        struct dentry_operations filter_dentry_ops;
+};
+
+struct cache_ops {
+        /* operations on the file store */
+        struct super_operations *cache_sops;
+
+        struct inode_operations *cache_dir_iops;
+        struct inode_operations *cache_file_iops;
+        struct inode_operations *cache_sym_iops;
+
+        struct file_operations *cache_dir_fops;
+        struct file_operations *cache_file_fops;
+        struct file_operations *cache_sym_fops;
+
+        struct dentry_operations *cache_dentry_ops;
+};
+
+
+#define FILTER_DID_SUPER_OPS 0x1
+#define FILTER_DID_INODE_OPS 0x2
+#define FILTER_DID_FILE_OPS 0x4
+#define FILTER_DID_DENTRY_OPS 0x8
+#define FILTER_DID_DEV_OPS 0x10
+#define FILTER_DID_SYMLINK_OPS 0x20
+#define FILTER_DID_DIR_OPS 0x40
+
+struct filter_fs {
+        int o_flags;
+        struct filter_ops o_fops;
+        struct cache_ops  o_caops;
+        struct journal_ops *o_trops;
+        struct snapshot_ops *o_snops;
+};
+
+#define FILTER_FS_TYPES 6
+#define FILTER_FS_EXT2 0
+#define FILTER_FS_EXT3 1
+#define FILTER_FS_REISERFS 2
+#define FILTER_FS_XFS 3
+#define FILTER_FS_OBDFS 4
+#define FILTER_FS_TMPFS 5
+extern struct filter_fs filter_oppar[FILTER_FS_TYPES];
+
+struct filter_fs *filter_get_filter_fs(const char *cache_type);
+void filter_setup_journal_ops(struct filter_fs *ops, char *cache_type);
+inline struct super_operations *filter_c2usops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2ufiops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2udiops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2usiops(struct filter_fs *cache);
+inline struct file_operations *filter_c2uffops(struct filter_fs *cache);
+inline struct file_operations *filter_c2udfops(struct filter_fs *cache);
+inline struct file_operations *filter_c2usfops(struct filter_fs *cache);
+inline struct super_operations *filter_c2csops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2cfiops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2cdiops(struct filter_fs *cache);
+inline struct inode_operations *filter_c2csiops(struct filter_fs *cache);
+inline struct file_operations *filter_c2cffops(struct filter_fs *cache);
+inline struct file_operations *filter_c2cdfops(struct filter_fs *cache);
+inline struct file_operations *filter_c2csfops(struct filter_fs *cache);
+inline struct dentry_operations *filter_c2cdops(struct filter_fs *cache);
+inline struct dentry_operations *filter_c2udops(struct filter_fs *cache);
+
+void filter_setup_super_ops(struct filter_fs *cache, struct super_operations *cache_ops, struct super_operations *filter_sops);
+void filter_setup_dir_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *ffops);
+void filter_setup_file_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *filter_op);
+void filter_setup_symlink_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *filter_op);
+void filter_setup_dentry_ops(struct filter_fs *cache, struct dentry_operations *cache_dop,  struct dentry_operations *filter_dop);
+
+
+#define PRESTO_DEBUG
+#ifdef PRESTO_DEBUG
+/* debugging masks */
+#define D_SUPER     1  
+#define D_INODE     2   /* print entry and exit into procedure */
+#define D_FILE      4
+#define D_CACHE     8   /* cache debugging */
+#define D_MALLOC    16  /* print malloc, de-alloc information */
+#define D_JOURNAL   32
+#define D_UPCALL    64  /* up and downcall debugging */
+#define D_PSDEV    128
+#define D_PIOCTL   256
+#define D_SPECIAL  512
+#define D_TIMING  1024
+#define D_DOWNCALL 2048
+
+#define FDEBUG(mask, format, a...)                                      \
+        do {                                                            \
+                if (filter_debug & mask) {                              \
+                        printk("(%s,l. %d): ", __FUNCTION__, __LINE__); \
+                        printk(format, ##a); }                          \
+        } while (0)
+
+#define FENTRY                                                          \
+        if(filter_print_entry)                                          \
+                printk("Process %d entered %s\n", current->pid, __FUNCTION__)
+
+#define FEXIT                                                           \
+        if(filter_print_entry)                                          \
+                printk("Process %d leaving %s at %d\n", current->pid,   \
+                       __FUNCTION__,__LINE__)
+#endif
+#endif
+#endif
--- linux-2.5.50/include/linux/intermezzo_fs.h~intermezzo	Tue Dec 10 20:53:33 2002
+++ linux-2.5.50-root/include/linux/intermezzo_fs.h	Tue Dec 10 20:53:33 2002
@@ -39,7 +39,7 @@ typedef __u8 uuid_t[16];
 
 struct lento_vfs_context {
         __u64 kml_offset;
-        __u64 updated_time;
+        struct timespec updated_time;
         __u64 remote_ino;
         __u64 remote_generation;
         __u32 slot_offset;
--- /dev/null	Fri Aug 30 17:31:37 2002
+++ linux-2.5.50-root/include/linux/intermezzo_idl.h	Tue Dec 10 21:10:33 2002
@@ -0,0 +1,304 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
+ *  Copyright (C) 2001 Tacit Networks, Inc.
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __INTERMEZZO_IDL_H__
+#define __INTERMEZZO_IDL_H__
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+/* this file contains all data structures used in InterMezzo's interfaces:
+ * - upcalls
+ * - ioctl's
+ * - KML records
+ * - RCVD records
+ * - rpc's
+ */ 
+
+/* UPCALL */
+#define INTERMEZZO_MINOR 248   
+
+
+#define IZO_UPC_VERSION 0x00010002
+#define IZO_UPC_PERMIT        1
+#define IZO_UPC_CONNECT       2
+#define IZO_UPC_GO_FETCH_KML  3
+#define IZO_UPC_OPEN          4
+#define IZO_UPC_REVOKE_PERMIT 5
+#define IZO_UPC_KML           6
+#define IZO_UPC_BACKFETCH     7
+#define IZO_UPC_KML_TRUNC     8
+#define IZO_UPC_SET_KMLSIZE   9
+#define IZO_UPC_BRANCH_UNDO   10
+#define IZO_UPC_BRANCH_REDO   11
+#define IZO_UPC_GET_FILEID    12
+#define IZO_UPC_CLIENT_MAKE_BRANCH    13
+#define IZO_UPC_SERVER_MAKE_BRANCH    14
+#define IZO_UPC_REPSTATUS    15
+
+#define IZO_UPC_LARGEST_OPCODE 15
+
+struct izo_upcall_hdr {
+        __u32 u_len;
+        __u32 u_version;
+        __u32 u_opc;
+        __u32 u_uniq;
+        __u32 u_pid;
+        __u32 u_uid;
+        __u32 u_pathlen;
+        __u32 u_fsetlen;
+        __u64 u_offset;
+        __u64 u_length;
+        __u32 u_first_recno;
+        __u32 u_last_recno;
+        __u32 u_async;
+        __u32 u_reclen;
+        __u8  u_uuid[16];
+};
+
+/* This structure _must_ sit at the beginning of the buffer */
+struct izo_upcall_resp {
+        __u32 opcode;
+        __u32 unique;    
+        __u32 result;
+};
+
+
+/* IOCTL */
+
+#define IZO_IOCTL_VERSION 0x00010003
+
+/* maximum size supported for ioc_pbuf1 */
+#define KML_MAX_BUF (64*1024)
+
+struct izo_ioctl_hdr { 
+        __u32  ioc_len;
+        __u32  ioc_version;
+};
+
+struct izo_ioctl_data {
+        __u32 ioc_len;
+        __u32 ioc_version;
+        __u32 ioc_izodev;
+        __u32 ioc_kmlrecno;
+        __u64 ioc_kmlsize;
+        __u32 ioc_flags;
+        __s32 ioc_inofd;
+        __u64 ioc_ino;
+        __u64 ioc_generation;
+        __u32 ioc_mark_what;
+        __u32 ioc_and_flag;
+        __u32 ioc_or_flag;
+        __u32 ioc_dev;
+        __u32 ioc_offset;
+        __u32 ioc_slot;
+        __u64 ioc_uid;
+        __u8  ioc_uuid[16];
+
+        __u32 ioc_inllen1;   /* path */
+        char *ioc_inlbuf1;
+        __u32 ioc_inllen2;   /* fileset */
+        char *ioc_inlbuf2;
+
+        __u32 ioc_plen1;     /* buffers in user space (KML) */
+        char *ioc_pbuf1;
+        __u32 ioc_plen2;     /* buffers in user space (KML) */
+        char *ioc_pbuf2;
+
+        char  ioc_bulk[0];
+};
+
+#define IZO_IOC_DEVICE          _IOW ('p',0x50, void *)
+#define IZO_IOC_REINTKML        _IOW ('p',0x51, void *)
+#define IZO_IOC_GET_RCVD        _IOW ('p',0x52, void *)
+#define IZO_IOC_SET_IOCTL_UID   _IOW ('p',0x53, void *)
+#define IZO_IOC_GET_KML_SIZE    _IOW ('p',0x54, void *)
+#define IZO_IOC_PURGE_FILE_DATA _IOW ('p',0x55, void *)
+#define IZO_IOC_CONNECT         _IOW ('p',0x56, void *)
+#define IZO_IOC_GO_FETCH_KML    _IOW ('p',0x57, void *)
+#define IZO_IOC_MARK            _IOW ('p',0x58, void *)
+#define IZO_IOC_CLEAR_FSET      _IOW ('p',0x59, void *)
+#define IZO_IOC_CLEAR_ALL_FSETS _IOW ('p',0x60, void *)
+#define IZO_IOC_SET_FSET        _IOW ('p',0x61, void *)
+#define IZO_IOC_REVOKE_PERMIT   _IOW ('p',0x62, void *)
+#define IZO_IOC_SET_KMLSIZE     _IOW ('p',0x63, void *)
+#define IZO_IOC_CLIENT_MAKE_BRANCH _IOW ('p',0x64, void *)
+#define IZO_IOC_SERVER_MAKE_BRANCH _IOW ('p',0x65, void *)
+#define IZO_IOC_BRANCH_UNDO    _IOW ('p',0x66, void *)
+#define IZO_IOC_BRANCH_REDO    _IOW ('p',0x67, void *)
+#define IZO_IOC_SET_PID        _IOW ('p',0x68, void *)
+#define IZO_IOC_SET_CHANNEL    _IOW ('p',0x69, void *)
+#define IZO_IOC_GET_CHANNEL    _IOW ('p',0x70, void *)
+#define IZO_IOC_GET_FILEID    _IOW ('p',0x71, void *)
+#define IZO_IOC_ADJUST_LML    _IOW ('p',0x72, void *)
+#define IZO_IOC_SET_FILEID    _IOW ('p',0x73, void *)
+#define IZO_IOC_REPSTATUS    _IOW ('p',0x74, void *)
+
+/* marking flags for fsets */
+#define FSET_CLIENT_RO        0x00000001
+#define FSET_LENTO_RO         0x00000002
+#define FSET_HASPERMIT        0x00000004 /* we have a permit to WB */
+#define FSET_INSYNC           0x00000008 /* this fileset is in sync */
+#define FSET_PERMIT_WAITING   0x00000010 /* Lento is waiting for permit */
+#define FSET_STEAL_PERMIT     0x00000020 /* take permit if Lento is dead */
+#define FSET_JCLOSE_ON_WRITE  0x00000040 /* Journal closes on writes */
+#define FSET_DATA_ON_DEMAND   0x00000080 /* update data on file_open() */
+#define FSET_PERMIT_EXCLUSIVE 0x00000100 /* only one permitholder allowed */
+#define FSET_HAS_BRANCHES     0x00000200 /* this fileset contains branches */
+#define FSET_IS_BRANCH        0x00000400 /* this fileset is a branch */
+#define FSET_FLAT_BRANCH      0x00000800 /* this fileset is ROOT with branches */
+
+/* what to mark indicator (ioctl parameter) */
+#define MARK_DENTRY   101
+#define MARK_FSET     102
+#define MARK_CACHE    103
+#define MARK_GETFL    104
+
+/* KML */
+
+#define KML_MAJOR_VERSION 0x00010000
+#define KML_MINOR_VERSION 0x00000002
+#define KML_OPCODE_NOOP          0
+#define KML_OPCODE_CREATE        1
+#define KML_OPCODE_MKDIR         2
+#define KML_OPCODE_UNLINK        3
+#define KML_OPCODE_RMDIR         4
+#define KML_OPCODE_CLOSE         5
+#define KML_OPCODE_SYMLINK       6
+#define KML_OPCODE_RENAME        7
+#define KML_OPCODE_SETATTR       8
+#define KML_OPCODE_LINK          9
+#define KML_OPCODE_OPEN          10
+#define KML_OPCODE_MKNOD         11
+#define KML_OPCODE_WRITE         12
+#define KML_OPCODE_RELEASE       13
+#define KML_OPCODE_TRUNC         14
+#define KML_OPCODE_SETEXTATTR    15
+#define KML_OPCODE_DELEXTATTR    16
+#define KML_OPCODE_KML_TRUNC     17
+#define KML_OPCODE_GET_FILEID    18
+#define KML_OPCODE_NUM           19
+/* new stuff */
+struct presto_version {
+        __u32 pv_mtime_sec;
+        __u32 pv_mtime_nsec;
+        __u32 pv_ctime_sec;
+        __u32 pv_ctime_nsec;
+        __u64 pv_size;
+};
+
+struct kml_prefix_hdr {
+        __u32                    len;
+        __u32                    version;
+        __u32                    pid;
+        __u32                    auid;
+        __u32                    fsuid;
+        __u32                    fsgid;
+        __u32                    opcode;
+        __u32                    ngroups;
+};
+
+struct kml_prefix { 
+        struct kml_prefix_hdr    *hdr;
+        __u32                    *groups;
+};
+
+struct kml_suffix { 
+        __u32                    prevrec;
+        __u32                    recno;
+        __u32                    time;
+        __u32                    len;
+};
+
+struct kml_rec {
+        char                   *buf;
+        struct kml_prefix       prefix;
+        __u64                   offset;
+        char                   *path;
+        int                     pathlen;
+        char                   *name;
+        int                     namelen;
+        char                   *target;
+        int                     targetlen;
+        struct presto_version  *old_objectv;
+        struct presto_version  *new_objectv;
+        struct presto_version  *old_parentv;
+        struct presto_version  *new_parentv;
+        struct presto_version  *old_targetv;
+        struct presto_version  *new_targetv;
+        __u32                   valid;
+        __u32                   mode;
+        __u32                   uid;
+        __u32                   gid;
+        __u64                   size;
+        __u32                   mtime_sec;
+        __u32                   mtime_nsec;
+        __u32                   ctime_sec;
+        __u32                   ctime_nsec;
+        __u32                   flags;
+        __u32                   ino;
+        __u32                   rdev;
+        __u32                   major;
+        __u32                   minor;
+        __u32                   generation;
+        __u32                   old_mode;
+        __u32                   old_rdev;
+        __u64                   old_uid;
+        __u64                   old_gid;
+        char                   *old_target;
+        int                     old_targetlen;
+        struct kml_suffix      *suffix;
+};
+
+
+/* RCVD */ 
+
+/* izo_rcvd_rec fills the .intermezzo/fset/last_rcvd file and provides data about
+ * our view of reintegration offsets for a given peer.
+ *
+ * The only exception is the last_rcvd record which has a UUID consisting of all
+ * zeroes; this record's lr_local_offset field is the logical byte offset of our
+ * KML, which is updated when KML truncation takes place.  All other fields are
+ * reserved. */
+
+/* XXX - document how clean shutdowns are recorded */
+
+struct izo_rcvd_rec { 
+        __u8    lr_uuid[16];       /* which peer? */
+        __u64   lr_remote_recno;   /* last confirmed remote recno  */
+        __u64   lr_remote_offset;  /* last confirmed remote offset */
+        __u64   lr_local_recno;    /* last locally reinted recno   */
+        __u64   lr_local_offset;   /* last locally reinted offset  */
+        __u64   lr_last_ctime;     /* the largest ctime that has reintegrated */
+};
+
+/* Cache purge database
+ *
+ * Each DB entry is this structure followed by the path name, no trailing NUL. */
+struct izo_purge_entry {
+        __u64 p_atime;
+        __u32 p_pathlen;
+};
+
+/* RPC */
+
+#endif
--- /dev/null	Fri Aug 30 17:31:37 2002
+++ linux-2.5.50-root/include/linux/intermezzo_lib.h	Tue Dec 10 20:53:33 2002
@@ -0,0 +1,168 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Data structures unpacking/packing macros & inlines
+ *
+ */
+
+#ifndef _INTERMEZZO_LIB_H
+#define _INTERMEZZO_LIB_H
+
+#ifdef __KERNEL__
+# include <linux/types.h>
+#else
+# include <string.h>
+# include <sys/types.h>
+#endif
+
+#undef MIN
+#define MIN(a,b) (((a)<(b)) ? (a): (b))
+#undef MAX
+#define MAX(a,b) (((a)>(b)) ? (a): (b))
+#define MKSTR(ptr) ((ptr))? (ptr) : ""
+
+static inline int size_round (int val)
+{
+	return (val + 3) & (~0x3);
+}
+
+static inline int size_round0(int val)
+{
+        if (!val) 
+                return 0;
+	return (val + 1 + 3) & (~0x3);
+}
+
+static inline size_t round_strlen(char *fset)
+{
+	return size_round(strlen(fset) + 1);
+}
+
+#ifdef __KERNEL__
+# define NTOH__u32(var) le32_to_cpu(var)
+# define NTOH__u64(var) le64_to_cpu(var)
+# define HTON__u32(var) cpu_to_le32(var)
+# define HTON__u64(var) cpu_to_le64(var)
+#else
+# include <glib.h>
+# define NTOH__u32(var) GUINT32_FROM_LE(var)
+# define NTOH__u64(var) GUINT64_FROM_LE(var)
+# define HTON__u32(var) GUINT32_TO_LE(var)
+# define HTON__u64(var) GUINT64_TO_LE(var)
+#endif
+
+/* 
+ * copy sizeof(type) bytes from pointer to var and move ptr forward.
+ * return EFAULT if pointer goes beyond end
+ */
+#define UNLOGV(var,type,ptr,end)                \
+do {                                            \
+        var = *(type *)ptr;                     \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+/* the following two macros convert to little endian */
+/* type MUST be __u32 or __u64 */
+#define LUNLOGV(var,type,ptr,end)               \
+do {                                            \
+        var = NTOH##type(*(type *)ptr);         \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+/* now log values */
+#define LOGV(var,type,ptr)                      \
+do {                                            \
+        *((type *)ptr) = var;                   \
+        ptr += sizeof(type);                    \
+} while (0)
+
+/* and in network order */
+#define LLOGV(var,type,ptr)                     \
+do {                                            \
+        *((type *)ptr) = HTON##type(var);       \
+        ptr += sizeof(type);                    \
+} while (0)
+
+
+/* 
+ * set var to point at (type *)ptr, move ptr forward with sizeof(type)
+ * return from function with EFAULT if ptr goes beyond end
+ */
+#define UNLOGP(var,type,ptr,end)                \
+do {                                            \
+        var = (type *)ptr;                      \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+#define LOGP(var,type,ptr)                      \
+do {                                            \
+        memcpy(ptr, var, sizeof(type));         \
+        ptr += sizeof(type);                    \
+} while (0)
+
+/* 
+ * set var to point at (char *)ptr, move ptr forward by size_round(len);
+ * return from function with EFAULT if ptr goes beyond end
+ */
+#define UNLOGL(var,type,len,ptr,end)                    \
+do {                                                    \
+        if (len == 0)                                   \
+                var = (type *)0;                        \
+        else {                                          \
+                var = (type *)ptr;                      \
+                ptr += size_round(len * sizeof(type));  \
+        }                                               \
+        if (ptr > end )                                 \
+                return -EFAULT;                         \
+} while (0)
+
+#define UNLOGL0(var,type,len,ptr,end)                           \
+do {                                                            \
+        UNLOGL(var,type,len+1,ptr,end);                         \
+        if ( *((char *)ptr - size_round(len+1) + len) != '\0')  \
+                        return -EFAULT;                         \
+} while (0)
+
+#define LOGL(var,len,ptr)                               \
+do {                                                    \
+        size_t __fill = size_round(len);                \
+        /* Prevent data leakage. */                     \
+        if (__fill > 0)                                 \
+                memset((char *)ptr, 0, __fill);         \
+        memcpy((char *)ptr, (const char *)var, len);    \
+        ptr += __fill;                                  \
+} while (0)
+
+#define LOGL0(var,len,ptr)                              \
+do {                                                    \
+        if (!len) break;                                \
+        memcpy((char *)ptr, (const char *)var, len);    \
+        *((char *)(ptr) + len) = 0;                     \
+        ptr += size_round(len + 1);                     \
+} while (0)
+
+#endif /* _INTERMEZZO_LIB_H */
+

_

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.