Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v1 0/2] add support for IO_ADVISE
@ 2023-01-10 18:46 Jorge Mora
  2023-01-10 18:46 ` [PATCH v1 1/2] NFS: add IO_ADVISE operation Jorge Mora
  2023-01-10 18:46 ` [PATCH v1 2/2] NFSv4.2 add tracepoint to IO_ADVISE Jorge Mora
  0 siblings, 2 replies; 4+ messages in thread
From: Jorge Mora @ 2023-01-10 18:46 UTC (permalink / raw)
  To: linux-nfs; +Cc: trond.myklebust, Anna.Schumaker

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(+)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-10 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10 18:46 [PATCH v1 0/2] add support for IO_ADVISE Jorge Mora
2023-01-10 18:46 ` [PATCH v1 1/2] NFS: add IO_ADVISE operation Jorge Mora
2023-01-10 20:33   ` Trond Myklebust
2023-01-10 18:46 ` [PATCH v1 2/2] NFSv4.2 add tracepoint to IO_ADVISE Jorge Mora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox