Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / lvfs / fsfilt_ext3.c
index 26ed65b..97758a6 100644 (file)
@@ -2094,6 +2094,16 @@ static int fsfilt_ext3_dquot(struct lustre_dquot *dquot, int cmd)
         }
         RETURN(rc);
 }
+
+static int fsfilt_ext3_get_mblk(struct super_block *sb, int *count,
+                                struct inode *inode, int frags)
+{
+        /* for an ost_write request, it needs <#fragments> * <tree depth + 1>
+         * metablocks at maxium b=16542 */
+        *count = frags * (EXT_DEPTH(inode) + 1) * EXT3_BLOCK_SIZE(sb);
+        return 0;
+}
+
 #endif
 
 lvfs_sbdev_type fsfilt_ext3_journal_sbdev(struct super_block *sb)
@@ -2138,6 +2148,7 @@ static struct fsfilt_operations fsfilt_ext3_ops = {
         .fs_quotainfo           = fsfilt_ext3_quotainfo,
         .fs_qids                = fsfilt_ext3_qids,
         .fs_dquot               = fsfilt_ext3_dquot,
+        .fs_get_mblk            = fsfilt_ext3_get_mblk,
 #endif
         .fs_journal_sbdev       = fsfilt_ext3_journal_sbdev,
 };