add support for IO_ADVISE
Subsystems (2)
PATCH 1/2 NFS: add IO_ADVISE operation
In reply to Jorge MoraAdds support for using the NFS v4.2 operation IO_ADVISE to send client I/O access pattern hints to the server.
There is a one-to-one correspondence between the advice (POSIX_FADV_*) given in fadvise64() and the bitmap mask sent to the server. Any other advice given results in just calling generic_fadvise().
The bitmap mask given by the server reply is just ignored since the fadvise64() returns 0 on success. If server replies with more than one bitmap word, only the first word is stored on the nfs42_io_advise_res struct and all other words are ignored.
--- fs/nfs/nfs42.h | 1 + fs/nfs/nfs42proc.c | 67 +++++++++++++++++++++++++++++++ fs/nfs/nfs42xdr.c | 84 +++++++++++++++++++++++++++++++++++++++ fs/nfs/nfs4file.c | 37 +++++++++++++++++ fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 1 + include/linux/nfs4.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 28 +++++++++++++ 9 files changed, 221 insertions(+)
fs/nfs/nfs42.h +1 -0
@@ -20,6 +20,7 @@ int nfs42_proc_allocate(struct file *, loff_t, loff_t);ssize_t nfs42_proc_copy (struct file *,loff_t ,struct file *,loff_t ,size_t ,struct nl4_server *,nfs4_stateid *,bool );int nfs42_proc_deallocate (struct file *,loff_t ,loff_t ); +int nfs42_proc_io_advise (struct file *,loff_t ,u64 ,u32 );loff_t nfs42_proc_llseek (struct file *,loff_t ,int );int nfs42_proc_layoutstats_generic (struct nfs_server *,struct nfs42_layoutstat_data *);
fs/nfs/nfs42proc.c +67 -0
73 lines not on this page · raw message
fs/nfs/nfs42xdr.c +84 -0
120 lines not on this page · raw message
fs/nfs/nfs4file.c +37 -0
@@ -7,6 +7,7 @@#include <linux/fs.h> #include <linux/file.h> #include <linux/falloc.h> +#include <linux/fadvise.h> #include <linux/mount.h> #include <linux/nfs_fs.h> #include <linux/nfs_ssc.h>
@@ -236,6 +237,41 @@ static long nfs42_fallocate(struct file *filep, int mode, loff_t offset, loff_treturn nfs42_proc_allocate (filep, offset, len); } +static int nfs42_file_fadvise (struct file *filep,loff_t start,loff_t len,int advice) +{ +int ret; +unsigned int hints =0 ; + +switch (advice) { +case POSIX_FADV_NORMAL : + hints =NFS_IO_ADVISE4_NORMAL ; +break ; +case POSIX_FADV_RANDOM : + hints =NFS_IO_ADVISE4_RANDOM ; +break ; +case POSIX_FADV_SEQUENTIAL : + hints =NFS_IO_ADVISE4_SEQUENTIAL ; +break ; +case POSIX_FADV_WILLNEED : + hints =NFS_IO_ADVISE4_WILLNEED ; +break ; +case POSIX_FADV_DONTNEED : + hints =NFS_IO_ADVISE4_DONTNEED ; +break ; +case POSIX_FADV_NOREUSE : + hints =NFS_IO_ADVISE4_NOREUSE ; +break ; +default : + goto out; + } + + ret =nfs42_proc_io_advise (filep, start, len, hints); +if (ret <0 ) +return ret; +out: +return generic_fadvise (filep, start, len, advice); +} +static loff_t nfs42_remap_file_range (struct file *src_file,loff_t src_off,struct file *dst_file,loff_t dst_off,loff_t count,unsigned int remap_flags)
@@ -462,6 +498,7 @@ const struct file_operations nfs4_file_operations = { .copy_file_range = nfs4_copy_file_range, .llseek = nfs4_file_llseek, .fallocate = nfs42_fallocate, + .fadvise = nfs42_file_fadvise, .remap_file_range = nfs42_remap_file_range, #else .llseek = nfs_file_llseek,
fs/nfs/nfs4proc.c +1 -0
@@ -10529,6 +10529,7 @@ static const struct nfs4_minor_version_ops nfs_v4_2_minor_ops = { | NFS_CAP_OFFLOAD_CANCEL |NFS_CAP_COPY_NOTIFY |NFS_CAP_DEALLOCATE + |NFS_CAP_IO_ADVISE |NFS_CAP_SEEK |NFS_CAP_LAYOUTSTATS |NFS_CAP_CLONE
fs/nfs/nfs4xdr.c +1 -0
@@ -7698,6 +7698,7 @@ const struct rpc_procinfo nfs4_procedures[] = {PROC42 (SEEK , enc_seek, dec_seek),PROC42 (ALLOCATE , enc_allocate, dec_allocate),PROC42 (DEALLOCATE , enc_deallocate, dec_deallocate), +PROC42 (IO_ADVISE , enc_io_advise, dec_io_advise),PROC42 (LAYOUTSTATS , enc_layoutstats, dec_layoutstats),PROC42 (CLONE , enc_clone, dec_clone), PROC42(COPY, enc_copy, dec_copy),
include/linux/nfs4.h +1 -0
@@ -557,6 +557,7 @@ enum {NFSPROC4_CLNT_LISTXATTRS ,NFSPROC4_CLNT_REMOVEXATTR ,NFSPROC4_CLNT_READ_PLUS , + NFSPROC4_CLNT_IO_ADVISE, };/* nfs41 types */
include/linux/nfs_fs_sb.h +1 -0
@@ -270,6 +270,7 @@ struct nfs_server {#define NFS_CAP_LGOPEN (1U << 5)#define NFS_CAP_CASE_INSENSITIVE (1U << 6)#define NFS_CAP_CASE_PRESERVING (1U << 7) +#define NFS_CAP_IO_ADVISE (1U << 13)#define NFS_CAP_POSIX_LOCK (1U << 14)#define NFS_CAP_UIDGID_NOMAP (1U << 15)#define NFS_CAP_STATEID_NFSV41 (1U << 16)
include/linux/nfs_xdr.h +28 -0
@@ -17,6 +17,18 @@#define NFS_BITMASK_SZ 3 +#define NFS_IO_ADVISE4_NORMAL (1U << 0) +#define NFS_IO_ADVISE4_SEQUENTIAL (1U << 1) +#define NFS_IO_ADVISE4_SEQUENTIAL_BACKWARDS (1U << 2) +#define NFS_IO_ADVISE4_RANDOM (1U << 3) +#define NFS_IO_ADVISE4_WILLNEED (1U << 4) +#define NFS_IO_ADVISE4_WILLNEED_OPPORTUNISTIC (1U << 5) +#define NFS_IO_ADVISE4_DONTNEED (1U << 6) +#define NFS_IO_ADVISE4_NOREUSE (1U << 7) +#define NFS_IO_ADVISE4_READ (1U << 8) +#define NFS_IO_ADVISE4_WRITE (1U << 9) +#define NFS_IO_ADVISE4_INIT_PROXIMITY (1U << 10) +struct nfs4_string {unsigned int len;char *data;
@@ -1449,6 +1461,22 @@ struct nfs42_falloc_res {const struct nfs_server *falloc_server; }; +struct nfs42_io_advise_args { +struct nfs4_sequence_args seq_args; + +struct nfs_fh *fh; +nfs4_stateid stateid; +loff_t offset; +u64 count; +u32 hints; +}; + +struct nfs42_io_advise_res { +struct nfs4_sequence_res seq_res; + +u32 hints; +}; +struct nfs42_copy_args {struct nfs4_sequence_args seq_args;
Signature · 1 line
2.31.1
cover add support for IO_ADVISE
Adds support for using the NFS v4.2 operation IO_ADVISE to send client I/O access pattern hints to the server.
There is a one-to-one correspondence between the advice (POSIX_FADV_*) given in fadvise64() and the bitmap mask sent to the server. Any other advice given, results in just calling generic_fadvise().
The bitmap mask given by the server reply is just ignored since the fadvise64() returns 0 on success. If server replies with more than one bitmap word, only the first word is stored on the nfs42_io_advise_res struct and all other words are ignored.
Added trace point (nfs4_io_advise) for this operation:nfs4_io_advise: error=0 (OK) fileid=00:32:4217220 \
fhandle=0x4a271991 stateid=0:0x30b83748 offset=0 \
count=200 arg_hints=SEQUENTIAL res_hints=SEQUENTIAL
Jorge Mora (2):
NFS: add IO_ADVISE operation
NFSv4.2 add tracepoint to IO_ADVISE
fs/nfs/nfs42.h | 1 + fs/nfs/nfs42proc.c | 68 +++++++++++++++++++++++++++++++ fs/nfs/nfs42xdr.c | 84 +++++++++++++++++++++++++++++++++++++++ fs/nfs/nfs4file.c | 37 +++++++++++++++++ fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4trace.h | 75 ++++++++++++++++++++++++++++++++++ fs/nfs/nfs4xdr.c | 1 + include/linux/nfs4.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 28 +++++++++++++ 10 files changed, 297 insertions(+)
Signature · 1 line
2.31.1
PATCH 2/2 NFSv4.2 add tracepoint to IO_ADVISE
Add a tracepoint to the IO_ADVISE operation.
--- fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs4trace.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+)
fs/nfs/nfs42proc.c +1 -0
@@ -205,6 +205,7 @@ static loff_t _nfs42_proc_io_advise(struct file *filep, status =nfs4_call_sync (server->client, server, &msg, &args.seq_args, &res.seq_res,0 ); +trace_nfs4_io_advise (inode, &args, &res, status);if (status == -ENOTSUPP ) server->caps &= ~NFS_CAP_IO_ADVISE ;return status;
fs/nfs/nfs4trace.h +75 -0
81 lines not on this page · raw message
Signature · 1 line
2.31.1
Trond Myklebust
maintainerRe: [PATCH v1 1/2] NFS: add IO_ADVISE operation
In reply to Jorge MoraQuoted 308 lines · Jorge Mora
Adds support for using the NFS v4.2 operation
IO_ADVISEto send client I/O access pattern hints to the server.There is a one-to-one correspondence between the advice (POSIX_FADV_*) given in
fadvise64()and the bitmap mask sent to the server. Any other advice given results in just callinggeneric_fadvise().The bitmap mask given by the server reply is just ignored since the
fadvise64()returns 0 on success. If server replies with more than one bitmap word, only the first word is stored on thenfs42_io_advise_resstruct and all other words are ignored.Signed-off-by Jorge Mora <[email protected]>---
fs/nfs/nfs42.h | 1 +
fs/nfs/nfs42proc.c | 67 +++++++++++++++++++++++++++++++ fs/nfs/nfs42xdr.c | 84
+++++++++++++++++++++++++++++++++++++++
fs/nfs/nfs4file.c | 37 +++++++++++++++++ fs/nfs/nfs4proc.c | 1 +
fs/nfs/nfs4xdr.c | 1 + include/linux/nfs4.h | 1 +include/linux/nfs_fs_sb.h| 1 + include/linux/nfs_xdr.h | 28 +++++++++++++9 files changed, 221 insertions(+)fs/nfs/nfs42.h +1
-0@@ -20,6 +20,7 @@ int nfs42_proc_allocate(struct file *, loff_t, loff_t); ssize_t nfs42_proc_copy(struct file *, loff_t, struct file *,loff_t ,size_t , struct nl4_server *, nfs4_stateid *, bool); int nfs42_proc_deallocate(struct file *, loff_t, loff_t); +int nfs42_proc_io_advise (struct file *,loff_t ,u64 ,u32 ); loff_t nfs42_proc_llseek(struct file *, loff_t, int);int
nfs42_proc_layoutstats_generic(struct nfs_server *, struct nfs42_layoutstat_data *);fs/nfs/nfs42proc.c +0
-0@@ -172,6 +172,73 @@ int nfs42_proc_deallocate(struct file *filep, loff_t offset, loff_t len) return err; }fs/nfs/nfs42proc.c +14
-0+static loff_t _nfs42_proc_io_advise (struct file *filep, + struct nfs_lock_context *lock, loff_t offset, + u64 count, u32 hints) +{ + struct inode *inode = file_inode(filep); + struct nfs42_io_advise_args args = { + .fh = NFS_FH(inode), + .offset = offset, + .count = count, + .hints = hints, + }; + struct nfs42_io_advise_res res; + struct rpc_message msg = { + .rpc_proc =&nfs4_procedures[NFSPROC4_CLNT_IO_ADVISE],
+ .rpc_argp = &args,
+ .rpc_resp = &res,
+ };
+ structnfs_server*server =NFS_SERVER(inode); + int status;fs/nfs/nfs42proc.c +5
-0+ + if (!nfs_server_capable(inode, NFS_CAP_IO_ADVISE)) + return -ENOTSUPP; + + status = nfs4_set_rw_stateid(&args.stateid, lock-Quoted 1 line
open_context,+ lock,
FMODE_READ);
+ if (status) {
+ if (status ==-EAGAIN)
+ status = -NFS4ERR_BAD_STATEID; + return status;
+ }fs/nfs/nfs42proc.c +9
-0+ + status = nfs4_call_sync(server->client, server, &msg, + &args.seq_args, &res.seq_res, 0); + if (status == -ENOTSUPP) + server->caps &= ~NFS_CAP_IO_ADVISE; + return status; +} + +int nfs42_proc_io_advise(struct file *filep, loff_t offset, u64count, u32 hints)
fs/nfs/nfs42proc.c +15
-0+{ + struct nfs_server *server = NFS_SERVER(file_inode(filep)); + struct nfs4_exception exception = { }; + struct nfs_lock_context *lock; + loff_t err; + + lock = nfs_get_lock_context(nfs_file_open_context(filep)); + if (IS_ERR(lock)) + return PTR_ERR(lock); + + exception.inode = file_inode(filep); + exception.state = lock->open_context->state; + + do { + err = _nfs42_proc_io_advise(filep, lock, offset,count, hints);
+ if (err >= 0)
+ break;
+ if (err ==-ENOTSUPP) {
+ err =-EOPNOTSUPP;
+ break;
+ }
+ err =nfs4_handle_exception(server, err, &exception); + } while (exception.retry);fs/nfs/nfs42proc.c +5
-0+ + nfs_put_lock_context(lock); + return err; +} +static int handle_async_copy(struct
nfs42_copy_res*res, structnfs_server*dst_server, structnfs_server*src_server,fs/nfs/nfs42xdr.c +2
-0@@ -45,6 +45,14 @@ #define encode_deallocate_maxsz (op_encode_hdr_maxsz + \ encode_fallocate_maxsz) #define decode_deallocate_maxsz (op_decode_hdr_maxsz) +#define nfs42_io_advise_bitmap_maxsz 2/* bitmap length and hints mask */
+#define encode_io_advise_maxsz (op_encode_hdr_maxsz + \
+encode_stateid_maxsz+ \
+ 2 /* offset */ + \
+ 2 /* count */ + \
+nfs42_io_advise_bitmap_maxsz/* hints */)
+#define decode_io_advise_maxsz (op_decode_hdr_maxsz + \
+nfs42_io_advise_bitmap_maxsz/* hints */)
#define encode_read_plus_maxsz (op_encode_hdr_maxsz + \
encode_stateid_maxsz+ 3) #defineNFS42_READ_PLUS_DATA_SEGMENT_SIZE\fs/nfs/nfs42xdr.c +8
-0@@ -138,6 +146,14 @@ decode_putfh_maxsz + \ decode_deallocate_maxsz + \ decode_getattr_maxsz) +#define NFS4_enc_io_advise_sz (compound_encode_hdr_maxsz + \ + encode_sequence_maxsz + \ + encode_putfh_maxsz + \ + encode_io_advise_maxsz) +#define NFS4_dec_io_advise_sz (compound_decode_hdr_maxsz + \ + decode_sequence_maxsz + \ + decode_putfh_maxsz + \ + decode_io_advise_maxsz) #define NFS4_enc_read_plus_sz (compound_encode_hdr_maxsz +\
encode_sequence_maxsz+ \
encode_putfh_maxsz+ \fs/nfs/nfs42xdr.c +0
-0@@ -342,6 +358,17 @@ static void encode_deallocate(struct xdr_stream *xdr, encode_fallocate(xdr, args); }fs/nfs/nfs42xdr.c +5
-0+static void encode_io_advise (struct xdr_stream *xdr, + const struct nfs42_io_advise_args *args, + struct compound_hdr *hdr) +{ + encode_op_hdr(xdr, OP_IO_ADVISE, decode_io_advise_maxsz,hdr);
+ encode_nfs4_stateid(xdr,&args->stateid); + encode_uint64(xdr,args->offset);
+ encode_uint64(xdr,args->count);
+ xdr_encode_bitmap4(xdr,&args->hints, 1);fs/nfs/nfs42xdr.c +2
-0+} +static void
encode_read_plus(struct xdr_stream *xdr, const struct nfs_pgio_args *args, struct compound_hdr *hdr)fs/nfs/nfs42xdr.c +0
-0@@ -764,6 +791,25 @@ static void nfs4_xdr_enc_deallocate(structrpc_rqst *req, encode_nops(&hdr); }fs/nfs/nfs42xdr.c +10
-0+/* +* Encode IO_ADVISE request +*/ +static void nfs4_xdr_enc_io_advise(struct rpc_rqst *req, + struct xdr_stream *xdr, + const void *data) +{ + const struct nfs42_io_advise_args *args = data; + struct compound_hdr hdr = { + .minorversion = nfs4_xdr_minorversion(&args-Quoted 1 line
seq_args),+ };
fs/nfs/nfs42xdr.c +8
-0+ + encode_compound_hdr(xdr, req, &hdr); + encode_sequence(xdr, &args->seq_args, &hdr); + encode_putfh(xdr, args->fh, &hdr); + encode_io_advise(xdr, args, &hdr); + encode_nops(&hdr); +} +/*
* EncodeREAD_PLUSrequest
*/fs/nfs/nfs42xdr.c +0
-0@@ -1034,6 +1080,19 @@ static int decode_deallocate(struct xdr_stream *xdr, struct nfs42_falloc_res *re return decode_op_hdr(xdr, OP_DEALLOCATE); }
+static intdecode_io_advise(struct xdr_stream *xdr, struct nfs42_io_advise_res *res)fs/nfs/nfs42xdr.c +12
-0+{ + int status; + + status = decode_op_hdr(xdr, OP_IO_ADVISE); + if (status) + return status; + + if (unlikely(decode_bitmap4(xdr, &res->hints, 1) < 0)) + return -EIO; + return 0; +} +struct
read_plus_segment{
enumdata_content4type;
uint64_t offset;fs/nfs/nfs42xdr.c +0
-0@@ -1337,6 +1396,31 @@ static int nfs4_xdr_dec_deallocate(structrpc_rqst *rqstp, return status; }fs/nfs/nfs42xdr.c +25
-0+/* +* Decode IO_ADVISE response +*/ +static int nfs4_xdr_dec_io_advise (struct rpc_rqst *rqstp, + struct xdr_stream *xdr, + void *data) +{ + struct nfs42_io_advise_res *res = data; + struct compound_hdr hdr; + int status; + + status = decode_compound_hdr(xdr, &hdr); + if (status) + goto out; + status = decode_sequence(xdr, &res->seq_res, rqstp); + if (status) + goto out; + status = decode_putfh(xdr); + if (status) + goto out; + status = decode_io_advise(xdr, res); +out: + return status; +} +/*
* DecodeREAD_PLUSrequest
*/fs/nfs/nfs4file.c +1
-0@@ -7,6 +7,7 @@ #include <linux/fs.h> #include <linux/file.h> #include <linux/falloc.h> +#include <linux/fadvise.h> #include <linux/mount.h> #include <linux/nfs_fs.h> #include <linux/nfs_ssc.h>@@ -236,6 +237,41 @@ static long nfs42_fallocate(struct file *filep,int mode,
loff_toffset,loff_t
returnnfs42_proc_allocate(filep, offset, len); }
+static intnfs42_file_fadvise(struct file *filep, loff_t start, loff_t len, int advice)fs/nfs/nfs4file.c +20
-0+{ + int ret; + unsigned int hints = 0; + + switch (advice) { + case POSIX_FADV_NORMAL: + hints = NFS_IO_ADVISE4_NORMAL; + break; + case POSIX_FADV_RANDOM: + hints = NFS_IO_ADVISE4_RANDOM; + break; + case POSIX_FADV_SEQUENTIAL: + hints = NFS_IO_ADVISE4_SEQUENTIAL; + break; + case POSIX_FADV_WILLNEED: + hints = NFS_IO_ADVISE4_WILLNEED; + break; + case POSIX_FADV_DONTNEED: + hints = NFS_IO_ADVISE4_DONTNEED; + break;
fs/nfs/nfs4file.c static long nfs42_fallocate(struct file *filep, int mode, loff_t offset, loff_t · line 270
Quoted 10 lines
fs/nfs/nfs4file.c +10
-0+ case POSIX_FADV_NOREUSE: + hints = NFS_IO_ADVISE4_NOREUSE; + break; + default: + goto out; + } + + ret = nfs42_proc_io_advise(filep, start, len, hints); + if (ret < 0) + return ret;
No! We should never return any server errors for this function. If the server doesn't like what we send, then that is just too bad. Either way, we want the page cache on the client to be changed to behave the way it is supposed to.
IOW: Notifying the server is, quite frankly, a secondary function here. The primary purpose of fadvise() is to change the behaviour of the client.
Note: With this in mind, it might not be a bad idea to just make the RPC call asynchronous, so that it runs in the background and doesn't interrupt the client.
Quoted 116 lines
fs/nfs/nfs4file.c +4
-0+out: + return generic_fadvise(filep, start, len, advice); +} +static
loff_tnfs42_remap_file_range(struct file*src_file,loff_tsrc_off,
struct file*dst_file,loff_tdst_off,loff_tcount, unsigned intremap_flags)fs/nfs/nfs4file.c +1
-0@@ -462,6 +498,7 @@ const struct file_operations nfs4_file_operations = { .copy_file_range = nfs4_copy_file_range, .llseek = nfs4_file_llseek, .fallocate = nfs42_fallocate, + .fadvise = nfs42_file_fadvise, .remap_file_range = nfs42_remap_file_range, #else.llseek =
nfs_file_llseek,fs/nfs/nfs4proc.c +0
-0@@ -10529,6 +10529,7 @@ static const struct nfs4_minor_version_ops nfs_v4_2_minor_ops = {| NFS_CAP_OFFLOAD_CANCEL | NFS_CAP_COPY_NOTIFY | NFS_CAP_DEALLOCATE + | NFS_CAP_IO_ADVISE | NFS_CAP_SEEK | NFS_CAP_LAYOUTSTATS | NFS_CAP_CLONEfs/nfs/nfs4xdr.c +0
-0@@ -7698,6 +7698,7 @@ const struct rpc_procinfo nfs4_procedures[] = { PROC42(SEEK, enc_seek, dec_seek), PROC42(ALLOCATE, enc_allocate, dec_allocate) ,PROC42(DEALLOCATE, enc_deallocate, dec_deallocat e),
+ PROC42(IO_ADVISE, enc_io_advise, dec_io_advise ),
PROC42(LAYOUTSTATS, enc_layoutstats, dec_layoutsta ts),
PROC42(CLONE, enc_clone, dec_clone),PROC42(COPY, enc_copy, dec_copy),include/linux/nfs4.h +1
-0@@ -557,6 +557,7 @@ enum { NFSPROC4_CLNT_LISTXATTRS, NFSPROC4_CLNT_REMOVEXATTR, NFSPROC4_CLNT_READ_PLUS, + NFSPROC4_CLNT_IO_ADVISE, };
/* nfs41 types */include/linux/nfs_fs_sb.h +1
-0@@ -270,6 +270,7 @@ struct nfs_server { #define NFS_CAP_LGOPEN (1U << 5) #define NFS_CAP_CASE_INSENSITIVE (1U << 6) #define NFS_CAP_CASE_PRESERVING (1U << 7) +#define NFS_CAP_IO_ADVISE (1U << 13) #define NFS_CAP_POSIX_LOCK (1U << 14) #define NFS_CAP_UIDGID_NOMAP (1U << 15) #define NFS_CAP_STATEID_NFSV41 (1U << 16)include/linux/nfs_xdr.h +0
-0@@ -17,6 +17,18 @@
#define NFS_BITMASK_SZ 3include/linux/nfs_xdr.h +12
-0+#define NFS_IO_ADVISE4_NORMAL (1U << 0) +#define NFS_IO_ADVISE4_SEQUENTIAL (1U << 1) +#define NFS_IO_ADVISE4_SEQUENTIAL_BACKWARDS (1U << 2) +#define NFS_IO_ADVISE4_RANDOM (1U << 3) +#define NFS_IO_ADVISE4_WILLNEED (1U << 4) +#define NFS_IO_ADVISE4_WILLNEED_OPPORTUNISTIC (1U << 5) +#define NFS_IO_ADVISE4_DONTNEED (1U << 6) +#define NFS_IO_ADVISE4_NOREUSE (1U << 7) +#define NFS_IO_ADVISE4_READ (1U << 8) +#define NFS_IO_ADVISE4_WRITE (1U << 9) +#define NFS_IO_ADVISE4_INIT_PROXIMITY (1U << 10) +struct
nfs4_string{
unsigned int len;
char *data;include/linux/nfs_xdr.h +0
-0@@ -1449,6 +1461,22 @@ struct nfs42_falloc_res { const struct nfs_server *falloc_server; };include/linux/nfs_xdr.h +16
-0+struct nfs42_io_advise_args { + struct nfs4_sequence_args seq_args; + + struct nfs_fh *fh; + nfs4_stateid stateid; + loff_t offset; + u64 count; + u32 hints; +}; + +struct nfs42_io_advise_res { + struct nfs4_sequence_res seq_res; + + u32 hints; +}; +struct
nfs42_copy_args{
struct nfs4_sequence_args seq_args;
Signature · 3 lines
Trond Myklebust Linux NFS client maintainer, Hammerspace [email protected]