X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fpatches%2Fext3-map_inode_page-2.4.21-suse2.patch;h=76f5e217e2ff66ce8a379469c8bbc50dd7e7570f;hb=9b6f9d17a35188f5f4dbfae840164b999a7a78a2;hp=f952079be53f656937d41d9c5e5f635bfeaf000a;hpb=1c11f6a65c0bf8be5961689cf8910e0e96e89cfe;p=fs%2Flustre-release.git diff --git a/lustre/kernel_patches/patches/ext3-map_inode_page-2.4.21-suse2.patch b/lustre/kernel_patches/patches/ext3-map_inode_page-2.4.21-suse2.patch index f952079..76f5e21 100644 --- a/lustre/kernel_patches/patches/ext3-map_inode_page-2.4.21-suse2.patch +++ b/lustre/kernel_patches/patches/ext3-map_inode_page-2.4.21-suse2.patch @@ -18,7 +18,7 @@ Index: linux-2.4.21-suse2/fs/ext3/inode.c if (ret) break; -@@ -3105,3 +3105,75 @@ +@@ -3105,3 +3105,80 @@ ret = ret2; return ret; } @@ -53,8 +53,9 @@ Index: linux-2.4.21-suse2/fs/ext3/inode.c + blocks[i] = ext3_bmap(inode->i_mapping, iblock); + if (blocks[i] == 0) { + failed++; -+ created[i] = -1; -+ } else { ++ if (created) ++ created[i] = -1; ++ } else if (created) { + created[i] = 0; + } + } @@ -82,10 +83,14 @@ Index: linux-2.4.21-suse2/fs/ext3/inode.c + "allocating block %ld\n", rc, iblock); + goto out; + } ++ /* Unmap any metadata buffers from the block mapping, to avoid ++ * data corruption due to direct-write from Lustre being ++ * clobbered by a later flush of the blockdev metadata buffer.*/ + if (buffer_new(&bh)) + unmap_underlying_metadata(&bh); + blocks[i] = bh.b_blocknr; -+ created[i] = 1; ++ if (created) ++ created[i] = 1; + } + + out: