summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_trans_resv.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_trans_resv.c')
-rw-r--r--fs/xfs/libxfs/xfs_trans_resv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index 54bbd7f3eae9..14d0da33ed7d 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -786,7 +786,10 @@ xfs_calc_imeta_create_resv(
unsigned int ret;
ret = xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
- ret += resp->tr_create.tr_logres;
+ if (xfs_sb_version_hasmetadir(&mp->m_sb))
+ ret += max(resp->tr_create.tr_logres, resp->tr_mkdir.tr_logres);
+ else
+ ret += resp->tr_create.tr_logres;
return ret;
}
@@ -796,6 +799,9 @@ xfs_calc_imeta_create_count(
struct xfs_mount *mp,
struct xfs_trans_resv *resp)
{
+ if (xfs_sb_version_hasmetadir(&mp->m_sb))
+ return max(resp->tr_create.tr_logcount,
+ resp->tr_mkdir.tr_logcount);
return resp->tr_create.tr_logcount;
}