05 Nov, 2012

4 commits


24 Oct, 2012

2 commits


17 Oct, 2012

1 commit

  • If the filehandle is stale, or open access is denied for some reason,
    nlm_fopen() may return one of the NLMv4-specific error codes nlm4_stale_fh
    or nlm4_failed. These get passed right through nlm_lookup_file(),
    and so when nlmsvc_retrieve_args() calls the latter, it needs to filter
    the result through the cast_status() machinery.

    Failure to do so, will trigger the BUG_ON() in encode_nlm_stat...

    Signed-off-by: Trond Myklebust
    Reported-by: Larry McVoy
    Cc: stable@kernel.org
    Signed-off-by: J. Bruce Fields

    Trond Myklebust
     

13 Oct, 2012

1 commit

  • Pull nfsd update from J Bruce Fields:
    "Another relatively quiet cycle. There was some progress on my
    remaining 4.1 todo's, but a couple of them were just of the form
    "check that we do X correctly", so didn't have much affect on the
    code.

    Other than that, a bunch of cleanup and some bugfixes (including an
    annoying NFSv4.0 state leak and a busy-loop in the server that could
    cause it to peg the CPU without making progress)."

    * 'for-3.7' of git://linux-nfs.org/~bfields/linux: (46 commits)
    UAPI: (Scripted) Disintegrate include/linux/sunrpc
    UAPI: (Scripted) Disintegrate include/linux/nfsd
    nfsd4: don't allow reclaims of expired clients
    nfsd4: remove redundant callback probe
    nfsd4: expire old client earlier
    nfsd4: separate session allocation and initialization
    nfsd4: clean up session allocation
    nfsd4: minor free_session cleanup
    nfsd4: new_conn_from_crses should only allocate
    nfsd4: separate connection allocation and initialization
    nfsd4: reject bad forechannel attrs earlier
    nfsd4: enforce per-client sessions/no-sessions distinction
    nfsd4: set cl_minorversion at create time
    nfsd4: don't pin clientids to pseudoflavors
    nfsd4: fix bind_conn_to_session xdr comment
    nfsd4: cast readlink() bug argument
    NFSD: pass null terminated buf to kstrtouint()
    nfsd: remove duplicate init in nfsd4_cb_recall
    nfsd4: eliminate redundant nfs4_free_stateid
    fs/nfsd/nfs4idmap.c: adjust inconsistent IS_ERR and PTR_ERR
    ...

    Linus Torvalds
     

10 Oct, 2012

2 commits

  • Pull NFS client updates from Trond Myklebust:
    "Features include:

    - Remove CONFIG_EXPERIMENTAL dependency from NFSv4.1
    Aside from the issues discussed at the LKS, distros are shipping
    NFSv4.1 with all the trimmings.
    - Fix fdatasync()/fsync() for the corner case of a server reboot.
    - NFSv4 OPEN access fix: finally distinguish correctly between
    open-for-read and open-for-execute permissions in all situations.
    - Ensure that the TCP socket is closed when we're in CLOSE_WAIT
    - More idmapper bugfixes
    - Lots of pNFS bugfixes and cleanups to remove unnecessary state and
    make the code easier to read.
    - In cases where a pNFS read or write fails, allow the client to
    resume trying layoutgets after two minutes of read/write-
    through-mds.
    - More net namespace fixes to the NFSv4 callback code.
    - More net namespace fixes to the NFSv3 locking code.
    - More NFSv4 migration preparatory patches.
    Including patches to detect network trunking in both NFSv4 and
    NFSv4.1
    - pNFS block updates to optimise LAYOUTGET calls."

    * tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (113 commits)
    pnfsblock: cleanup nfs4_blkdev_get
    NFS41: send real read size in layoutget
    NFS41: send real write size in layoutget
    NFS: track direct IO left bytes
    NFSv4.1: Cleanup ugliness in pnfs_layoutgets_blocked()
    NFSv4.1: Ensure that the layout sequence id stays 'close' to the current
    NFSv4.1: Deal with seqid wraparound in the pNFS return-on-close code
    NFSv4 set open access operation call flag in nfs4_init_opendata_res
    NFSv4.1: Remove the dependency on CONFIG_EXPERIMENTAL
    NFSv4 reduce attribute requests for open reclaim
    NFSv4: nfs4_open_done first must check that GETATTR decoded a file type
    NFSv4.1: Deal with wraparound when updating the layout "barrier" seqid
    NFSv4.1: Deal with wraparound issues when updating the layout stateid
    NFSv4.1: Always set the layout stateid if this is the first layoutget
    NFSv4.1: Fix another refcount issue in pnfs_find_alloc_layout
    NFSv4: don't put ACCESS in OPEN compound if O_EXCL
    NFSv4: don't check MAY_WRITE access bit in OPEN
    NFS: Set key construction data for the legacy upcall
    NFSv4.1: don't do two EXCHANGE_IDs on mount
    NFS: nfs41_walk_client_list(): re-lock before iterating
    ...

    Linus Torvalds
     
  • This is to complete part of the Userspace API (UAPI) disintegration for which
    the preparatory patches were pulled recently. After these patches, userspace
    headers will be segregated into:

    include/uapi/linux/.../foo.h

    for the userspace interface stuff, and:

    include/linux/.../foo.h

    for the strictly kernel internal stuff.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

02 Oct, 2012

3 commits

  • NSM RPC client can be required on NFSv3 umount, when child reaper is dying
    (and destroying it's mount namespace). It means, that current nsproxy is set
    to NULL already, but creation of RPC client requires UTS namespace for gaining
    hostname string.

    This patch creates reference-counted per-net NSM client on first monitor
    request and destroys it after last unmonitor request.

    Signed-off-by: Stanislav Kinsbursky
    Cc:
    Signed-off-by: Trond Myklebust

    Stanislav Kinsbursky
     
  • Taking hostname from uts namespace if not safe, because this cuold be
    performind during umount operation on child reaper death. And in this case
    current->nsproxy is NULL already.

    Signed-off-by: Stanislav Kinsbursky
    Cc:
    Signed-off-by: Trond Myklebust

    Stanislav Kinsbursky
     
  • NSM RPC client can be required on NFSv3 umount, when child reaper is dying (and
    destroying it's mount namespace). It means, that current nsproxy is set to
    NULL already, but creation of RPC client requires UTS namespace for gaining
    hostname string.
    This patch introduces reference counted NFS RPC clients creation and
    destruction helpers (similar to RPCBIND RPC clients).

    Signed-off-by: Stanislav Kinsbursky
    Cc:
    Signed-off-by: Trond Myklebust

    Stanislav Kinsbursky
     

23 Sep, 2012

1 commit


22 Aug, 2012

1 commit


02 Aug, 2012

1 commit

  • Pull second vfs pile from Al Viro:
    "The stuff in there: fsfreeze deadlock fixes by Jan (essentially, the
    deadlock reproduced by xfstests 068), symlink and hardlink restriction
    patches, plus assorted cleanups and fixes.

    Note that another fsfreeze deadlock (emergency thaw one) is *not*
    dealt with - the series by Fernando conflicts a lot with Jan's, breaks
    userland ABI (FIFREEZE semantics gets changed) and trades the deadlock
    for massive vfsmount leak; this is going to be handled next cycle.
    There probably will be another pull request, but that stuff won't be
    in it."

    Fix up trivial conflicts due to unrelated changes next to each other in
    drivers/{staging/gdm72xx/usb_boot.c, usb/gadget/storage_common.c}

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (54 commits)
    delousing target_core_file a bit
    Documentation: Correct s_umount state for freeze_fs/unfreeze_fs
    fs: Remove old freezing mechanism
    ext2: Implement freezing
    btrfs: Convert to new freezing mechanism
    nilfs2: Convert to new freezing mechanism
    ntfs: Convert to new freezing mechanism
    fuse: Convert to new freezing mechanism
    gfs2: Convert to new freezing mechanism
    ocfs2: Convert to new freezing mechanism
    xfs: Convert to new freezing code
    ext4: Convert to new freezing mechanism
    fs: Protect write paths by sb_start_write - sb_end_write
    fs: Skip atime update on frozen filesystem
    fs: Add freezing handling to mnt_want_write() / mnt_drop_write()
    fs: Improve filesystem freezing handling
    switch the protection of percpu_counter list to spinlock
    nfsd: Push mnt_want_write() outside of i_mutex
    btrfs: Push mnt_want_write() outside of i_mutex
    fat: Push mnt_want_write() outside of i_mutex
    ...

    Linus Torvalds
     

30 Jul, 2012

2 commits


28 Jul, 2012

12 commits


01 Jun, 2012

10 commits

  • Pull the rest of the nfsd commits from Bruce Fields:
    "... and then I cherry-picked the remainder of the patches from the
    head of my previous branch"

    This is the rest of the original nfsd branch, rebased without the
    delegation stuff that I thought really needed to be redone.

    I don't like rebasing things like this in general, but in this situation
    this was the lesser of two evils.

    * 'for-3.5' of git://linux-nfs.org/~bfields/linux: (50 commits)
    nfsd4: fix, consolidate client_has_state
    nfsd4: don't remove rebooted client record until confirmation
    nfsd4: remove some dprintk's and a comment
    nfsd4: return "real" sequence id in confirmed case
    nfsd4: fix exchange_id to return confirm flag
    nfsd4: clarify that renewing expired client is a bug
    nfsd4: simpler ordering of setclientid_confirm checks
    nfsd4: setclientid: remove pointless assignment
    nfsd4: fix error return in non-matching-creds case
    nfsd4: fix setclientid_confirm same_cred check
    nfsd4: merge 3 setclientid cases to 2
    nfsd4: pull out common code from setclientid cases
    nfsd4: merge last two setclientid cases
    nfsd4: setclientid/confirm comment cleanup
    nfsd4: setclientid remove unnecessary terms from a logical expression
    nfsd4: move rq_flavor into svc_cred
    nfsd4: stricter cred comparison for setclientid/exchange_id
    nfsd4: move principal name into svc_cred
    nfsd4: allow removing clients not holding state
    nfsd4: rearrange exchange_id logic to simplify
    ...

    Linus Torvalds
     
  • Pull nfsd update from Bruce Fields.

    * 'for-3.5-take-2' of git://linux-nfs.org/~bfields/linux: (23 commits)
    nfsd: trivial: use SEEK_SET instead of 0 in vfs_llseek
    SUNRPC: split upcall function to extract reusable parts
    nfsd: allocate id-to-name and name-to-id caches in per-net operations.
    nfsd: make name-to-id cache allocated per network namespace context
    nfsd: make id-to-name cache allocated per network namespace context
    nfsd: pass network context to idmap init/exit functions
    nfsd: allocate export and expkey caches in per-net operations.
    nfsd: make expkey cache allocated per network namespace context
    nfsd: make export cache allocated per network namespace context
    nfsd: pass pointer to export cache down to stack wherever possible.
    nfsd: pass network context to export caches init/shutdown routines
    Lockd: pass network namespace to creation and destruction routines
    NFSd: remove hard-coded dereferences to name-to-id and id-to-name caches
    nfsd: pass pointer to expkey cache down to stack wherever possible.
    nfsd: use hash table from cache detail in nfsd export seq ops
    nfsd: pass svc_export_cache pointer as private data to "exports" seq file ops
    nfsd: use exp_put() for svc_export_cache put
    nfsd: use cache detail pointer from svc_export structure on cache put
    nfsd: add link to owner cache detail to svc_export structure
    nfsd: use passed cache_detail pointer expkey_parse()
    ...

    Linus Torvalds
     
  • Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This is just a code move, which from my POV makes the code look better.
    I.e. now on start we have 3 different stages:
    1) Service creation.
    2) Service per-net data allocation.
    3) Service start.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This function creates service if it doesn't exist, or increases usage
    counter if it does, and returns a pointer to it. The usage counter will
    be droppepd by svc_destroy() later in lockd_up().

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This patch also replaces svc_rpcb_setup() with svc_bind().

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • The idea is to separate service destruction and per-net operations,
    because these are two different things and the mix looks ugly.

    Notes:

    1) For NFS server this patch looks ugly (sorry for that). But these
    place will be rewritten soon during NFSd containerization.

    2) LockD per-net counter increase int lockd_up() was moved prior to
    make_socks() to make lockd_down_net() call safe in case of error.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This new routine is responsible for service registration in a specified
    network context.

    The idea is to separate service creation from per-net operations.

    Note also: since registering service with svc_bind() can fail, the
    service will be destroyed and during destruction it will try to
    unregister itself from rpcbind. In this case unregistration has to be
    skipped.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky