summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-14 17:53:49 +1100
committerBen Myers <bpm@sgi.com>2012-11-15 21:35:09 -0600
commitb0f539de9fcc543a3ffa40bc22bf51aca6ea6183 (patch)
treefe2e14add152900a3bd480714c886f8a86a2082d /fs/xfs/xfs_fsops.c
parent612cfbfe174a89d565363fff7f3961a2dda5fb71 (diff)
downloadop-kernel-dev-b0f539de9fcc543a3ffa40bc22bf51aca6ea6183.zip
op-kernel-dev-b0f539de9fcc543a3ffa40bc22bf51aca6ea6183.tar.gz
xfs: connect up write verifiers to new buffers
Metadata buffers that are read from disk have write verifiers already attached to them, but newly allocated buffers do not. Add appropriate write verifiers to all new metadata buffers. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r--fs/xfs/xfs_fsops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index cb65b06..5d6d6b9 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -222,6 +222,7 @@ xfs_growfs_data_private(
error = ENOMEM;
goto error0;
}
+ bp->b_pre_io = xfs_agf_write_verify;
agf = XFS_BUF_TO_AGF(bp);
agf->agf_magicnum = cpu_to_be32(XFS_AGF_MAGIC);
@@ -259,6 +260,7 @@ xfs_growfs_data_private(
error = ENOMEM;
goto error0;
}
+ bp->b_pre_io = xfs_agfl_write_verify;
agfl = XFS_BUF_TO_AGFL(bp);
for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++)
@@ -279,6 +281,7 @@ xfs_growfs_data_private(
error = ENOMEM;
goto error0;
}
+ bp->b_pre_io = xfs_agi_write_verify;
agi = XFS_BUF_TO_AGI(bp);
agi->agi_magicnum = cpu_to_be32(XFS_AGI_MAGIC);
@@ -450,9 +453,10 @@ xfs_growfs_data_private(
bp = xfs_trans_get_buf(NULL, mp->m_ddev_targp,
XFS_AGB_TO_DADDR(mp, agno, XFS_SB_BLOCK(mp)),
XFS_FSS_TO_BB(mp, 1), 0);
- if (bp)
+ if (bp) {
xfs_buf_zero(bp, 0, BBTOB(bp->b_length));
- else
+ bp->b_pre_io = xfs_sb_write_verify;
+ } else
error = ENOMEM;
}
OpenPOWER on IntegriCloud