Whamcloud - gitweb
Land b_orphan on HEAD (20040130_1601)
[fs/lustre-release.git] / lustre / lvfs / fsfilt_ext3.c
index 5de8a9b..a45560a 100644 (file)
@@ -74,6 +74,7 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private)
 {
         /* For updates to the last recieved file */
         int nblocks = EXT3_DATA_TRANS_BLOCKS;
+        int blocksize, block_count = 0;
         void *handle;
 
         if (current->journal_info) {
@@ -119,6 +120,13 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private)
                 /* Setattr on inode */
                 nblocks += 1;
                 break;
+        case FSFILT_OP_CANCEL_UNLINK_LOG:
+                blocksize = 1 << inode->i_blkbits;
+                block_count = (blocksize - 1) + LLOG_CHUNK_SIZE;
+                block_count = (block_count + blocksize - 1) >> inode->i_blkbits;
+                block_count = block_count * EXT3_DATA_TRANS_BLOCKS + 2;
+                nblocks = 2 * 2 * block_count;
+                break;
         default: CERROR("unknown transaction start op %d\n", op);
                  LBUG();
         }