<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Johann, Andreas,<br>
Thanks for the pointers, they certainly explain the issue we were
seeing. Has the mount/util-linux external journal patch been accepted ?<br>
<br>
Franco.<br>
<br>
Johann Lombardi wrote:
<blockquote cite="mid200601261052.35134.johann.lombardi@bull.net"
 type="cite">
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">Here's the system information and command line used to create the
filesystem :
SuSE SLES9 2 , kernel 2.6.5
ada718-5:/ # rpm -qa | grep e2fs
e2fsprogs-1.36-6.2
-----------------------------------------
mke2fs -O journal_dev   /dev/mapper/home_jou_vol_grp-home_jou 400000
mke2fs -E stride=16 -O sparse_super,dir_index -j -J
device=/dev/mapper/home_jou_vol_grp-home_jou 
/dev/mapper/home_vol_grp-home

Any ideas?
      </pre>
    </blockquote>
    <pre wrap="">I believe the kernel does the journal device lookup by the device
major/minor, and those are not fixed for LVM devices.  
    </pre>
  </blockquote>
  <pre wrap=""><!---->
If the filesystem was _cleanly_ unmounted, you can try to remove/reattach the
external journal. It will update the superblock with the new major/minor
numbers.
You can proceed as follows:
# tune2fs -f -O^has_journal /dev/mapper/home_vol_grp-home
# tune2fs -J device=/dev/mapper/home_jou_vol_grp-home_jou /dev/mapper/home_vol_grp-home

It will work until the journal device's major/minor numbers change again 
(the next reboot?).

  </pre>
  <blockquote type="cite">
    <pre wrap="">Bull recently posted a patch here for mount to automatically find the
correct block device for this journal UUID.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Actually, it was on ext2-devel:
<a class="moz-txt-link-freetext" href="http://thread.gmane.org/gmane.comp.file-systems.ext2.devel/2950">http://thread.gmane.org/gmane.comp.file-systems.ext2.devel/2950</a>

Johann
  </pre>
  <br>
  <hr size="4" width="90%"><br>
  <table class="header-part1" border="0" cellpadding="0" cellspacing="0"
 width="100%">
    <tbody>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Subject:
        </div>
[Ext2-devel] [PATCH] ext2: return FSID for statvfs</td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">From: </div>
Pekka Enberg <a class="moz-txt-link-rfc2396E" href="mailto:penberg@cs.helsinki.fi"><penberg@cs.helsinki.fi></a></td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Date: </div>
Tue, 06 Dec 2005 22:22:48 +0200</td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">To: </div>
<a class="moz-txt-link-abbreviated" href="mailto:akpm@osdl.org">akpm@osdl.org</a></td>
      </tr>
    </tbody>
  </table>
  <table class="header-part2" border="0" cellpadding="0" cellspacing="0"
 width="100%">
    <tbody>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">To: </div>
<a class="moz-txt-link-abbreviated" href="mailto:akpm@osdl.org">akpm@osdl.org</a></td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">CC: </div>
<a class="moz-txt-link-abbreviated" href="mailto:linux-kernel@vger.kernel.org">linux-kernel@vger.kernel.org</a>, <a class="moz-txt-link-abbreviated" href="mailto:ext2-devel@lists.sourceforge.net">ext2-devel@lists.sourceforge.net</a></td>
      </tr>
    </tbody>
  </table>
  <br>
  <pre wrap="">This patch changes ext2_statfs() to return a FSID based on least significant
64-bits of the 128-bit filesystem UUID. This patch is a partial fix for
Bugzilla Bug <a class="moz-txt-link-rfc2396E" href="http://bugzilla.kernel.org/show_bug.cgi?id=136"><http://bugzilla.kernel.org/show_bug.cgi?id=136></a>.

Signed-off-by: Pekka Enberg <a class="moz-txt-link-rfc2396E" href="mailto:penberg@cs.helsinki.fi"><penberg@cs.helsinki.fi></a>
---

 super.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Index: 2.6/fs/ext2/super.c
===================================================================
--- 2.6.orig/fs/ext2/super.c
+++ 2.6/fs/ext2/super.c
@@ -1038,6 +1038,7 @@ restore_opts:
 static int ext2_statfs (struct super_block * sb, struct kstatfs * buf)
 {
        struct ext2_sb_info *sbi = EXT2_SB(sb);
+       struct ext2_super_block *es = sbi->s_es;
        unsigned long overhead;
        int i;
 
@@ -1052,7 +1053,7 @@ static int ext2_statfs (struct super_blo
                 * All of the blocks before first_data_block are
                 * overhead
                 */
-               overhead = le32_to_cpu(sbi->s_es->s_first_data_block);
+               overhead = le32_to_cpu(es->s_first_data_block);
 
                /*
                 * Add the overhead attributed to the superblock and
@@ -1073,14 +1074,16 @@ static int ext2_statfs (struct super_blo
 
        buf->f_type = EXT2_SUPER_MAGIC;
        buf->f_bsize = sb->s_blocksize;
-       buf->f_blocks = le32_to_cpu(sbi->s_es->s_blocks_count) - overhead;
+       buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead;
        buf->f_bfree = ext2_count_free_blocks(sb);
-       buf->f_bavail = buf->f_bfree - le32_to_cpu(sbi->s_es->s_r_blocks_count);
-       if (buf->f_bfree < le32_to_cpu(sbi->s_es->s_r_blocks_count))
+       buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count);
+       if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count))
                buf->f_bavail = 0;
-       buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
+       buf->f_files = le32_to_cpu(es->s_inodes_count);
        buf->f_ffree = ext2_count_free_inodes (sb);
        buf->f_namelen = EXT2_NAME_LEN;
+       buf->f_fsid.val[0] = le32_to_cpup((void *)es->s_uuid);
+       buf->f_fsid.val[1] = le32_to_cpup((void *)es->s_uuid + sizeof(u32));
        return 0;
 }
 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a class="moz-txt-link-freetext" href="http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click">http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click</a>
_______________________________________________
Ext2-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ext2-devel@lists.sourceforge.net">Ext2-devel@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/ext2-devel">https://lists.sourceforge.net/lists/listinfo/ext2-devel</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Franco Bladilo
Linux/HPCC Administrator
Research Computing Support Group
Rice University
<a class="moz-txt-link-abbreviated" href="mailto:bladilo@rice.edu">bladilo@rice.edu</a>
</pre>
</body>
</html>