| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 07/20] xfs: realtime rmap btree transaction reservations |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 25 Aug 2016 16:44:11 -0700 |
| Cc: | linux-xfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <147216860614.3688.3200692982609112535.stgit@xxxxxxxxxxxxxxxx> |
| References: | <147216860614.3688.3200692982609112535.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
Make sure that there's enough log reservation to handle mapping
and unmapping realtime extents. We have to reserve enough space
to handle a split in the rtrmapbt to add the record and a second
split in the regular rmapbt to record the rtrmapbt split.
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
fs/xfs/libxfs/xfs_trans_resv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index b456cca..f9771b7 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -83,7 +83,8 @@ xfs_allocfree_log_count(
blocks = num_ops * 2 * (2 * mp->m_ag_maxlevels - 1);
if (xfs_sb_version_hasrmapbt(&mp->m_sb))
- blocks += num_ops * (2 * mp->m_rmap_maxlevels - 1);
+ blocks += max(num_ops * (2 * mp->m_rmap_maxlevels - 1),
+ num_ops * (2 * mp->m_rtrmap_maxlevels - 1));
if (xfs_sb_version_hasreflink(&mp->m_sb))
blocks += num_ops * (2 * mp->m_refc_maxlevels - 1);
|
| Previous by Date: | [PATCH 06/20] xfs: define the on-disk realtime rmap btree format, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 08/20] xfs: add realtime rmap btree operations, Darrick J. Wong |
| Previous by Thread: | [PATCH 06/20] xfs: define the on-disk realtime rmap btree format, Darrick J. Wong |
| Next by Thread: | [PATCH 08/20] xfs: add realtime rmap btree operations, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |