xfs
[Top] [All Lists]

[PATCH 2/2] xfsprogs: Make repair transaction reservation aware of xfs_b

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/2] xfsprogs: Make repair transaction reservation aware of xfs_buf_log_overhead()
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Fri, 07 Dec 2012 20:19:56 +0800
Cc: Dave Chinner <david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
Make the transaction reservation of repair works with the new 
xfs_buf_log_overhead().

Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
Cc: Dave Chinner <dchinner@xxxxxxxxxx>
---
 repair/phase6.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/repair/phase6.c b/repair/phase6.c
index cbe0b35..f6b0250 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -711,11 +711,12 @@ mk_rsumino(xfs_mount_t *mp)
        xfs_bmap_init(&flist, &first);
 
        nsumblocks = mp->m_rsumsize >> mp->m_sb.sb_blocklog;
-       if ((error = libxfs_trans_reserve(tp,
-                                 mp->m_sb.sb_rbmblocks +
-                                     (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
-                                 BBTOB(128), 0, XFS_TRANS_PERM_LOG_RES,
-                                 XFS_DEFAULT_PERM_LOG_COUNT)))
+       error = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
+                                    (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
+                                    BBTOB(xfs_buf_log_overhead()), 0,
+                                    XFS_TRANS_PERM_LOG_RES,
+                                    XFS_DEFAULT_PERM_LOG_COUNT);
+       if (error)
                res_failed(error);
 
        libxfs_trans_ijoin(tp, ip, 0);
-- 
1.7.9.5

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 2/2] xfsprogs: Make repair transaction reservation aware of xfs_buf_log_overhead(), Jeff Liu <=