X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fpatches%2Fext3-nlinks-2.6.9.patch;h=147928c2948426aebd3e01f23ac7e2b64b1f386b;hp=37cca817af84634afec51406b2f199d58349c9a3;hb=e8a81baad080cc38188cb3c4ae255fedb1987a9c;hpb=e3e063754210cabf447ef84599253c565fcbb329 diff --git a/lustre/kernel_patches/patches/ext3-nlinks-2.6.9.patch b/lustre/kernel_patches/patches/ext3-nlinks-2.6.9.patch index 37cca81..147928c 100644 --- a/lustre/kernel_patches/patches/ext3-nlinks-2.6.9.patch +++ b/lustre/kernel_patches/patches/ext3-nlinks-2.6.9.patch @@ -1,7 +1,8 @@ -diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c ---- orig/fs/ext3/namei.c 2005-10-12 13:58:19.000000000 -0700 -+++ patch/fs/ext3/namei.c 2005-10-12 14:00:33.000000000 -0700 -@@ -1603,11 +1603,17 @@ +Index: linux-2.6.12/fs/ext3/namei.c +=================================================================== +--- linux-2.6.12.orig/fs/ext3/namei.c ++++ linux-2.6.12/fs/ext3/namei.c +@@ -1600,11 +1600,17 @@ static int ext3_delete_entry (handle_t * static inline void ext3_inc_count(handle_t *handle, struct inode *inode) { inode->i_nlink++; @@ -20,7 +21,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c } static int ext3_add_nondir(handle_t *handle, -@@ -1706,7 +1712,7 @@ static int ext3_add_nondir(handle_t +@@ -1703,7 +1709,7 @@ static int ext3_mkdir(struct inode * dir struct ext3_dir_entry_2 * de; int err, retries = 0; @@ -29,7 +30,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c return -EMLINK; retry: -@@ -1729,7 +1735,7 @@ static int ext3_mkdir(struct inode +@@ -1726,7 +1732,7 @@ retry: inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; dir_block = ext3_bread (handle, inode, 0, 1, &err); if (!dir_block) { @@ -38,7 +39,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c ext3_mark_inode_dirty(handle, inode); iput (inode); goto out_stop; -@@ -1761,7 +1767,7 @@ static int ext3_mkdir(struct inode +@@ -1758,7 +1764,7 @@ retry: iput (inode); goto out_stop; } @@ -47,7 +48,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c ext3_update_dx_flag(dir); ext3_mark_inode_dirty(handle, dir); d_instantiate(dentry, inode); -@@ -2026,10 +2032,10 @@ static int ext3_rmdir (struct inode +@@ -2023,10 +2029,10 @@ static int ext3_rmdir (struct inode * di retval = ext3_delete_entry(handle, dir, de, bh); if (retval) goto end_rmdir; @@ -62,7 +63,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c inode->i_version++; inode->i_nlink = 0; /* There's no need to set i_disksize: the fact that i_nlink is -@@ -2039,7 +2045,7 @@ static int ext3_rmdir (struct inode +@@ -2036,7 +2042,7 @@ static int ext3_rmdir (struct inode * di ext3_orphan_add(handle, inode); inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; ext3_mark_inode_dirty(handle, inode); @@ -71,7 +72,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c ext3_update_dx_flag(dir); ext3_mark_inode_dirty(handle, dir); -@@ -2090,7 +2096,7 @@ static int ext3_unlink(struct inode +@@ -2087,7 +2093,7 @@ static int ext3_unlink(struct inode * di dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; ext3_update_dx_flag(dir); ext3_mark_inode_dirty(handle, dir); @@ -80,7 +81,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c if (!inode->i_nlink) ext3_orphan_add(handle, inode); inode->i_ctime = dir->i_ctime; -@@ -2165,7 +2171,7 @@ static int ext3_link (struct dentry +@@ -2162,7 +2168,7 @@ static int ext3_link (struct dentry * ol struct inode *inode = old_dentry->d_inode; int err, retries = 0; @@ -89,7 +90,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c return -EMLINK; retry: -@@ -2252,8 +2258,8 @@ static int ext3_rename (struct inode +@@ -2249,8 +2255,8 @@ static int ext3_rename (struct inode * o if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) goto end_rename; retval = -EMLINK; @@ -100,7 +101,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c goto end_rename; } if (!new_bh) { -@@ -2310,7 +2316,7 @@ static int ext3_rename (struct inode +@@ -2307,7 +2313,7 @@ static int ext3_rename (struct inode * o } if (new_inode) { @@ -109,7 +110,7 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c new_inode->i_ctime = CURRENT_TIME_SEC; } old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; -@@ -2321,11 +2327,13 @@ static int ext3_rename (struct inode +@@ -2318,11 +2324,13 @@ static int ext3_rename (struct inode * o PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino); BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata"); ext3_journal_dirty_metadata(handle, dir_bh); @@ -126,12 +127,11 @@ diff -Nur orig/fs/ext3/namei.c patch/fs/ext3/namei.c ext3_update_dx_flag(new_dir); ext3_mark_inode_dirty(handle, new_dir); } - -Index: linux-2.6.7/include/linux/ext3_fs.h +Index: linux-2.6.12/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.7.orig/include/linux/ext3_fs.h 2004-06-15 23:19:36.000000000 -0600 -+++ linux-2.6.7/include/linux/ext3_fs.h 2004-08-20 17:41:27.000000000 -0600 -@@ -79,7 +81,7 @@ +--- linux-2.6.12.orig/include/linux/ext3_fs.h ++++ linux-2.6.12/include/linux/ext3_fs.h +@@ -78,7 +78,7 @@ struct statfs; /* * Maximal count of links to a file */ @@ -140,3 +140,19 @@ Index: linux-2.6.7/include/linux/ext3_fs.h /* * Macro-instructions used to manage several block sizes +@@ -539,6 +539,7 @@ static inline struct ext3_inode_info *EX + #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 + #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 + #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 ++#define EXT3_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 + + #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001 + #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002 +@@ -552,6 +553,7 @@ static inline struct ext3_inode_info *EX + EXT3_FEATURE_INCOMPAT_META_BG) + #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ + EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ ++ EXT3_FEATURE_RO_COMPAT_DIR_NLINK| \ + EXT3_FEATURE_RO_COMPAT_BTREE_DIR) + + /*