Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Thu, 4 Aug 2005 18:42:46 +0000 (18:42 +0000)
committeradilger <adilger>
Thu, 4 Aug 2005 18:42:46 +0000 (18:42 +0000)
Description: Unusual file access patterns on the MDS may result in inode
             data being lost in very rare circumstances.
Details    : Bad interaction between the ea-in-inode patch and the "no-read"
             code in the 2.6 kernel caused the inode and/or EA data not to
             be read from disk, causing single-file corruption.
b=6866, b=6869
r=alex

ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch
ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch
lustre/ChangeLog
lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch

index 3d554e4..9d5bee1 100644 (file)
@@ -18,7 +18,7 @@ Index: linux-stage/fs/ext3/inode.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/inode.c   2005-02-25 16:47:04.415976672 +0200
 +++ linux-stage/fs/ext3/inode.c        2005-02-25 16:50:40.756087976 +0200
-@@ -2274,7 +2274,7 @@
+@@ -2274,7 +2274,7 @@ static unsigned long ext3_get_inode_bloc
   * trying to determine the inode's location on-disk and no read need be
   * performed.
   */
@@ -27,7 +27,7 @@ Index: linux-stage/fs/ext3/inode.c
                                struct ext3_iloc *iloc, int in_mem)
  {
        unsigned long block;
-@@ -2484,6 +2484,11 @@
+@@ -2484,6 +2484,11 @@ void ext3_read_inode(struct inode * inod
                ei->i_data[block] = raw_inode->i_block[block];
        INIT_LIST_HEAD(&ei->i_orphan);
  
@@ -39,7 +39,7 @@ Index: linux-stage/fs/ext3/inode.c
        if (S_ISREG(inode->i_mode)) {
                inode->i_op = &ext3_file_inode_operations;
                inode->i_fop = &ext3_file_operations;
-@@ -2619,6 +2624,9 @@
+@@ -2619,6 +2624,9 @@ static int ext3_do_update_inode(handle_t
        } else for (block = 0; block < EXT3_N_BLOCKS; block++)
                raw_inode->i_block[block] = ei->i_data[block];
  
@@ -49,6 +49,16 @@ Index: linux-stage/fs/ext3/inode.c
        BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
        rc = ext3_journal_dirty_metadata(handle, bh);
        if (!err)
+@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
+ {
+       int err = 0;
+       if (handle) {
+-              err = ext3_get_inode_loc(inode, iloc, 1);
++              err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
++                                                      EXT3_STATE_NEW);
+               if (!err) {
+                       BUFFER_TRACE(iloc->bh, "get_write_access");
+                       err = ext3_journal_get_write_access(handle, iloc->bh);
 Index: linux-stage/fs/ext3/xattr.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/xattr.c   2005-02-25 16:47:04.422975608 +0200
@@ -112,7 +122,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOENT;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -241,7 +251,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return 0;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -379,7 +389,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return ret;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return -EIO;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -510,7 +520,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOSPC;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return err;
 +      raw_inode = ext3_raw_inode(&iloc);
index 439a08e..19f153d 100644 (file)
@@ -50,6 +50,16 @@ Index: linux-2.6.0/fs/ext3/inode.c
        BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
        rc = ext3_journal_dirty_metadata(handle, bh);
        if (!err)
+@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
+ {
+       int err = 0;
+       if (handle) {
+-              err = ext3_get_inode_loc(inode, iloc, 1);
++              err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
++                                                      EXT3_STATE_NEW);
+               if (!err) {
+                       BUFFER_TRACE(iloc->bh, "get_write_access");
+                       err = ext3_journal_get_write_access(handle, iloc->bh);
 Index: linux-2.6.0/fs/ext3/xattr.c
 ===================================================================
 --- linux-2.6.0.orig/fs/ext3/xattr.c   2003-12-30 08:33:13.000000000 +0300
@@ -113,7 +123,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOENT;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -242,7 +252,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return 0;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -379,7 +389,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return ret;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return -EIO;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -510,7 +520,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOSPC;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return err;
 +      raw_inode = ext3_raw_inode(&iloc);
index 951dcec..3d5d67a 100644 (file)
@@ -62,6 +62,15 @@ Description: fsx running with liblustre complained that using truncate() to
 Details    : This is the liblustre equivalent of the fix for bug 6196.  Fixes
              ATTR_SIZE and lsm use in llu_setattr_raw.
 
+Severity   : critical
+Bugzilla   : 6866
+Frequency  : rare, only 2.6 kernels
+Description: Unusual file access patterns on the MDS may result in inode
+             data being lost in very rare circumstances.
+Details    : Bad interaction between the ea-in-inode patch and the "no-read"
+             code in the 2.6 kernel caused the inode and/or EA data not to
+             be read from disk, causing single-file corruption.
+
 ------------------------------------------------------------------------------
 
 2005-07-07  Cluster File Systems, Inc. <info@clusterfs.com>
index 3d554e4..9d5bee1 100644 (file)
@@ -18,7 +18,7 @@ Index: linux-stage/fs/ext3/inode.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/inode.c   2005-02-25 16:47:04.415976672 +0200
 +++ linux-stage/fs/ext3/inode.c        2005-02-25 16:50:40.756087976 +0200
-@@ -2274,7 +2274,7 @@
+@@ -2274,7 +2274,7 @@ static unsigned long ext3_get_inode_bloc
   * trying to determine the inode's location on-disk and no read need be
   * performed.
   */
@@ -27,7 +27,7 @@ Index: linux-stage/fs/ext3/inode.c
                                struct ext3_iloc *iloc, int in_mem)
  {
        unsigned long block;
-@@ -2484,6 +2484,11 @@
+@@ -2484,6 +2484,11 @@ void ext3_read_inode(struct inode * inod
                ei->i_data[block] = raw_inode->i_block[block];
        INIT_LIST_HEAD(&ei->i_orphan);
  
@@ -39,7 +39,7 @@ Index: linux-stage/fs/ext3/inode.c
        if (S_ISREG(inode->i_mode)) {
                inode->i_op = &ext3_file_inode_operations;
                inode->i_fop = &ext3_file_operations;
-@@ -2619,6 +2624,9 @@
+@@ -2619,6 +2624,9 @@ static int ext3_do_update_inode(handle_t
        } else for (block = 0; block < EXT3_N_BLOCKS; block++)
                raw_inode->i_block[block] = ei->i_data[block];
  
@@ -49,6 +49,16 @@ Index: linux-stage/fs/ext3/inode.c
        BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
        rc = ext3_journal_dirty_metadata(handle, bh);
        if (!err)
+@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
+ {
+       int err = 0;
+       if (handle) {
+-              err = ext3_get_inode_loc(inode, iloc, 1);
++              err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
++                                                      EXT3_STATE_NEW);
+               if (!err) {
+                       BUFFER_TRACE(iloc->bh, "get_write_access");
+                       err = ext3_journal_get_write_access(handle, iloc->bh);
 Index: linux-stage/fs/ext3/xattr.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/xattr.c   2005-02-25 16:47:04.422975608 +0200
@@ -112,7 +122,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOENT;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -241,7 +251,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return 0;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -379,7 +389,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return ret;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return -EIO;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -510,7 +520,7 @@ Index: linux-stage/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOSPC;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return err;
 +      raw_inode = ext3_raw_inode(&iloc);
index 439a08e..19f153d 100644 (file)
@@ -50,6 +50,16 @@ Index: linux-2.6.0/fs/ext3/inode.c
        BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
        rc = ext3_journal_dirty_metadata(handle, bh);
        if (!err)
+@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
+ {
+       int err = 0;
+       if (handle) {
+-              err = ext3_get_inode_loc(inode, iloc, 1);
++              err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
++                                                      EXT3_STATE_NEW);
+               if (!err) {
+                       BUFFER_TRACE(iloc->bh, "get_write_access");
+                       err = ext3_journal_get_write_access(handle, iloc->bh);
 Index: linux-2.6.0/fs/ext3/xattr.c
 ===================================================================
 --- linux-2.6.0.orig/fs/ext3/xattr.c   2003-12-30 08:33:13.000000000 +0300
@@ -113,7 +123,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOENT;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -242,7 +252,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return 0;
 +
-+      ret = ext3_get_inode_loc(inode, &iloc, 1);
++      ret = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -379,7 +389,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return ret;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return -EIO;
 +      raw_inode = ext3_raw_inode(&iloc);
@@ -510,7 +520,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
 +              return -ENOSPC;
 +
-+      err = ext3_get_inode_loc(inode, &iloc, 1);
++      err = ext3_get_inode_loc(inode, &iloc, 0);
 +      if (err)
 +              return err;
 +      raw_inode = ext3_raw_inode(&iloc);