diff options
author | NeilBrown <neilb@suse.com> | 2017-09-10 23:15:50 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-09-11 22:28:56 -0400 |
commit | bf4b49059718b2217339eb15c60f8753d5b0da99 (patch) | |
tree | 2093c477762d126516f215e2d7241164f098d38d /fs/nfs/write.c | |
parent | 8224b2734ab1da4996b851e1e5d3047e7a0df499 (diff) |
NFS: various changes relating to reporting IO errors.
1/ remove 'start' and 'end' args from nfs_file_fsync_commit().
They aren't used.
2/ Make nfs_context_set_write_error() a "static inline" in internal.h
so we can...
3/ Use nfs_context_set_write_error() instead of mapping_set_error()
if nfs_pageio_add_request() fails before sending any request.
NFS generally keeps errors in the open_context, not the mapping,
so this is more consistent.
4/ If filemap_write_and_write_range() reports any error, still
check ctx->error. The value in ctx->error is likely to be
more useful. As part of this, NFS_CONTEXT_ERROR_WRITE is
cleared slightly earlier, before nfs_file_fsync_commit() is called,
rather than at the start of that function.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index c66206ac4ebf..babebbccae2a 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -145,13 +145,6 @@ static void nfs_io_completion_put(struct nfs_io_completion *ioc) | |||
145 | kref_put(&ioc->refcount, nfs_io_completion_release); | 145 | kref_put(&ioc->refcount, nfs_io_completion_release); |
146 | } | 146 | } |
147 | 147 | ||
148 | static void nfs_context_set_write_error(struct nfs_open_context *ctx, int error) | ||
149 | { | ||
150 | ctx->error = error; | ||
151 | smp_wmb(); | ||
152 | set_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); | ||
153 | } | ||
154 | |||
155 | static struct nfs_page * | 148 | static struct nfs_page * |
156 | nfs_page_private_request(struct page *page) | 149 | nfs_page_private_request(struct page *page) |
157 | { | 150 | { |