summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 11:44:06 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 13:50:42 -0500
commitdc602dd706cb64036132a7903ead1c67d9a7bcb9 (patch)
tree88d632825b446b8445a0219c3ac24a00a1d2853b /fs/nfs/write.c
parente07db907eb80525874b7707c62cc6f5e975ef130 (diff)
NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs
The flexfiles layout in particular, seems to want to poke around in the O_DIRECT flags when retransmitting. This patch sets up an interface to allow it to call back into O_DIRECT to handle retransmission correctly. It also fixes a potential bug whereby we could change the behaviour of O_DIRECT if an error is already pending. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 7b9316406930..0aa3e6b3db70 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1326,9 +1326,15 @@ static void nfs_async_write_error(struct list_head *head)
1326 } 1326 }
1327} 1327}
1328 1328
1329static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr)
1330{
1331 nfs_async_write_error(&hdr->pages);
1332}
1333
1329static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = { 1334static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = {
1330 .error_cleanup = nfs_async_write_error, 1335 .error_cleanup = nfs_async_write_error,
1331 .completion = nfs_write_completion, 1336 .completion = nfs_write_completion,
1337 .reschedule_io = nfs_async_write_reschedule_io,
1332}; 1338};
1333 1339
1334void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, 1340void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,