31 Mar, 2011

1 commit


16 Dec, 2009

1 commit


15 Dec, 2009

2 commits


15 Feb, 2008

1 commit

  • I'm embedding struct path into struct svc_export.

    [akpm@linux-foundation.org: coding-style fixes]
    [ezk@cs.sunysb.edu: NFSD: fix wrong mnt_writer count in rename]
    Signed-off-by: Jan Blunck
    Acked-by: J. Bruce Fields
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: Trond Myklebust
    Signed-off-by: Erez Zadok
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

02 Feb, 2008

3 commits


14 Jan, 2008

1 commit

  • When RPCSEC/GSS and krb5i is used, requests are padded, typically to a multiple
    of 8 bytes. This can make the request look slightly longer than it
    really is.

    As of

    f34b95689d2ce001c "The NFSv2/NFSv3 server does not handle zero
    length WRITE request correctly",

    the xdr decode routines for NFSv2 and NFSv3 reject requests that aren't
    the right length, so krb5i (for example) WRITE requests can get lost.

    This patch relaxes the appropriate test and enhances the related comment.

    Signed-off-by: Neil Brown
    Signed-off-by: J. Bruce Fields
    Cc: Peter Staubach
    Signed-off-by: Linus Torvalds

    NeilBrown
     

10 Oct, 2007

1 commit

  • Modify the NFS server code to support 64 bit ino's, as
    appropriate for the system and the NFS protocol version.

    The gist of the changes is to query the underlying file system
    for attributes and not just to use the cached attributes in the
    inode. For this specific purpose, the inode only contains an
    ino field which unsigned long, which is large enough on 64 bit
    platforms, but is not large enough on 32 bit platforms.

    I haven't been able to find any reason why ->getattr can't be called
    while i_mutex. The specification indicates that i_mutex is not
    required to be held in order to invoke ->getattr, but it doesn't say
    that i_mutex can't be held while invoking ->getattr.

    I also haven't come to any conclusions regarding the value of
    lease_get_mtime() and whether it should or should not be invoked
    by fill_post_wcc() too. I chose not to change this because I
    thought that it was safer to leave well enough alone. If we
    decide to make a change, it can be done separately.

    Signed-off-by: Peter Staubach
    Signed-off-by: J. Bruce Fields
    Acked-by: Neil Brown

    Peter Staubach
     

10 May, 2007

2 commits

  • 1/ decode_sattr and decode_sattr3 never return NULL, so remove
    several checks for that. ditto for xdr_decode_hyper.

    2/ replace some open coded XDR_QUADLEN calls with calls to
    XDR_QUADLEN

    3/ in decode_writeargs, simply an 'if' to use a single
    calculation.
    .page_len is the length of that part of the packet that did
    not fit in the first page (the head).
    So the length of the data part is the remainder of the
    head, plus page_len.

    3/ other minor cleanups.

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

    NeilBrown
     
  • The NFSv2 and NFSv3 servers do not handle WRITE requests for 0 bytes
    correctly. The specifications indicate that the server should accept the
    request, but it should mostly turn into a no-op. Currently, the server
    will return an XDR decode error, which it should not.

    Attached is a patch which addresses this issue. It also adds some boundary
    checking to ensure that the request contains as much data as was requested
    to be written. It also correctly handles an NFSv3 request which requests
    to write more data than the server has stated that it is prepared to
    handle. Previously, there was some support which looked like it should
    work, but wasn't quite right.

    Signed-off-by: Peter Staubach
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     

15 Feb, 2007

1 commit

  • Add support for using a filesystem UUID to identify and export point in the
    filehandle.

    For NFSv2, this UUID is xor-ed down to 4 or 8 bytes so that it doesn't take up
    too much room. For NFSv3+, we use the full 16 bytes, and possibly also a
    64bit inode number for exports beneath the root of a filesystem.

    When generating an fsid to return in 'stat' information, use the UUID (hashed
    down to size) if it is available and a small 'fsid' was not specifically
    provided.

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

    NeilBrown
     

27 Jan, 2007

1 commit

  • nfsd defines a type 'encode_dent_fn' which is much like 'filldir_t' except
    that the first pointer is 'struct readdir_cd *' rather than 'void *'. It
    then casts encode_dent_fn points to 'filldir_t' as needed. This hides any
    other type mismatches between the two such as the fact that the 'ino' arg
    recently changed from ino_t to u64.

    So: get rid of 'encode_dent_fn', get rid of the cast of the function type,
    change the first arg of various functions from 'struct readdir_cd *' to
    'void *', and live with the fact that we have a little less type checking
    on the calling of these functions now. Less internal (to nfsd) checking
    offset by more external checking, which is more important.

    Thanks to Gabriel Paubert for discovering this and
    providing an initial patch.

    Signed-off-by: Gabriel Paubert
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

08 Dec, 2006

1 commit

  • This patch removes the unused NFSD_OPTIMIZE_SPACE.

    Additionally, it does differently what NFSD_OPTIMIZE_SPACE was supposed to do:

    Nowadays, gcc knows best when to inline code, and CONFIG_CC_OPTIMIZE_FOR_SIZE
    even tells gcc globally whether to optimize for size or for speed. Therefore,
    this patch also removes all inline's from these files.

    Signed-off-by: Adrian Bunk
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

21 Oct, 2006

1 commit


04 Oct, 2006

4 commits

  • The limit over UDP remains at 32K. Also, make some of the apparently
    arbitrary sizing constants clearer.

    The biggest change here involves replacing NFSSVC_MAXBLKSIZE by a function of
    the rqstp. This allows it to be different for different protocols (udp/tcp)
    and also allows it to depend on the servers declared sv_bufsiz.

    Note that we don't actually increase sv_bufsz for nfs yet. That comes next.

    Signed-off-by: Greg Banks
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Banks
     
  • .. by allocating the array of 'kvec' in 'struct svc_rqst'.

    As we plan to increase RPCSVC_MAXPAGES from 8 upto 256, we can no longer
    allocate an array of this size on the stack. So we allocate it in 'struct
    svc_rqst'.

    However svc_rqst contains (indirectly) an array of the same type and size
    (actually several, but they are in a union). So rather than waste space, we
    move those arrays out of the separately allocated union and into svc_rqst to
    share with the kvec moved out of svc_tcp_recvfrom (various arrays are used at
    different times, so there is no conflict).

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

    NeilBrown
     
  • We are planning to increase RPCSVC_MAXPAGES from about 8 to about 256. This
    means we need to be a bit careful about arrays of size RPCSVC_MAXPAGES.

    struct svc_rqst contains two such arrays. However the there are never more
    that RPCSVC_MAXPAGES pages in the two arrays together, so only one array is
    needed.

    The two arrays are for the pages holding the request, and the pages holding
    the reply. Instead of two arrays, we can simply keep an index into where the
    first reply page is.

    This patch also removes a number of small inline functions that probably
    server to obscure what is going on rather than clarify it, and opencode the
    needed functionality.

    Also remove the 'rq_restailpage' variable as it is *always* 0. i.e. if the
    response 'xdr' structure has a non-empty tail it is always in the same pages
    as the head.

    check counters are initilised and incr properly
    check for consistant usage of ++ etc
    maybe extra some inlines for common approach
    general review

    Signed-off-by: Neil Brown
    Cc: Magnus Maatta
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Many files include the filename at the beginning, serveral used a wrong one.

    Signed-off-by: Uwe Zeisberger
    Signed-off-by: Adrian Bunk

    Uwe Zeisberger
     

15 Jan, 2006

1 commit


07 Jan, 2006

1 commit

  • Both vfs_getattr and i_op->fsync return error statuses which nfsd was
    largely ignoring. This as noticed when exporting directories using fuse.

    This patch cleans up most of the offences, which involves moving the call
    to vfs_getattr out of the xdr encoding routines (where it is too late to
    report an error) into the main NFS procedure handling routines.

    There is still a called to vfs_gettattr (related to the ACL code) where the
    status is ignored, and called to nfsd_sync_dir don't check return status
    either.

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

    David Shaw
     

23 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds