xfs
[Top] [All Lists]

[PATCH] xfs: get new buffer for secondary superblocks from the first new

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfs: get new buffer for secondary superblocks from the first new AG
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Thu, 21 Mar 2013 12:12:51 +0800
Cc: Dave Chinner <david@xxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
In growfs operation, the unused parts of superblocks in the latest old AG are
zero filled, hence we can safely read the secondary superblock buffer of it
rather than getting a new buffer for it again.

This is a small refinement for commits 1375cb65.

Cc: Dave Chinner <david@xxxxxxxxxxxxx>
Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
---
 fs/xfs/xfs_fsops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 94eaeed..7d435dd 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -449,7 +449,7 @@ xfs_growfs_data_private(
                 * disk as the contents of the new area we are growing into is
                 * completely unknown.
                 */
-               if (agno < oagcount) {
+               if (agno <= oagcount) {
                        error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp,
                                  XFS_AGB_TO_DADDR(mp, agno, XFS_SB_BLOCK(mp)),
                                  XFS_FSS_TO_BB(mp, 1), 0, &bp,
-- 
1.7.9.5

<Prev in Thread] Current Thread [Next in Thread>