diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-07-05 03:01:16 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-07-26 22:25:25 +0200 |
commit | 7be7b3ca16a59b8335ef2877f4696cf74f646d20 (patch) | |
tree | f84d064764e4646753ff1c7684244857662f6490 /fs/nfs | |
parent | NFSv4.1: Fix a potential layoutget/layoutrecall deadlock (diff) | |
download | linux-7be7b3ca16a59b8335ef2877f4696cf74f646d20.tar.xz linux-7be7b3ca16a59b8335ef2877f4696cf74f646d20.zip |
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: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index a057b4f45a46..586726a590d8 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -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) { 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 = { |