From 3435457051e320e72ab354865124d4b2f37a2beb Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 20 Jun 2003 19:50:27 +0000 Subject: [PATCH] The proper fix for bug 1321. We were pruning multiple dentries inside our transaction, and that was consuming all of our transaction blocks on us. Instead, do the dentry pruning ourselves before starting the transaction handle and calling vfs_rmdir()->d_unhash()->shrink_dcache_parent(). --- lustre/obdclass/fsfilt_ext3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lustre/obdclass/fsfilt_ext3.c b/lustre/obdclass/fsfilt_ext3.c index 7b10f5e..5f6322f 100644 --- a/lustre/obdclass/fsfilt_ext3.c +++ b/lustre/obdclass/fsfilt_ext3.c @@ -66,8 +66,6 @@ static void *fsfilt_ext3_start(struct inode *inode, int op) switch(op) { case FSFILT_OP_RMDIR: - /* The MDS does a compound unlink + truncate */ - nblocks += EXT3_DELETE_TRANS_BLOCKS; case FSFILT_OP_UNLINK: nblocks += EXT3_DELETE_TRANS_BLOCKS; break; @@ -126,7 +124,7 @@ static void *fsfilt_ext3_start(struct inode *inode, int op) * objcount inode blocks * 1 superblock * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quota files - * + * * 1 EXT3_DATA_TRANS_BLOCKS for the last_rcvd update. */ static int fsfilt_ext3_credits_needed(int objcount, struct fsfilt_objinfo *fso) @@ -157,7 +155,7 @@ static int fsfilt_ext3_credits_needed(int objcount, struct fsfilt_objinfo *fso) ngdblocks = EXT3_SB(sb)->s_gdb_count; needed += nbitmaps + ngdblocks; - + /* last_rcvd update */ needed += EXT3_DATA_TRANS_BLOCKS; -- 1.8.3.1