Whamcloud - gitweb
The proper fix for bug 1321. We were pruning multiple dentries inside our
authoradilger <adilger>
Fri, 20 Jun 2003 19:50:27 +0000 (19:50 +0000)
committeradilger <adilger>
Fri, 20 Jun 2003 19:50:27 +0000 (19:50 +0000)
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

index 7b10f5e..5f6322f 100644 (file)
@@ -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;