Commit c57371a1 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: don't clear imap_valid for a non-uptodate buffers

Finding a buffer that isn't uptodate doesn't invalidate the mapping for
any given block.  The last_sector check will already take care of starting
another ioend as soon as we find any non-update buffer, and if the current
mapping doesn't include the next uptodate buffer the xfs_imap_valid check
will take care of it.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 91cdfd17
...@@ -863,10 +863,8 @@ xfs_writepage_map( ...@@ -863,10 +863,8 @@ xfs_writepage_map(
* meaningless for holes (!mapped && uptodate), so skip * meaningless for holes (!mapped && uptodate), so skip
* buffers covering holes here. * buffers covering holes here.
*/ */
if (!buffer_mapped(bh) && buffer_uptodate(bh)) { if (!buffer_mapped(bh) && buffer_uptodate(bh))
wpc->imap_valid = false;
continue; continue;
}
if (buffer_unwritten(bh)) if (buffer_unwritten(bh))
new_type = XFS_IO_UNWRITTEN; new_type = XFS_IO_UNWRITTEN;
...@@ -879,11 +877,8 @@ xfs_writepage_map( ...@@ -879,11 +877,8 @@ xfs_writepage_map(
ASSERT(buffer_mapped(bh)); ASSERT(buffer_mapped(bh));
/* /*
* This buffer is not uptodate and will not be * This buffer is not uptodate and will not be
* written to disk. Ensure that we will put any * written to disk.
* subsequent writeable buffers into a new
* ioend.
*/ */
wpc->imap_valid = false;
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment