Skip to contentSkip to conversation

2.5.30-dj1 (sort of)

PATCH In review Dave Jones 6 participants 10 messages Aug 2, 2002 – Aug 5, 2002

Subsystems (2)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Change of technique this time, as I found a way to work with BitKeeper that I'm comfortable with. On the upside, syncing gets easier for me, on the downside, I'm still experimenting, so some bits might be a bit bumpy, with maybe 1-2 files there that shouldn't be etc..

Chances are this won't even boot for many people (if any at all). There's something nasty in my tree right now which makes it fail to find init(1). I wasn't going to put up a .30-dj for this reason until I tracked it down, but a few people asked for something to sync against, or wanted to see where my tree currently stood (and didn't want to use bk), so just before I disappear for a week, I've put this up. So consider it a 'useful only if you plan to send dave anything' patch for now.

There's still truckloads in my pending patches folder that need going through, but things like the init(1) problem need tracking down before I move onto those.

Back in a week..

-- Davej

As usual,..

Patch against 2.5.30 vanilla is available from:
ftp://ftp.kernel.org/pub/linux/kernel/people/davej/patches/2.5/

Merged patch archive: http://www.codemonkey.org.uk/patches/merged/
BitKeeper tree at http://linux-dj.bkbits.net

2.5.30-dj1

o   Merge bits from 2.4.19 release candidates.
o   Backout the buggy dcache list_ conversion.
o   Remove some more bogus bits Christoph Hellwig found.
o   Remove lots of other bogus bits found during the cvs->bk transition.
o   Fix mask calculation in x86-64 MTRR driver.     (Me)
o   Fix up incorrect C in cpufreq macros.       (Neil Booth)
o   Add missing identification of Intel CPUs.       (Patrick Mochel)
Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#1 lore raw

Hi Dave,

the part of -dj1 below is obviously wrong (and it causes a compile error). After removing it the file compiles.

fs/jffs2/dir.c +1 -0
@@ -718,6 +718,7 @@ static int jffs2_rename (struct inode *o
 	struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb);
 	struct jffs2_inode_info *victim_f = NULL;
 	uint8_t type;
+	struct jffs2_inode_info *victim_f = NULL;
 
 	/* The VFS will check for us and prevent trying to rename a
 	 * file over a directory and vice versa, but if it's a directory,

cu
Adrian

Signature · 3 lines
You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
								Alan Cox
maintainer
#2 lore raw
Quoted 2 lines · [email protected] said:

the part of -dj1 below is obviously wrong (and it causes a compile
error). After removing it the file compiles.

The -dj tree should have no changes to JFFS2. If there are any, they are patches which have passed me by for some reason so please resend them to me.

--
dwmw2

#3 lore raw
Quoted 6 lines · David Woodhouse
Quoted 2 lines · [email protected] said:

the part of -dj1 below is obviously wrong (and it causes a compile
error). After removing it the file compiles.

The -dj tree should have no changes to JFFS2. If there are any, they are patches which have passed me by for some reason so please resend them to me.

Below is the output of
filterdiff -z -i \*jffs2\* patch-2.5.30-dj1.diff.gz

Quoted 1 line

dwmw2

cu
Adrian

fs/jffs2/background.c +0 -1
@@ -83,7 +83,6 @@ static int jffs2_garbage_collect_thread(
 	struct jffs2_sb_info *c = _c;
 
 	daemonize();
-	current->tty = NULL;
 	c->gc_task = current;
 	up(&c->gc_thread_start);
 
fs/jffs2/dir.c +13 -0
@@ -718,6 +718,7 @@ static int jffs2_rename (struct inode *o
 	struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb);
 	struct jffs2_inode_info *victim_f = NULL;
 	uint8_t type;
+	struct jffs2_inode_info *victim_f = NULL;
 
 	/* The VFS will check for us and prevent trying to rename a
 	 * file over a directory and vice versa, but if it's a directory,
@@ -775,6 +776,18 @@ static int jffs2_rename (struct inode *o
 	if (S_ISDIR(old_dentry->d_inode->i_mode) && !victim_f)
 		new_dir_i->i_nlink++;
 
+	if (victim_f) {
+		/* There was a victim. Kill it off nicely */
+		new_dentry->d_inode->i_nlink--;
+		/* Don't oops if the victim was a dirent pointing to an
+		   inode which didn't exist. */
+		if (victim_f->inocache) {
+			down(&victim_f->sem);
+			victim_f->inocache->nlink--;
+			up(&victim_f->sem);
+		}
+	}
+
 	/* Unlink the original */
 	ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
 		      old_dentry->d_name.name, old_dentry->d_name.len, NULL);
maintainer Applied
#4 lore raw
Quoted 2 lines · [email protected] said:

Below is the output of
filterdiff -z -i \*jffs2\* patch-2.5.30-dj1.diff.gz

Thanks.

fs/jffs2/background.c

Quoted 2 lines
fs/jffs2/background.c +0 -0

Applied.

fs/jffs2/dir.c

Quoted 2 lines
fs/jffs2/dir.c +0 -0

This is a duplicate -- it's already in Linus' tree. You noticed the line which actually stopped it compiling; the other hunk is bogus too.

--
dwmw2

#5 lore raw

PATCH 1/1 2.5.30-dj1

In reply to Adrian Bunk

Trivial fix for sym53c8xx driver breakage when
CONFIG_BROKEN_SCSI_ERROR_HANDLING is turned off.

Thanks,
Paul Larson

drivers/scsi/sym53c8xx.h +2 -0
@@ -89,8 +89,10 @@
 			release:        sym53c8xx_release,	\
 			info:           sym53c8xx_info, 	\
 			queuecommand:   sym53c8xx_queue_command,\
+#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING
 			abort:          sym53c8xx_abort,	\
 			reset:          sym53c8xx_reset,	\
+#endif
 			bios_param:     scsicam_bios_param,	\
 			can_queue:      SCSI_NCR_CAN_QUEUE,	\
 			this_id:        7,			\
#6 lore raw

Re: [PATCH] 2.5.30-dj1

Quoted 2 lines · Paul Larson

Trivial fix for sym53c8xx driver breakage when
CONFIG_BROKEN_SCSI_ERROR_HANDLING is turned off.

Wrong. You are trying to place your "fix" within
a #define statement. No can do.

Quoted 17 lines

Thanks,
Paul Larson

drivers/scsi/sym53c8xx.h +2 -0
@@ -89,8 +89,10 @@
 			release:        sym53c8xx_release,	\
 			info:           sym53c8xx_info, 	\
 			queuecommand:   sym53c8xx_queue_command,\
+#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING
 			abort:          sym53c8xx_abort,	\
 			reset:          sym53c8xx_reset,	\
+#endif
 			bios_param:     scsicam_bios_param,	\
 			can_queue:      SCSI_NCR_CAN_QUEUE,	\
 			this_id:        7,			\
#7 lore raw

Re: [PATCH] 2.5.30-dj1

Quoted 6 lines · Matti Aarnio
Quoted 2 lines · Paul Larson

Trivial fix for sym53c8xx driver breakage when
CONFIG_BROKEN_SCSI_ERROR_HANDLING is turned off.

Wrong. You are trying to place your "fix" within
a #define statement. No can do.

No, just ifdefing out the broken part the same way it's ifdefed out in hosts.h which should make the driver compile regardless of whether broken scsi error handling is enabled or disabled. Hopefully you have a cleaner way of doing it. The problem is that this driver won't build if CONFIG_BROKEN_SCSI_ERROR_HANDLING isn't defined because in hosts.h we have this in the Scsi_Host_Template struct:

#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING
         int (* abort)(Scsi_Cmnd *);
         int (* reset)(Scsi_Cmnd *, unsigned int);

#endif

This is the compiler error generated by it:
gcc -Wp,-MD,./.sym53c8xx.o.d -D__KERNEL__
-I/kernel/bk/linux-dj/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=sym53c8xx -c -o sym53c8xx.o sym53c8xx.c
sym53c8xx.c:14724: unknown field `abort' specified in initializer sym53c8xx.c:14724: warning: initialization from incompatible pointer type
sym53c8xx.c:14724: unknown field `reset' specified in initializer sym53c8xx.c:14724: warning: initialization from incompatible pointer type
make[3]: *** [sym53c8xx.o] Error 1
make[3]: Leaving directory `/kernel/bk/linux-dj/drivers/scsi' make[2]: *** [scsi] Error 2
make[2]: Leaving directory `/kernel/bk/linux-dj/drivers' make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/kernel/bk/linux-dj'
make: *** [bzImage] Error 2

Quoted 18 lines
Quoted 17 lines

Thanks,
Paul Larson

drivers/scsi/sym53c8xx.h +2 -0
@@ -89,8 +89,10 @@
 			release:        sym53c8xx_release,	\
 			info:           sym53c8xx_info, 	\
 			queuecommand:   sym53c8xx_queue_command,\
+#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING
 			abort:          sym53c8xx_abort,	\
 			reset:          sym53c8xx_reset,	\
+#endif
 			bios_param:     scsicam_bios_param,	\
 			can_queue:      SCSI_NCR_CAN_QUEUE,	\
 			this_id:        7,			\
#8 lore raw

Re: [PATCH] 2.5.30-dj1

Quoted 7 lines · Paul Larson

cleaner way of doing it. The problem is that this driver won't build if CONFIG_BROKEN_SCSI_ERROR_HANDLING isn't defined because in hosts.h we have this in the Scsi_Host_Template struct:

#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING
         int (* abort)(Scsi_Cmnd *);
         int (* reset)(Scsi_Cmnd *, unsigned int);

#endif

We dont want it to build until its fixed

Take a look at http://www.andante.org/scsi_eh.html

#9 lore raw
In reply to Dave Jones

Hi Dave,

the PCI_DEVICE_ID_AL_M1671_0 entry that is added by your patch needs the following obvious fix to compile:

char/agp/agp.c renamed from char/agp/agp.c.old +1 -1
@@ -818,7 +818,7 @@
 		.device_id	= PCI_DEVICE_ID_AL_M1671_0,
 		.vendor_id	= PCI_VENDOR_ID_AL,
 		.chipset	= ALI_M1671,
-		.vendor_name	= "Ali"
+		.vendor_name	= "Ali",
 		.chipset_name	= "M1671",
 		.chipset_setup	= ali_generic_setup,
 	},

cu
Adrian

Signature · 3 lines
You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
								Alan Cox