Hello all, I am trying to integerate 0.0.6b with our kernel RPM here and have come across an interesting conflict. I want to include the raid patch that Red Hat includes in their kernel but that patch includes the following hunk: --- linux/include/linux/fs.h.orig Tue Jan 16 13:30:09 2001 +++ linux/include/linux/fs.h Tue Jan 16 13:47:18 2001 @@ -191,6 +191,7 @@ #define BH_Req 3 /* 0 if the buffer has been invalidated */ #define BH_Protected 6 /* 1 if the buffer is protected */ #define BH_Wait_IO 7 /* 1 if we should throttle on this buffer */ +#define BH_LowPrio 8 /* 1 if the buffer is lowprio */ /* * Try to keep the most commonly used fields in single cache lines (16 ext3 0.0.6b has the following hunk in it: --- linux-2.2.19pre14.ext3-0.0.6b/include/linux/fs.h.~1~ Wed Feb 21 20:00:38 2001 +++ linux-2.2.19pre14.ext3-0.0.6b/include/linux/fs.h Wed Feb 21 20:02:45 2001 @@ -191,6 +197,25 @@ #define BH_Req 3 /* 0 if the buffer has been invalidated */ #define BH_Protected 6 /* 1 if the buffer is protected */ #define BH_Wait_IO 7 /* 1 if we should throttle on this buffer */ +#define BH_Temp 8 /* 1 if the buffer is temporary (unlinked) */ +#define BH_JWrite 9 /* 1 if being written to log (@@@ DEBUGGING) */ +#define BH_QuickFree 10 /* 1 if alloced and freed quickly (see below)*/ +#define BH_Alloced 11 /* 1 if buffer has been allocated */ +#define BH_Freed 12 /* 1 if buffer has been freed (truncated) */ +#define BH_Revoked 13 /* 1 if buffer has been revoked from the log */ +#define BH_RevokeValid 14 /* 1 if buffer revoked flag is valid */ +#define BH_JDirty 15 /* 1 if buffer is dirty but journaled */ + +/* journaling buffer types */ +#define BJ_None 0 /* Not journaled */ +#define BJ_Data 1 /* Normal data: flush before commit */ +#define BJ_Metadata 2 /* Normal journaled metadata */ +#define BJ_Forget 3 /* Buffer superceded by this transaction */ +#define BJ_IO 4 /* Buffer is for temporary IO use */ +#define BJ_Shadow 5 /* Buffer contents being shadowed to the log */ +#define BJ_LogCtl 6 /* Buffer contains log descriptors */ +#define BJ_Reserved 7 /* Buffer is reserved for access by journal */ +#define BJ_Types 8 /* * Try to keep the most commonly used fields in single cache lines (16 These two hunks obviously conflict. A quick inspection reveals that the BH* constants are used in the b_state member of the struct buffer_head which is defined to be an unsigned long. It seems to be that simply leaving BH_LowPrio wth 8 and starting the ext3 BH constants at 9 (with BH_Temp) should be safe. Comments? b.
Brian Murrell writes:> I am trying to integerate 0.0.6b with our kernel RPM here and have come > across an interesting conflict. I want to include the raid patch that > Red Hat includes in their kernel but that patch includes the following > hunk: > > #define BH_Wait_IO 7 /* 1 if we should throttle on this buffer */ > +#define BH_LowPrio 8 /* 1 if the buffer is lowprio */ > > ext3 0.0.6b has the following hunk in it: > > #define BH_Wait_IO 7 /* 1 if we should throttle on this buffer */ > +#define BH_Temp 8 /* 1 if the buffer is temporary (unlinked) */ > . > . > . > +#define BH_JDirty 15 /* 1 if buffer is dirty but journaled */ > + > > These two hunks obviously conflict. A quick inspection reveals that the > BH* constants are used in the b_state member of the struct buffer_head > which is defined to be an unsigned long. It seems to be that simply > leaving BH_LowPrio wth 8 and starting the ext3 BH constants at 9 (with > BH_Temp) should be safe.Yes, I've already done this for the Turbolinux kernel, and have been running it for a long time. It has the other pleasing side-effect that BH_Jdirty is now 16, which matches the BH_JDirty that reiserfs uses. Cheers, Andreas -- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert