[linux-lvm] dm and 2.4.21-rc2-xfs

Klaus Strebel klaus.strebel at eigner.com
Thu May 15 07:33:02 UTC 2003


Klaus Strebel wrote:
> Any suggestions about patches for the jbd code (there where some changes 
> in it from 2.4.20 to 2.4.21.x and i confess, i'm to lazy finding it out 
> on my own, but, when nobody else did it, beharps i'll have to, booting 
> to ext2 doesn't make me sleep too well :-) ).

Hi all,

got no answer :-( so i investigated myself ... and got it going :-).

Some chages (all stuff around BH_Inode in the buffer_head struct) is 
allready in the 2.4.21-rc? stuff ( cheer, cheer !) but all with 
different names (humble humble). The only thing that's needed from the 
2.4.20-dm-10/00001.patch is the logic twiggling the usage of b_private 
out of the journal code. So ... remove the patches against :

fs/buffer.c
fs/jbd/journal.c
include/linux/fs.h
include/linux/jbd.h

and use this instead :

--- diff/fs/jbd/journal.c       2002-11-29 09:36:46.000000000 +0000
+++ source/fs/jbd/journal.c     2002-11-29 09:44:59.000000000 +0000
@@ -1802,9 +1802,9 @@

                 if (buffer_jbd(bh)) {
                         /* Someone did it for us! */
-                       J_ASSERT_BH(bh, bh->b_private != NULL);
+                       J_ASSERT_BH(bh, bh->b_journal_head != NULL);
                         journal_free_journal_head(jh);
-                       jh = bh->b_private;
+                       jh = bh->b_journal_head;
                 } else {
                         /*
                          * We actually don't need jh_splice_lock when
@@ -1812,7 +1812,7 @@
                          */
                         spin_lock(&jh_splice_lock);
                         set_bit(BH_JBD, &bh->b_state);
-                       bh->b_private = jh;
+                       bh->b_journal_head = jh;
                         jh->b_bh = bh;
                         atomic_inc(&bh->b_count);
                         spin_unlock(&jh_splice_lock);
@@ -1821,7 +1821,7 @@
         }
         jh->b_jcount++;
         spin_unlock(&journal_datalist_lock);
-       return bh->b_private;
+       return bh->b_journal_head;
  }

  /*
@@ -1854,7 +1854,7 @@
                         J_ASSERT_BH(bh, jh2bh(jh) == bh);
                         BUFFER_TRACE(bh, "remove journal_head");
                         spin_lock(&jh_splice_lock);
-                       bh->b_private = NULL;
+                       bh->b_journal_head = NULL;
                         jh->b_bh = NULL;        /* debug, really */
                         clear_bit(BH_JBD, &bh->b_state);
                         __brelse(bh);
--- diff/include/linux/fs.h     2002-11-29 09:36:47.000000000 +0000
+++ source/include/linux/fs.h   2002-11-29 09:44:59.000000000 +0000
@@ -267,4 +267,4 @@
         void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O 
completion */
         void *b_private;                /* reserved for b_end_io */
-
+       void *b_journal_head;           /* ext3 journal_heads */
         unsigned long b_rsector;        /* Real buffer location on disk */
--- diff/include/linux/jbd.h    2002-11-29 09:36:47.000000000 +0000
+++ source/include/linux/jbd.h  2002-11-29 09:44:59.000000000 +0000
@@ -254,7 +254,7 @@

  static inline struct journal_head *bh2jh(struct buffer_head *bh)
  {
-       return bh->b_private;
+       return bh->b_journal_head;
  }

  #define HAVE_JOURNAL_CALLBACK_STATUS

I added my 00001.patch for 2.4.21-rc?-xfs.

Cheers
Klaus
-- 
Klaus Strebel
UNIX-Engineer
klaus.strebel at eigner.com
EIGNER - Precision Lifecycle Management -
<http://www.eigner.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 00001.patch
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20030515/cc144b00/attachment.ksh>


More information about the linux-lvm mailing list