1. 07 Oct, 2014 2 commits
    • Jeff Layton's avatar
      nfsd: fix potential lease memory leak in nfs4_setlease · 415b96c5
      Jeff Layton authored
      It's unlikely to ever occur, but if there were already a lease set on
      the file then we could end up getting back a different pointer on a
      successful setlease attempt than the one we allocated. If that happens,
      the one we allocated could leak.
      
      In practice, I don't think this will happen due to the fact that we only
      try to set up the lease once per nfs4_file, but this error handling is a
      bit more correct given the current lease API.
      
      Cc: J. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      415b96c5
    • Jeff Layton's avatar
      locks: close potential race in lease_get_mtime · bfe86024
      Jeff Layton authored
      lease_get_mtime is called without the i_lock held, so there's no
      guarantee about the stability of the list. Between the time when we
      assign "flock" and then dereference it to check whether it's a lease
      and for write, the lease could be freed.
      
      Ensure that that doesn't occur by taking the i_lock before trying
      to check the lease.
      
      Cc: J. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      bfe86024
  2. 09 Sep, 2014 11 commits
  3. 02 Sep, 2014 2 commits
  4. 28 Aug, 2014 5 commits
  5. 18 Aug, 2014 1 commit
    • Rajesh Ghanekar's avatar
      nfsd: allow turning off nfsv3 readdir_plus · 18c01ab3
      Rajesh Ghanekar authored
      One of our customer's application only needs file names, not file
      attributes. With directories having 10K+ inodes (assuming buffer cache
      has directory blocks cached having file names, but inode cache is
      limited and hence need eviction of older cached inodes), older inodes
      are evicted periodically. So if they keep on doing readdir(2) from NSF
      client on multiple directories, some directory's files are periodically
      removed from inode cache and hence new readdir(2) on same directory
      requires disk access to bring back inodes again to inode cache.
      
      As READDIRPLUS request fetches attributes also, doing getattr on each
      file on server, it causes unnecessary disk accesses. If READDIRPLUS on
      NFS client is returned with -ENOTSUPP, NFS client uses READDIR request
      which just gets the names of the files in a directory, not attributes,
      hence avoiding disk accesses on server.
      
      There's already a corresponding client-side mount option, but an export
      option reduces the need for configuration across multiple clients.
      
      This flag affects NFSv3 only.  If it turns out it's needed for NFSv4 as
      well then we may have to figure out how to extend the behavior to NFSv4,
      but it's not currently obvious how to do that.
      Signed-off-by: default avatarRajesh Ghanekar <rajesh_ghanekar@symantec.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      18c01ab3
  6. 17 Aug, 2014 19 commits