Commit 7be7b3ca authored by Trond Myklebust's avatar Trond Myklebust

NFS: Ensure we immediately start writeback on rescheduled writes

If the writes are being rescheduled due to a pNFS error, then we really
want to immediately start a new flush. The O_DIRECT code already does
this, so we only need to worry about buffered writes.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent bd3d16a8
...@@ -1406,6 +1406,8 @@ static void nfs_async_write_error(struct list_head *head) ...@@ -1406,6 +1406,8 @@ static void nfs_async_write_error(struct list_head *head)
static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr) static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr)
{ {
nfs_async_write_error(&hdr->pages); nfs_async_write_error(&hdr->pages);
filemap_fdatawrite_range(hdr->inode->i_mapping, hdr->args.offset,
hdr->args.offset + hdr->args.count - 1);
} }
static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = { static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = {
......
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