aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-11-30 19:22:21 -0500
committerTom Haynes <loghyr@primarydata.com>2015-02-03 14:06:51 -0500
commit012fa16dca0da6c487dd066829ff0b0954925fe6 (patch)
tree60bb1af7a0bd7c684738432dd8fadc77a93b9472 /fs/nfs
parentc829013dca33110d57c7f625443b716bd7a17671 (diff)
nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes
To allow pnfs LD to ask direct writes to be resend. Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c6
-rw-r--r--fs/nfs/internal.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index eb814789f700..4fad6b727eb4 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -116,6 +116,12 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
116 return atomic_dec_and_test(&dreq->io_count); 116 return atomic_dec_and_test(&dreq->io_count);
117} 117}
118 118
119void nfs_direct_set_resched_writes(struct nfs_direct_req *dreq)
120{
121 dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
122}
123EXPORT_SYMBOL_GPL(nfs_direct_set_resched_writes);
124
119static void 125static void
120nfs_direct_good_bytes(struct nfs_direct_req *dreq, struct nfs_pgio_header *hdr) 126nfs_direct_good_bytes(struct nfs_direct_req *dreq, struct nfs_pgio_header *hdr)
121{ 127{
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index ffe4b7ac9e6b..44e84960a26f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -502,6 +502,7 @@ static inline void nfs_inode_dio_wait(struct inode *inode)
502 inode_dio_wait(inode); 502 inode_dio_wait(inode);
503} 503}
504extern ssize_t nfs_dreq_bytes_left(struct nfs_direct_req *dreq); 504extern ssize_t nfs_dreq_bytes_left(struct nfs_direct_req *dreq);
505extern void nfs_direct_set_resched_writes(struct nfs_direct_req *dreq);
505 506
506/* nfs4proc.c */ 507/* nfs4proc.c */
507extern void __nfs4_read_done_cb(struct nfs_pgio_header *); 508extern void __nfs4_read_done_cb(struct nfs_pgio_header *);