[Pkg-lustre-svn-commit] r344 - in /trunk/ldiskfs/kernel_patches: patches/ext3-nanosecond-2.6.23-vanilla.patch patches/ext3-nlinks-2.6.23.patch series/ldiskfs-2.6.23-vanilla.series
pwinnertz-guest at users.alioth.debian.org
pwinnertz-guest at users.alioth.debian.org
Thu Sep 20 11:50:51 UTC 2007
Author: pwinnertz-guest
Date: Thu Sep 20 11:50:51 2007
New Revision: 344
URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=344
Log:
started again on 2.6.23... much work^^
Added:
trunk/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.23.patch
Modified:
trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch
trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series
Modified: trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch?rev=344&op=diff
==============================================================================
--- trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch (original)
+++ trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch Thu Sep 20 11:50:51 2007
@@ -137,7 +137,7 @@
+ dir->i_ctime = dir->i_mtime = ext3_current_time(dir);
ext3_update_dx_flag(dir);
ext3_mark_inode_dirty(handle, dir);
- drop_nlink(inode);
+ ext3_dec_count(handle, inode);
if (!inode->i_nlink)
ext3_orphan_add(handle, inode);
- inode->i_ctime = dir->i_ctime;
@@ -166,7 +166,7 @@
@@ -2391,9 +2391,9 @@
if (new_inode) {
- drop_nlink(new_inode);
+ ext3_dec_count(handle, new_inode);
- new_inode->i_ctime = CURRENT_TIME_SEC;
+ new_inode->i_ctime = ext3_current_time(new_inode);
}
Added: trunk/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.23.patch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.23.patch?rev=344&op=file
==============================================================================
--- trunk/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.23.patch (added)
+++ trunk/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.23.patch Thu Sep 20 11:50:51 2007
@@ -1,0 +1,146 @@
+Index: linux-stage/fs/ext3/namei.c
+===================================================================
+--- linux-stage.orig/fs/ext3/namei.c 2007-06-11 13:37:06.000000000 +0200
++++ linux-stage/fs/ext3/namei.c 2007-06-11 13:39:08.000000000 +0200
+@@ -49,6 +49,25 @@
+ #define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
+ #define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b))
+
++
++
++static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
++{
++ inc_nlink(inode);
++ if (is_dx(inode) && inode->i_nlink > 1) {
++ /* limit is 16-bit i_links_count */
++ if (inode->i_nlink >= EXT3_LINK_MAX || inode->i_nlink == 2)
++ inode->i_nlink = 1;
++ }
++}
++
++static inline void ext3_dec_count(handle_t *handle, struct inode *inode)
++{
++ if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
++ drop_nlink(inode);
++}
++
++
+ static struct buffer_head *ext3_append(handle_t *handle,
+ struct inode *inode,
+ u32 *block, int *err)
+@@ -1727,7 +1746,7 @@
+ struct ext3_dir_entry_2 * de;
+ int err, retries = 0;
+
+- if (dir->i_nlink >= EXT3_LINK_MAX)
++ if (EXT3_DIR_LINK_MAX(dir))
+ return -EMLINK;
+
+ retry:
+@@ -1750,7 +1769,7 @@
+ 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) {
+- drop_nlink(inode); /* is this nlink == 0? */
++ ext3_dec_count(handle, inode); /* is this nlink == 0? */
+ ext3_mark_inode_dirty(handle, inode);
+ iput (inode);
+ goto out_stop;
+@@ -1782,7 +1801,7 @@
+ iput (inode);
+ goto out_stop;
+ }
+- inc_nlink(dir);
++ ext3_inc_count(handle, dir);
+ ext3_update_dx_flag(dir);
+ ext3_mark_inode_dirty(handle, dir);
+ d_instantiate(dentry, inode);
+@@ -2047,9 +2066,9 @@
+ retval = ext3_delete_entry(handle, dir, de, bh);
+ if (retval)
+ goto end_rmdir;
+- if (inode->i_nlink != 2)
++ if (!EXT3_DIR_LINK_EMPTY(inode))
+ ext3_warning (inode->i_sb, "ext3_rmdir",
+- "empty directory has nlink!=2 (%d)",
++ "empty directory has too many links (%d)",
+ inode->i_nlink);
+ inode->i_version++;
+ clear_nlink(inode);
+@@ -2060,7 +2079,7 @@
+ ext3_orphan_add(handle, inode);
+ inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
+ ext3_mark_inode_dirty(handle, inode);
+- drop_nlink(dir);
++ ext3_dec_count(handle, dir);
+ ext3_update_dx_flag(dir);
+ ext3_mark_inode_dirty(handle, dir);
+
+@@ -2111,7 +2130,7 @@
+ dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
+ ext3_update_dx_flag(dir);
+ ext3_mark_inode_dirty(handle, dir);
+- drop_nlink(inode);
++ ext3_dec_count(handle, inode);
+ if (!inode->i_nlink)
+ ext3_orphan_add(handle, inode);
+ inode->i_ctime = dir->i_ctime;
+@@ -2187,7 +2206,7 @@
+ struct inode *inode = old_dentry->d_inode;
+ int err, retries = 0;
+
+- if (inode->i_nlink >= EXT3_LINK_MAX)
++ if (EXT3_DIR_LINK_MAX(inode))
+ return -EMLINK;
+ /*
+ * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing
+@@ -2282,7 +2301,7 @@
+ goto end_rename;
+ retval = -EMLINK;
+ if (!new_inode && new_dir!=old_dir &&
+- new_dir->i_nlink >= EXT3_LINK_MAX)
++ EXT3_DIR_LINK_MAX(new_dir))
+ goto end_rename;
+ }
+ if (!new_bh) {
+@@ -2339,7 +2358,7 @@
+ }
+
+ if (new_inode) {
+- drop_nlink(new_inode);
++ ext3_dec_count(handle, new_inode);
+ new_inode->i_ctime = CURRENT_TIME_SEC;
+ }
+ old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
+@@ -2350,11 +2369,13 @@
+ 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);
+- drop_nlink(old_dir);
++ ext3_dec_count(handle, old_dir);
+ if (new_inode) {
+- drop_nlink(new_inode);
++ /* checked empty_dir above, can't have another parent,
++ * ext3_dec_count() won't work for many-linked dirs */
++ new_inode->i_nlink = 0;
+ } else {
+- inc_nlink(new_dir);
++ ext3_inc_count(handle, new_dir);
+ ext3_update_dx_flag(new_dir);
+ ext3_mark_inode_dirty(handle, new_dir);
+ }
+
+
+Index: linux-stage/include/linux/ext3_fs.h
+===================================================================
+--- linux-stage.orig/include/linux/ext3_fs.h 2007-06-11 13:37:07.000000000 +0200
++++ linux-stage/include/linux/ext3_fs.h 2007-06-11 13:37:20.000000000 +0200
+@@ -78,7 +78,7 @@
+ /*
+ * Maximal count of links to a file
+ */
+-#define EXT3_LINK_MAX 32000
++#define EXT3_LINK_MAX 65000
+
+ /*
+ * Macro-instructions used to manage several block sizes
Modified: trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series?rev=344&op=diff
==============================================================================
--- trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series (original)
+++ trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series Thu Sep 20 11:50:51 2007
@@ -7,6 +7,7 @@
ext3-mballoc3-core.patch
ext3-mballoc3-core-2.6.20-fixes.patch
ext3-mballoc3-2.6.20.patch
+ext3-nlinks-2.6.23.patch
ext3-ialloc-2.6.20.patch
bug10419-ialloc-ldiskfs.patch
ext3-remove-cond_resched-calls-2.6.12.patch
More information about the Pkg-lustre-svn-commit
mailing list