xfs: use unhashed buffers for size checks
When we are checking we can access the last block of each device, we do not need to use cached buffers as they will be tossed away immediately. Use uncached buffers for size checks so that all IO prior to full in-memory structure initialisation does not use the buffer cache. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
parent
26af655233
commit
1922c949c5
3 changed files with 34 additions and 45 deletions
|
@ -144,12 +144,11 @@ xfs_growfs_data_private(
|
|||
if ((error = xfs_sb_validate_fsb_count(&mp->m_sb, nb)))
|
||||
return error;
|
||||
dpct = pct - mp->m_sb.sb_imax_pct;
|
||||
error = xfs_read_buf(mp, mp->m_ddev_targp,
|
||||
XFS_FSB_TO_BB(mp, nb) - XFS_FSS_TO_BB(mp, 1),
|
||||
XFS_FSS_TO_BB(mp, 1), 0, &bp);
|
||||
if (error)
|
||||
return error;
|
||||
ASSERT(bp);
|
||||
bp = xfs_buf_read_uncached(mp, mp->m_ddev_targp,
|
||||
XFS_FSB_TO_BB(mp, nb) - XFS_FSS_TO_BB(mp, 1),
|
||||
BBTOB(XFS_FSS_TO_BB(mp, 1)), 0);
|
||||
if (!bp)
|
||||
return EIO;
|
||||
xfs_buf_relse(bp);
|
||||
|
||||
new = nb; /* use new as a temporary here */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue