1. 01 5月, 2020 1 次提交
  2. 31 3月, 2020 1 次提交
    • S
      NFS: Ensure security label is set for root inode · 779df6a5
      Scott Mayhew 提交于
      When using NFSv4.2, the security label for the root inode should be set
      via a call to nfs_setsecurity() during the mount process, otherwise the
      inode will appear as unlabeled for up to acdirmin seconds.  Currently
      the label for the root inode is allocated, retrieved, and freed entirely
      witin nfs4_proc_get_root().
      
      Add a field for the label to the nfs_fattr struct, and allocate & free
      the label in nfs_get_root(), where we also add a call to
      nfs_setsecurity().  Note that for the call to nfs_setsecurity() to
      succeed, it's necessary to also move the logic calling
      security_sb_{set,clone}_security() from nfs_get_tree_common() down into
      nfs_get_root()... otherwise the SBLABEL_MNT flag will not be set in the
      super_block's security flags and nfs_setsecurity() will silently fail.
      Reported-by: NRichard Haines <richard_c_haines@btinternet.com>
      Signed-off-by: NScott Mayhew <smayhew@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Tested-by: NStephen Smalley <sds@tycho.nsa.gov>
      [PM: fixed 80-char line width problems]
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      779df6a5
  3. 16 3月, 2020 1 次提交
  4. 15 1月, 2020 19 次提交
  5. 18 11月, 2019 1 次提交
  6. 25 9月, 2019 1 次提交
    • T
      NFS: Optimise the default readahead size · c128e575
      Trond Myklebust 提交于
      In the years since the max readahead size was fixed in NFS, a number of
      things have happened:
      - Users can now set the value directly using /sys/class/bdi
      - NFS max supported block sizes have increased by several orders of
        magnitude from 64K to 1MB.
      - Disk access latencies are orders of magnitude faster due to SSD + NVME.
      
      In particular note that if the server is advertising 1MB as the optimal
      read size, as that will set the readahead size to 15MB.
      Let's therefore adjust down, and try to default to VM_READAHEAD_PAGES.
      However let's inform the VM about our preferred block size so that it
      can choose to round up in cases where that makes sense.
      Reported-by: NAlkis Georgopoulos <alkisg@gmail.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      c128e575
  7. 30 8月, 2019 1 次提交
  8. 05 8月, 2019 1 次提交
  9. 13 7月, 2019 2 次提交
  10. 07 7月, 2019 3 次提交
  11. 05 7月, 2019 1 次提交
  12. 21 5月, 2019 1 次提交
  13. 02 5月, 2019 1 次提交
  14. 27 4月, 2019 1 次提交
  15. 26 4月, 2019 1 次提交
  16. 12 4月, 2019 1 次提交
  17. 21 2月, 2019 1 次提交
  18. 29 1月, 2019 1 次提交
    • Y
      nfs: Fix NULL pointer dereference of dev_name · 80ff0017
      Yao Liu 提交于
      There is a NULL pointer dereference of dev_name in nfs_parse_devname()
      
      The oops looks something like:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
        ...
        RIP: 0010:nfs_fs_mount+0x3b6/0xc20 [nfs]
        ...
        Call Trace:
         ? ida_alloc_range+0x34b/0x3d0
         ? nfs_clone_super+0x80/0x80 [nfs]
         ? nfs_free_parsed_mount_data+0x60/0x60 [nfs]
         mount_fs+0x52/0x170
         ? __init_waitqueue_head+0x3b/0x50
         vfs_kern_mount+0x6b/0x170
         do_mount+0x216/0xdc0
         ksys_mount+0x83/0xd0
         __x64_sys_mount+0x25/0x30
         do_syscall_64+0x65/0x220
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fix this by adding a NULL check on dev_name
      Signed-off-by: NYao Liu <yotta.liu@ucloud.cn>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      80ff0017
  19. 03 1月, 2019 1 次提交
    • C
      NFS: Make "port=" mount option optional for RDMA mounts · 0dfbb5f0
      Chuck Lever 提交于
      Having to specify "proto=rdma,port=20049" is cumbersome.
      
      RFC 8267 Section 6.3 requires NFSv4 clients to use "the alternative
      well-known port number", which is 20049. Make the use of the well-
      known port number automatic, just as it is for NFS/TCP and port
      2049.
      
      For NFSv2/3, Section 4.2 allows clients to simply choose 20049 as
      the default or use rpcbind. I don't know of an NFS/RDMA server
      implementation that registers it's NFS/RDMA service with rpcbind,
      so automatically choosing 20049 seems like the better choice. The
      other widely-deployed NFS/RDMA client, Solaris, also uses 20049
      as the default port.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      0dfbb5f0