1. 21 10月, 2020 3 次提交
  2. 17 10月, 2020 3 次提交
  3. 12 10月, 2020 5 次提交
  4. 02 10月, 2020 13 次提交
  5. 26 9月, 2020 16 次提交
    • J
      nfsd: rq_lease_breaker cleanup · 13956160
      J. Bruce Fields 提交于
      Since only the v4 code cares about it, maybe it's better to leave
      rq_lease_breaker out of the common dispatch code?
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      13956160
    • J
      nfsd4: remove check_conflicting_opens warning · 50747dd5
      J. Bruce Fields 提交于
      There are actually rare races where this is possible (e.g. if a new open
      intervenes between the read of i_writecount and the fi_fds).
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      50747dd5
    • J
      nfsd: Cache R, RW, and W opens separately · ae3c57b5
      J. Bruce Fields 提交于
      The nfsd open code has always kept separate read-only, read-write, and
      write-only opens as necessary to ensure that when a client closes or
      downgrades, we don't retain more access than necessary.
      
      Also, I didn't realize the cache behaved this way when I wrote
      94415b06 "nfsd4: a client's own opens needn't prevent delegations".
      There I assumed fi_fds[O_WRONLY] and fi_fds[O_RDWR] would always be
      distinct.  The violation of that assumption is triggering a
      WARN_ON_ONCE() and could also cause the server to give out a delegation
      when it shouldn't.
      
      Fixes: 94415b06 ("nfsd4: a client's own opens needn't prevent delegations")
      Tested-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ae3c57b5
    • J
      sunrpc: simplify do_cache_clean · 0aa99c4d
      J. Bruce Fields 提交于
      Is it just me, or is the logic written in a slightly convoluted way?
      
      I find it a little easier to read this way.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      0aa99c4d
    • X
      sunrpc: cache : Replace seq_printf with seq_puts · 9dbc1f45
      Xu Wang 提交于
      seq_puts is a lot cheaper than seq_printf, so use that to print
      literal strings.
      Signed-off-by: NXu Wang <vulab@iscas.ac.cn>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      9dbc1f45
    • R
      silence nfscache allocation warnings with kvzalloc · 8c38b705
      Rik van Riel 提交于
      silence nfscache allocation warnings with kvzalloc
      
      Currently nfsd_reply_cache_init attempts hash table allocation through
      kmalloc, and manually falls back to vzalloc if that fails. This makes
      the code a little larger than needed, and creates a significant amount
      of serial console spam if you have enough systems.
      
      Switching to kvzalloc gets rid of the allocation warnings, and makes
      the code a little cleaner too as a side effect.
      
      Freeing of nn->drc_hashtbl is already done using kvfree currently.
      Signed-off-by: NRik van Riel <riel@surriel.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      8c38b705
    • Z
      nfsd: fix comparison to bool warning · 44b49aa6
      Zheng Bin 提交于
      Fixes coccicheck warning:
      
      fs/nfsd/nfs4proc.c:3234:5-29: WARNING: Comparison to bool
      Signed-off-by: NZheng Bin <zhengbin13@huawei.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      44b49aa6
    • C
      NFSD: Correct type annotations in COPY XDR functions · 5aff7d08
      Chuck Lever 提交于
      Squelch some sparse warnings:
      
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16: warning: incorrect type in assignment (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16:    expected int status
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16:    got restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24: warning: incorrect type in return expression (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24:    expected restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24:    got int status
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      5aff7d08
    • C
      NFSD: Correct type annotations in user xattr XDR functions · b9a49237
      Chuck Lever 提交于
      Squelch some sparse warnings:
      
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24: warning: incorrect type in return expression (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24:    expected int
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24:    got restricted __be32 [usertype]
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32: warning: incorrect type in return expression (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32:    expected int
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32:    got restricted __be32 [usertype]
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13: warning: incorrect type in assignment (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13:    expected restricted __be32 [usertype] err
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13:    got int
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15: warning: incorrect type in assignment (different base types)
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15:    expected unsigned int [assigned] [usertype] count
      /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15:    got restricted __be32 [usertype]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      b9a49237
    • C
      NFSD: Correct type annotations in user xattr helpers · 8237284a
      Chuck Lever 提交于
      Squelch some sparse warnings:
      
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13: warning: incorrect type in assignment (different base types)
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13:    expected int err
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13:    got restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24: warning: incorrect type in return expression (different base types)
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24:    expected restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24:    got int err
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13: warning: incorrect type in assignment (different base types)
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13:    expected int err
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13:    got restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24: warning: incorrect type in return expression (different base types)
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24:    expected restricted __be32
      /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24:    got int err
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      8237284a
    • A
      SUNRPC/NFSD: Implement xdr_reserve_space_vec() · 403217f3
      Anna Schumaker 提交于
      Reserving space for a large READ payload requires special handling when
      reserving space in the xdr buffer pages. One problem we can have is use
      of the scratch buffer, which is used to get a pointer to a contiguous
      region of data up to PAGE_SIZE. When using the scratch buffer, calls to
      xdr_commit_encode() shift the data to it's proper alignment in the xdr
      buffer. If we've reserved several pages in a vector, then this could
      potentially invalidate earlier pointers and result in incorrect READ
      data being sent to the client.
      
      I get around this by looking at the amount of space left in the current
      page, and never reserve more than that for each entry in the read
      vector. This lets us place data directly where it needs to go in the
      buffer pages.
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      403217f3
    • H
      nfsd: rename delegation related tracepoints to make them less confusing · 3caf9175
      Hou Tao 提交于
      Now when a read delegation is given, two delegation related traces
      will be printed:
      
          nfsd_deleg_open: client 5f45b854:e6058001 stateid 00000030:00000001
          nfsd_deleg_none: client 5f45b854:e6058001 stateid 0000002f:00000001
      
      Although the intention is to let developers know two stateid are
      returned, the traces are confusing about whether or not a read delegation
      is handled out. So renaming trace_nfsd_deleg_none() to trace_nfsd_open()
      and trace_nfsd_deleg_open() to trace_nfsd_deleg_read() to make
      the intension clearer.
      
      The patched traces will be:
      
          nfsd_deleg_read: client 5f48a967:b55b21cd stateid 00000003:00000001
          nfsd_open: client 5f48a967:b55b21cd stateid 00000002:00000001
      Suggested-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NHou Tao <houtao1@huawei.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      3caf9175
    • J
      Documentation: update RPCSEC_GSSv3 RFC link · ade3dbad
      J. Bruce Fields 提交于
      This draft is an official RFC now.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ade3dbad
    • J
      MAINTAINERS: Note NFS docs under Documentation/ · ff7e11f3
      J. Bruce Fields 提交于
      It struck me while watching Jon Corbet ask how to keep kernel
      Documentation up to date, that it might help if we were actually cc'd on
      Documentation/filesystems/nfs/ changes.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ff7e11f3
    • A
      nfsd: Remove unnecessary assignment in nfs4xdr.c · e2a1840e
      Alex Dewar 提交于
      In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
      but this value is never used before p is reassigned. Fix this.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: NAlex Dewar <alex.dewar90@gmail.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      e2a1840e
    • R
      net: sunrpc: delete repeated words · 1cc5213b
      Randy Dunlap 提交于
      Drop duplicate words in net/sunrpc/.
      Also fix "Anyone" to be "Any one".
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Cc: linux-nfs@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      1cc5213b