Merge tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux

Pull nfsd updates from Bruce Fields:
 "Chuck Lever did a bunch of work on nfsd tracepoints, on RDMA, and on
  server xdr decoding (with an eye towards eliminating a data copy in
  the RDMA case).

  I did some refactoring of the delegation code in preparation for
  eliminating some delegation self-conflicts and implementing write
  delegations"

* tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux: (40 commits)
  nfsd: fix incorrect umasks
  sunrpc: remove incorrect HMAC request initialization
  NFSD: Clean up legacy NFS SYMLINK argument XDR decoders
  NFSD: Clean up legacy NFS WRITE argument XDR decoders
  nfsd: Trace NFSv4 COMPOUND execution
  nfsd: Add I/O trace points in the NFSv4 read proc
  nfsd: Add I/O trace points in the NFSv4 write path
  nfsd: Add "nfsd_" to trace point names
  nfsd: Record request byte count, not count of vectors
  nfsd: Fix NFSD trace points
  svc: Report xprt dequeue latency
  sunrpc: Report per-RPC execution stats
  sunrpc: Re-purpose trace_svc_process
  sunrpc: Save remote presentation address in svc_xprt for trace events
  sunrpc: Simplify trace_svc_recv
  sunrpc: Simplify do_enqueue tracing
  sunrpc: Move trace_svc_xprt_dequeue()
  sunrpc: Update show_svc_xprt_flags() to include recently added flags
  svc: Simplify ->xpo_secure_port
  sunrpc: Remove unneeded pointer dereference
  ...
This commit is contained in:
Linus Torvalds
2018-04-05 19:15:29 -07:00
31 changed files with 725 additions and 519 deletions

View File

@@ -1450,8 +1450,8 @@ static ssize_t write_flush(struct file *file, const char __user *buf,
struct cache_detail *cd)
{
char tbuf[20];
char *bp, *ep;
time_t then, now;
char *ep;
time_t now;
if (*ppos || count > sizeof(tbuf)-1)
return -EINVAL;
@@ -1461,24 +1461,24 @@ static ssize_t write_flush(struct file *file, const char __user *buf,
simple_strtoul(tbuf, &ep, 0);
if (*ep && *ep != '\n')
return -EINVAL;
bp = tbuf;
then = get_expiry(&bp);
now = seconds_since_boot();
cd->nextcheck = now;
/* Can only set flush_time to 1 second beyond "now", or
* possibly 1 second beyond flushtime. This is because
* flush_time never goes backwards so it mustn't get too far
* ahead of time.
/* Note that while we check that 'buf' holds a valid number,
* we always ignore the value and just flush everything.
* Making use of the number leads to races.
*/
if (then >= now) {
/* Want to flush everything, so behave like cache_purge() */
if (cd->flush_time >= now)
now = cd->flush_time + 1;
then = now;
}
cd->flush_time = then;
now = seconds_since_boot();
/* Always flush everything, so behave like cache_purge()
* Do this by advancing flush_time to the current time,
* or by one second if it has already reached the current time.
* Newly added cache entries will always have ->last_refresh greater
* that ->flush_time, so they don't get flushed prematurely.
*/
if (cd->flush_time >= now)
now = cd->flush_time + 1;
cd->flush_time = now;
cd->nextcheck = now;
cache_flush();
*ppos += count;