07 Feb, 2020

1 commit


23 Jan, 2020

2 commits

  • Strictly speaking, a stable write error needs to reflect the
    write + the commit of that write (and only that write). To
    ensure that we don't pick up the write errors from other
    writebacks, add a rw_semaphore to provide exclusion.

    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields

    Trond Myklebust
     
  • Ensure that if the filecache laundrette gets stuck, it only affects
    the knfsd instances of one container.

    The notifier callbacks can be called from various contexts so avoid
    using synchonous filesystem operations that might deadlock.

    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields

    Trond Myklebust
     

10 Sep, 2019

1 commit


19 Aug, 2019

1 commit

  • Currently, NFSv2/3 reads and writes have to open a file, do the read or
    write and then close it again for each RPC. This is highly inefficient,
    especially when the underlying filesystem has a relatively slow open
    routine.

    This patch adds a new open file cache to knfsd. Rather than doing an
    open for each RPC, the read/write handlers can call into this cache to
    see if there is one already there for the correct filehandle and
    NFS_MAY_READ/WRITE flags.

    If there isn't an entry, then we create a new one and attempt to
    perform the open. If there is, then we wait until the entry is fully
    instantiated and return it if it is at the end of the wait. If it's
    not, then we attempt to take over construction.

    Since the main goal is to speed up NFSv2/3 I/O, we don't want to
    close these files on last put of these objects. We need to keep them
    around for a little while since we never know when the next READ/WRITE
    will come in.

    Cache entries have a hardcoded 1s timeout, and we have a recurring
    workqueue job that walks the cache and purges any entries that have
    expired.

    Signed-off-by: Jeff Layton
    Signed-off-by: Weston Andros Adamson
    Signed-off-by: Richard Sharpe
    Signed-off-by: Trond Myklebust
    Signed-off-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields

    Jeff Layton