30 Apr, 2013

1 commit

  • Define two nfs export_operation structures,one for 'stale_rw' mounts and
    the other for 'nostale_ro'. The latter uses i_pos as a basis for encoding
    and decoding file handles.

    Also, assign i_pos to kstat->ino. The logic for rebuilding the inode is
    added in the subsequent patches.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     

21 Dec, 2012

1 commit

  • Pull nfsd update from Bruce Fields:
    "Included this time:

    - more nfsd containerization work from Stanislav Kinsbursky: we're
    not quite there yet, but should be by 3.9.

    - NFSv4.1 progress: implementation of basic backchannel security
    negotiation and the mandatory BACKCHANNEL_CTL operation. See

    http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues

    for remaining TODO's

    - Fixes for some bugs that could be triggered by unusual compounds.
    Our xdr code wasn't designed with v4 compounds in mind, and it
    shows. A more thorough rewrite is still a todo.

    - If you've ever seen "RPC: multiple fragments per record not
    supported" logged while using some sort of odd userland NFS client,
    that should now be fixed.

    - Further work from Jeff Layton on our mechanism for storing
    information about NFSv4 clients across reboots.

    - Further work from Bryan Schumaker on his fault-injection mechanism
    (which allows us to discard selective NFSv4 state, to excercise
    rarely-taken recovery code paths in the client.)

    - The usual mix of miscellaneous bugs and cleanup.

    Thanks to everyone who tested or contributed this cycle."

    * 'for-3.8' of git://linux-nfs.org/~bfields/linux: (111 commits)
    nfsd4: don't leave freed stateid hashed
    nfsd4: free_stateid can use the current stateid
    nfsd4: cleanup: replace rq_resused count by rq_next_page pointer
    nfsd: warn on odd reply state in nfsd_vfs_read
    nfsd4: fix oops on unusual readlike compound
    nfsd4: disable zero-copy on non-final read ops
    svcrpc: fix some printks
    NFSD: Correct the size calculation in fault_inject_write
    NFSD: Pass correct buffer size to rpc_ntop
    nfsd: pass proper net to nfsd_destroy() from NFSd kthreads
    nfsd: simplify service shutdown
    nfsd: replace boolean nfsd_up flag by users counter
    nfsd: simplify NFSv4 state init and shutdown
    nfsd: introduce helpers for generic resources init and shutdown
    nfsd: make NFSd service structure allocated per net
    nfsd: make NFSd service boot time per-net
    nfsd: per-net NFSd up flag introduced
    nfsd: move per-net startup code to separated function
    nfsd: pass net to __write_ports() and down
    nfsd: pass net to nfsd_set_nrthreads()
    ...

    Linus Torvalds
     

18 Dec, 2012

1 commit

  • We will need this helper in the next patch to provide a file handle for
    inotify marks in /proc/pid/fdinfo output.

    The patch is rather providing the way to use inodes directly when dentry
    is not available (like in case of inotify system).

    Signed-off-by: Cyrill Gorcunov
    Acked-by: Pavel Emelyanov
    Cc: Oleg Nesterov
    Cc: Andrey Vagin
    Cc: Al Viro
    Cc: Alexey Dobriyan
    Cc: James Bottomley
    Cc: "Aneesh Kumar K.V"
    Cc: Alexey Dobriyan
    Cc: Matthew Helsley
    Cc: "J. Bruce Fields"
    Cc: "Aneesh Kumar K.V"
    Cc: Tvrtko Ursulin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     

08 Nov, 2012

1 commit


30 May, 2012

1 commit

  • pass inode + parent's inode or NULL instead of dentry + bool saying
    whether we want the parent or not.

    NOTE: that needs ceph fix folded in.

    Signed-off-by: Al Viro

    Al Viro
     

31 Mar, 2011

1 commit


15 Mar, 2011

1 commit


14 Mar, 2011

1 commit

  • The exportfs encode handle function should return the minimum required
    handle size. This helps user to find out the handle size by passing 0
    handle size in the first step and then redoing to the call again with
    the returned handle size value.

    Acked-by: Serge Hallyn
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Al Viro

    Aneesh Kumar K.V
     

23 Oct, 2010

1 commit

  • The previous export operations cannot handle multiple versions of
    a filesystem if they belong to the same sb instance.

    This adds a new type of file handle and extends export operations so
    that they can get the inode specified by a checkpoint number as well
    as an inode number and a generation number.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

21 Feb, 2010

1 commit

  • - Add commit_metadata export_operation to allow the underlying filesystem to
    decide how to commit an inode most efficiently.

    - Usage of nfsd_sync_dir and write_inode_now has been replaced with the
    commit_metadata function that takes a svc_fh.

    - The commit_metadata function calls the commit_metadata export_op if it's
    there, or else falls back to sync_inode instead of fsync and write_inode_now
    because only metadata need be synced here.

    - nfsd4_sync_rec_dir now uses vfs_fsync so that commit_metadata can be static

    Signed-off-by: Ben Myers
    Reviewed-by: Christoph Hellwig
    Signed-off-by: J. Bruce Fields

    Ben Myers
     

28 Oct, 2009

1 commit


21 Aug, 2008

1 commit


07 May, 2008

1 commit


24 Apr, 2008

1 commit

  • The raw field's size can vary so we use a zero sized array since
    gcc will not allow a variable sized array inside a union. This
    has been tested with ext3 and gfs2 and relates to the bug
    report: http://lkml.org/lkml/2007/10/24/374 and discussion
    thread: http://lkml.org/lkml/2008/4/7/65

    Signed-off-by: Steven Whitehouse
    Cc: Christoph Hellwig
    Cc: Neil Brown
    Cc: Adrian Bunk
    Signed-off-by: J. Bruce Fields

    Steven Whitehouse
     

15 Mar, 2008

1 commit


22 Oct, 2007

4 commits

  • Update documentation to the current state of affairs. Remove duplicated
    method descruptions in exportfs.h and point to Documentation/filesystems/
    Exporting instead. Add a little file header comment in expfs.c describing
    what's going on and mentioning Neils and my copyright [1].

    Signed-off-by: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc:
    Cc: Dave Kleikamp
    Cc: Anton Altaparmakov
    Cc: David Chinner
    Cc: Timothy Shimmin
    Cc: OGAWA Hirofumi
    Cc: Hugh Dickins
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Steven Whitehouse
    Cc: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Now that all filesystems are converted remove support for the old methods.

    Signed-off-by: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc:
    Cc: Dave Kleikamp
    Cc: Anton Altaparmakov
    Cc: David Chinner
    Cc: Timothy Shimmin
    Cc: OGAWA Hirofumi
    Cc: Hugh Dickins
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Steven Whitehouse
    Cc: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Add the guts for the new filesystem API to exportfs.

    There's now a fh_to_dentry method that returns a dentry for the object looked
    for given a filehandle fragment, and a fh_to_parent operation that returns the
    dentry for the encoded parent directory in case the file handle contains it.

    There are default implementations for these methods that only take a callback
    for an nfs-enhanced iget variant and implement the rest of the semantics.

    Signed-off-by: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc:
    Cc: Dave Kleikamp
    Cc: Anton Altaparmakov
    Cc: David Chinner
    Cc: Timothy Shimmin
    Cc: OGAWA Hirofumi
    Cc: Hugh Dickins
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Steven Whitehouse
    Cc: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • This patchset is a medium scale rewrite of the export operations interface.
    The goal is to make the interface less complex, and easier to understand from
    the filesystem side, aswell as preparing generic support for exporting of
    64bit inode numbers.

    This touches all nfs exporting filesystems, and I've done testing on all of
    the filesystems I have here locally (xfs, ext2, ext3, reiserfs, jfs)

    This patch:

    Add a structured fid type so that we don't have to pass an array of u32 values
    around everywhere. It's a union of possible layouts.

    As a start there's only the u32 array and the traditional 32bit inode format,
    but there will be more in one of my next patchset when I start to document the
    various filehandle formats we have in lowlevel filesystems better.

    Also add an enum that gives the various filehandle types human- readable
    names.

    Note: Some people might think the struct containing an anonymous union is
    ugly, but I didn't want to pass around a raw union type.

    Signed-off-by: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc:
    Cc: Dave Kleikamp
    Cc: Anton Altaparmakov
    Cc: David Chinner
    Cc: Timothy Shimmin
    Cc: OGAWA Hirofumi
    Cc: Hugh Dickins
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Steven Whitehouse
    Cc: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

18 Jul, 2007

2 commits

  • Currently NFSD calls directly into filesystems through the export_operations
    structure. I plan to change this interface in various ways in later patches,
    and want to avoid the export of the default operations to NFSD, so this patch
    adds two simple exportfs_encode_fh/exportfs_decode_fh helpers for NFSD to call
    instead of poking into exportfs guts.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • currently the export_operation structure and helpers related to it are in
    fs.h. fs.h is already far too large and there are very few places needing the
    export bits, so split them off into a separate header.

    [akpm@linux-foundation.org: fix cifs build]
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Neil Brown
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig