18 Feb, 2016

1 commit

  • The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
    use a helper called nfs42_set_rw_stateid to select a stateid that is sent
    to the server. But they don't set the inode and state fields in the
    nfs4_exception structure, and this don't partake in the stateid recovery
    protocol. Because of this they will simply return errors insted of trying
    to recover a stateid when the server return a BAD_STATEID error.

    Additionally CLONE has the problem that it operates on two files and thus
    two stateids, and thus needs to call the exception handler twice to
    recover stateids.

    While we're at it stop grabbing an addititional reference to the open
    context in all these operations - having the file open guarantees that
    the open context won't go away.

    All this can be produces with the generic/168 and generic/170 tests in
    xfstests which stress the CLONE stateid handling.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Trond Myklebust

    Christoph Hellwig
     

23 Jan, 2016

1 commit

  • parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
    inode_foo(inode) being mutex_foo(&inode->i_mutex).

    Please, use those for access to ->i_mutex; over the coming cycle
    ->i_mutex will become rwsem, with ->lookup() done with it held
    only shared.

    Signed-off-by: Al Viro

    Al Viro
     

28 Dec, 2015

1 commit


24 Nov, 2015

2 commits


16 Oct, 2015

1 commit


18 Sep, 2015

1 commit

  • We're incorrectly assigning a loff_t return to an int. If SEEK_HOLE or
    SEEK_DATA returns an offset over 2^31 then the application will see a
    weird lseek() result (usually -EIO).

    Cc: stable@vger.kernel.org
    Fixes: bdcc2cd14e4e "NFSv4.2: handle NFS-specific llseek errors"
    Signed-off-by: J. Bruce Fields
    Reviewed-by: Anna Schumaker
    Signed-off-by: Trond Myklebust

    J. Bruce Fields
     

27 Jul, 2015

1 commit


27 Jun, 2015

1 commit


24 Jun, 2015

4 commits


24 Apr, 2015

2 commits

  • At the very least, we should not be taking the i_mutex until after
    checking if the server even supports ALLOCATE or DEALLOCATE, allowing
    v4.0 or v4.1 to exit without potentially waiting on a lock.

    Signed-off-by: Anna Schumaker
    Signed-off-by: Trond Myklebust

    Anna Schumaker
     
  • This patch adds a GETATTR to the end of ALLOCATE and DEALLOCATE
    operations so we can set the updated inode size and change attribute
    directly. DEALLOCATE will still need to release pagecache pages, so
    nfs42_proc_deallocate() now calls truncate_pagecache_range() before
    contacting the server.

    Signed-off-by: Anna Schumaker
    Signed-off-by: Trond Myklebust

    Anna Schumaker
     

26 Nov, 2014

2 commits


25 Nov, 2014

1 commit


01 Oct, 2014

1 commit

  • The SEEK operation is used when an application makes an lseek call with
    either the SEEK_HOLE or SEEK_DATA flags set. I fall back on
    nfs_file_llseek() if the server does not have SEEK support.

    Signed-off-by: Anna Schumaker
    Signed-off-by: Trond Myklebust

    Anna Schumaker