Whamcloud - gitweb
LU-7014 osd: add additional credits for generic IAM delete 13/16213/3
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Thu, 3 Sep 2015 10:46:11 +0000 (13:46 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 19 Sep 2015 03:34:44 +0000 (03:34 +0000)
IAM is different from regular htree used by regular directories.
it can recycle and shrink blocks which needs additional credits.

Change-Id: I819d26206b158a0e8ef2a9110ba89fe34e5a1925
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/16213
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_handler.c

index ee45354..b99c079 100644 (file)
@@ -3287,8 +3287,9 @@ static int osd_index_declare_iam_delete(const struct lu_env *env,
         oh = container_of0(handle, struct osd_thandle, ot_super);
         LASSERT(oh->ot_handle == NULL);
 
+       /* Recycle  may cause additional three blocks to be changed. */
        osd_trans_declare_op(env, oh, OSD_OT_DELETE,
-                            osd_dto_credits_noquota[DTO_INDEX_DELETE]);
+                            osd_dto_credits_noquota[DTO_INDEX_DELETE] + 3);
 
        return 0;
 }