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
     

14 Apr, 2012

1 commit


12 Apr, 2012

1 commit

  • v2: dereference of most probably already released nlm_host removed in
    nlmclnt_done() and reclaimer().

    These routines are called from locks reclaimer() kernel thread. This thread
    works in "init_net" network context and currently relays on persence on lockd
    thread and it's per-net resources. Thus lockd_up() and lockd_down() can't relay
    on current network context. So let's pass corrent one into them.

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

    Stanislav Kinsbursky
     

26 Mar, 2012

1 commit


21 Mar, 2012

1 commit

  • Stephen Rothwell reports:
    net/sunrpc/rpcb_clnt.c: In function 'rpcb_enc_mapping':
    net/sunrpc/rpcb_clnt.c:820:19: warning: unused variable 'task' [-Wunused-variable]
    net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_getport':
    net/sunrpc/rpcb_clnt.c:837:19: warning: unused variable 'task' [-Wunused-variable]
    net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_set':
    net/sunrpc/rpcb_clnt.c:860:19: warning: unused variable 'task' [-Wunused-variable]
    net/sunrpc/rpcb_clnt.c: In function 'rpcb_enc_getaddr':
    net/sunrpc/rpcb_clnt.c:892:19: warning: unused variable 'task' [-Wunused-variable]
    net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_getaddr':
    net/sunrpc/rpcb_clnt.c:914:19: warning: unused variable 'task' [-Wunused-variable]
    fs/lockd/svclock.c:49:20: warning: 'nlmdbg_cookie2a' declared 'static' but never defined [-Wunused-function]

    Reported-by: Stephen Rothwell
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

18 Feb, 2012

1 commit

  • If you try to set grace_period or timeout via a module parameter
    to lockd, and do this on a big-endian machine where

    sizeof(int) != sizeof(unsigned long)

    it won't work. This number given will be effectively shifted right
    by the difference in those two sizes.

    So cast kp->arg properly to get correct result.

    Cc: stable@kernel.org
    Signed-off-by: NeilBrown
    Signed-off-by: J. Bruce Fields

    NeilBrown
     

15 Feb, 2012

6 commits

  • Lockd now managed in network namespace context. And this patch introduces
    network namespace related NLM hosts shutdown in case of releasing per-net Lockd
    resources.

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

    Stanislav Kinsbursky
     
  • NLM host is network namespace aware now.
    So NSM have to take it into account.

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

    Stanislav Kinsbursky
     
  • This object depends on RPC client, and thus on network namespace.
    So let's make it's allocation and lookup in network namespace context.

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

    Stanislav Kinsbursky
     
  • This patch introduces per-net Lockd initialization and destruction routines.
    The logic is the same as in global Lockd up and down routines. Probably the
    solution is not the best one. But at least it looks clear.
    So per-net "up" routine are called only in case of lockd is running already. If
    per-net resources are not allocated yet, then service is being registered with
    local portmapper and lockd sockets created.
    Per-net "down" routine is called on every lockd_down() call in case of global
    users counter is not zero.

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

    Stanislav Kinsbursky
     
  • Lockd is going to be shared between network namespaces - i.e. going to be able
    to handle lock requests from different network namespaces. This means, that
    network namespace related resources have to be allocated not once (like now),
    but for every network namespace context, from which service is requested to
    operate.
    This patch implements Lockd per-net users accounting. New per-net counter is
    used to determine, when per-net resources have to be freed.

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

    Stanislav Kinsbursky
     
  • This patch parametrizes Lockd permanent sockets creation routine by network
    namespace context.
    It also replaces hard-coded init_net with current network namespace context in
    Lockd sockets creation routines.
    This approach looks safe, because Lockd is created during NFS mount (or NFS
    server start) and thus socket is required exactly in current network namespace
    context. But in the same time it means, that Lockd sockets inherits first Lockd
    requester network namespace. This issue will be fixed in further patches of the
    series.

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

    Stanislav Kinsbursky
     

01 Feb, 2012

2 commits


13 Jan, 2012

1 commit


07 Jan, 2012

1 commit