mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 05:56:41 +07:00
[XFS] Drop use of m_writeio_blocks when zeroing, its not meaningful
anymore here. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26094a Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
parent
72c93bcc63
commit
3d80ede479
@ -510,7 +510,6 @@ xfs_zero_eof(
|
|||||||
xfs_fileoff_t end_zero_fsb;
|
xfs_fileoff_t end_zero_fsb;
|
||||||
xfs_fileoff_t zero_count_fsb;
|
xfs_fileoff_t zero_count_fsb;
|
||||||
xfs_fileoff_t last_fsb;
|
xfs_fileoff_t last_fsb;
|
||||||
xfs_extlen_t buf_len_fsb;
|
|
||||||
xfs_mount_t *mp = io->io_mount;
|
xfs_mount_t *mp = io->io_mount;
|
||||||
int nimaps;
|
int nimaps;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
@ -579,16 +578,7 @@ xfs_zero_eof(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There are blocks in the range requested.
|
* There are blocks we need to zero.
|
||||||
* Zero them a single write at a time. We actually
|
|
||||||
* don't zero the entire range returned if it is
|
|
||||||
* too big and simply loop around to get the rest.
|
|
||||||
* That is not the most efficient thing to do, but it
|
|
||||||
* is simple and this path should not be exercised often.
|
|
||||||
*/
|
|
||||||
buf_len_fsb = XFS_FILBLKS_MIN(imap.br_blockcount,
|
|
||||||
mp->m_writeio_blocks << 8);
|
|
||||||
/*
|
|
||||||
* Drop the inode lock while we're doing the I/O.
|
* Drop the inode lock while we're doing the I/O.
|
||||||
* We'll still have the iolock to protect us.
|
* We'll still have the iolock to protect us.
|
||||||
*/
|
*/
|
||||||
@ -596,14 +586,13 @@ xfs_zero_eof(
|
|||||||
|
|
||||||
error = xfs_iozero(ip,
|
error = xfs_iozero(ip,
|
||||||
XFS_FSB_TO_B(mp, start_zero_fsb),
|
XFS_FSB_TO_B(mp, start_zero_fsb),
|
||||||
XFS_FSB_TO_B(mp, buf_len_fsb),
|
XFS_FSB_TO_B(mp, imap.br_blockcount),
|
||||||
end_size);
|
end_size);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
goto out_lock;
|
goto out_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
start_zero_fsb = imap.br_startoff + buf_len_fsb;
|
start_zero_fsb = imap.br_startoff + imap.br_blockcount;
|
||||||
ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
|
ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
|
||||||
|
|
||||||
XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
|
XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
|
||||||
|
Loading…
Reference in New Issue
Block a user