From 818de83d3200ae48dae7096500ba0118b8f95976 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Fri, 29 Jan 2010 01:53:20 +0100 Subject: [PATCH] b=21364 debug patch --- ldiskfs/kernel_patches/patches/ext4-bug21364-debug.patch | 13 +++++++++++++ ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series | 1 + lustre/obdfilter/filter.c | 9 +++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ldiskfs/kernel_patches/patches/ext4-bug21364-debug.patch diff --git a/ldiskfs/kernel_patches/patches/ext4-bug21364-debug.patch b/ldiskfs/kernel_patches/patches/ext4-bug21364-debug.patch new file mode 100644 index 0000000..6406b2d --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-bug21364-debug.patch @@ -0,0 +1,13 @@ +Index: linux-stage/fs/ext4/inode.c +=================================================================== +--- linux-stage.orig/fs/ext4/inode.c ++++ linux-stage/fs/ext4/inode.c +@@ -4145,6 +4145,8 @@ struct inode *ext4_iget(struct super_blo + if (inode->i_mode == 0 || + !(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) { + /* this inode is deleted */ ++ printk("ext4_iget() returns ESTALE for inode %lu (%p)" ++ "\n", ino, inode); + brelse(bh); + ret = -ESTALE; + goto bad_inode; diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series index bcf9753..b6c989b 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series @@ -33,3 +33,4 @@ ext4-dynlocks-common-sles11.patch ext4-dynlocks-2.6-rhel5.patch ext4-hash-indexed-dir-dotdot-update.patch ext4-disable-write-bar-by-default.patch +ext4-bug21364-debug.patch diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 86a7f5f..a12a632 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1433,8 +1433,9 @@ struct dentry *filter_fid2dentry(struct obd_device *obd, if (dir_dentry == NULL) filter_parent_unlock(dparent); if (IS_ERR(dchild)) { - CERROR("%s: child lookup error %ld\n", obd->obd_name, - PTR_ERR(dchild)); + CERROR("%s: child lookup error for object O/%.*s/%s (%ld)\n", + obd->obd_name, dparent->d_name.len, dparent->d_name.name, + name, PTR_ERR(dchild)); RETURN(dchild); } @@ -3353,6 +3354,10 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa, cleanup_phase = 1; /* filter_parent_unlock(dparent) */ dchild = filter_fid2dentry(obd, dparent, group, next_id); + if (IS_ERR(dchild) && PTR_ERR(dchild) == -ESTALE) { + CERROR("parent %p child %p\n", dparent, dchild); + LBUG(); + } if (IS_ERR(dchild)) GOTO(cleanup, rc = PTR_ERR(dchild)); cleanup_phase = 2; /* f_dput(dchild) */ -- 1.8.3.1