23 Mar, 2012

1 commit

  • Pull NFS client updates for Linux 3.4 from Trond Myklebust:
    "New features include:
    - Add NFS client support for containers.

    This should enable most of the necessary functionality, including
    lockd support, and support for rpc.statd, NFSv4 idmapper and
    RPCSEC_GSS upcalls into the correct network namespace from which
    the mount system call was issued.

    - NFSv4 idmapper scalability improvements

    Base the idmapper cache on the keyring interface to allow
    concurrent access to idmapper entries. Start the process of
    migrating users from the single-threaded daemon-based approach to
    the multi-threaded request-key based approach.

    - NFSv4.1 implementation id.

    Allows the NFSv4.1 client and server to mutually identify each
    other for logging and debugging purposes.

    - Support the 'vers=4.1' mount option for mounting NFSv4.1 instead of
    having to use the more counterintuitive 'vers=4,minorversion=1'.

    - SUNRPC tracepoints.

    Start the process of adding tracepoints in order to improve
    debugging of the RPC layer.

    - pNFS object layout support for autologin.

    Important bugfixes include:

    - Fix a bug in rpc_wake_up/rpc_wake_up_status that caused them to
    fail to wake up all tasks when applied to priority waitqueues.

    - Ensure that we handle read delegations correctly, when we try to
    truncate a file.

    - A number of fixes for NFSv4 state manager loops (mostly to do with
    delegation recovery)."

    * tag 'nfs-for-3.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (224 commits)
    NFS: fix sb->s_id in nfs debug prints
    xprtrdma: Remove assumption that each segment is ls_state in release_lockowner
    NFS: ncommit count is being double decremented
    SUNRPC: We must not use list_for_each_entry_safe() in rpc_wake_up()
    Try using machine credentials for RENEW calls
    NFSv4.1: Fix a few issues in filelayout_commit_pagelist
    NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code
    ...

    Linus Torvalds
     

21 Mar, 2012

2 commits


01 Feb, 2012

7 commits


15 Jan, 2012

1 commit

  • * 'for-3.3' of git://linux-nfs.org/~bfields/linux: (31 commits)
    nfsd4: nfsd4_create_clid_dir return value is unused
    NFSD: Change name of extended attribute containing junction
    svcrpc: don't revert to SVC_POOL_DEFAULT on nfsd shutdown
    svcrpc: fix double-free on shutdown of nfsd after changing pool mode
    nfsd4: be forgiving in the absence of the recovery directory
    nfsd4: fix spurious 4.1 post-reboot failures
    NFSD: forget_delegations should use list_for_each_entry_safe
    NFSD: Only reinitilize the recall_lru list under the recall lock
    nfsd4: initialize special stateid's at compile time
    NFSd: use network-namespace-aware cache registering routines
    SUNRPC: create svc_xprt in proper network namespace
    svcrpc: update outdated BKL comment
    nfsd41: allow non-reclaim open-by-fh's in 4.1
    svcrpc: avoid memory-corruption on pool shutdown
    svcrpc: destroy server sockets all at once
    svcrpc: make svc_delete_xprt static
    nfsd: Fix oops when parsing a 0 length export
    nfsd4: Use kmemdup rather than duplicating its implementation
    nfsd4: add a separate (lockowner, inode) lookup
    nfsd4: fix CONFIG_NFSD_FAULT_INJECTION compile error
    ...

    Linus Torvalds
     

11 Jan, 2012

1 commit

  • * 'nfs-for-3.3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFSv4: Change the default setting of the nfs4_disable_idmapping parameter
    NFSv4: Save the owner/group name string when doing open
    NFS: Remove pNFS bloat from the generic write path
    pnfs-obj: Must return layout on IO error
    pnfs-obj: pNFS errors are communicated on iodata->pnfs_error
    NFS: Cache state owners after files are closed
    NFS: Clean up nfs4_find_state_owners_locked()
    NFSv4: include bitmap in nfsv4 get acl data
    nfs: fix a minor do_div portability issue
    NFSv4.1: cleanup comment and debug printk
    NFSv4.1: change nfs4_free_slot parameters for dynamic slots
    NFSv4.1: cleanup init and reset of session slot tables
    NFSv4.1: fix backchannel slotid off-by-one bug
    nfs: fix regression in handling of context= option in NFSv4
    NFS - fix recent breakage to NFS error handling.
    NFS: Retry mounting NFSROOT
    SUNRPC: Clean up the RPCSEC_GSS service ticket requests

    Linus Torvalds
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

07 Jan, 2012

1 commit


06 Jan, 2012

3 commits

  • Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • As of fedfs-utils-0.8.0, user space stores all NFS junction
    information in a single extended attribute: "trusted.junction.nfs".

    Both FedFS and NFS basic junctions are stored in this one attribute,
    and the intention is that all future forms of NFS junction metadata
    will be stored in this attribute. Other protocols may use a different
    extended attribute.

    Thus NFSD needs to look only for that one extended attribute. The
    "trusted.junction.type" xattr is deprecated. fedfs-utils-0.8.0 will
    continue to attach a "trusted.junction.type" xattr to junctions, but
    future fedfs-utils releases may no longer do that.

    Signed-off-by: Chuck Lever
    Signed-off-by: J. Bruce Fields

    Chuck Lever
     
  • If the recovery directory doesn't exist, then behavior after a reboot
    will be suboptimal. But it's unnecessarily harsh to then prevent the
    nfsv4 server from working at all. Instead just print a warning
    (already done in nfsd4_init_recdir()) and soldier on.

    Tested-by: Lior
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

05 Jan, 2012

1 commit


04 Jan, 2012

4 commits


03 Jan, 2012

1 commit


15 Dec, 2011

1 commit


14 Dec, 2011

1 commit


13 Dec, 2011

1 commit


08 Dec, 2011

1 commit


07 Dec, 2011

2 commits

  • With NFSv4.0 it was safe to assume that open-by-filehandles were always
    reclaims.

    With NFSv4.1 there are non-reclaim open-by-filehandle operations, so we
    should ensure we're only insisting on reclaims in the
    OPEN_CLAIM_PREVIOUS case.

    Signed-off-by: Mi Jinlong
    Signed-off-by: J. Bruce Fields

    Mi Jinlong
     
  • expkey_parse() oopses when handling a 0 length export. This is easily
    triggerable from usermode by writing 0 bytes into
    '/proc/[proc id]/net/rpc/nfsd.fh/channel'.

    Below is the log:

    [ 1402.286893] BUG: unable to handle kernel paging request at ffff880077c49fff
    [ 1402.287632] IP: [] expkey_parse+0x28/0x2e1
    [ 1402.287632] PGD 2206063 PUD 1fdfd067 PMD 1ffbc067 PTE 8000000077c49160
    [ 1402.287632] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    [ 1402.287632] CPU 1
    [ 1402.287632] Pid: 20198, comm: trinity Not tainted 3.2.0-rc2-sasha-00058-gc65cd37 #6
    [ 1402.287632] RIP: 0010:[] [] expkey_parse+0x28/0x2e1
    [ 1402.287632] RSP: 0018:ffff880077f0fd68 EFLAGS: 00010292
    [ 1402.287632] RAX: ffff880077c49fff RBX: 00000000ffffffea RCX: 0000000001043400
    [ 1402.287632] RDX: 0000000000000000 RSI: ffff880077c4a000 RDI: ffffffff82283de0
    [ 1402.287632] RBP: ffff880077f0fe18 R08: 0000000000000001 R09: ffff880000000000
    [ 1402.287632] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880077c4a000
    [ 1402.287632] R13: ffffffff82283de0 R14: 0000000001043400 R15: ffffffff82283de0
    [ 1402.287632] FS: 00007f25fec3f700(0000) GS:ffff88007d400000(0000) knlGS:0000000000000000
    [ 1402.287632] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [ 1402.287632] CR2: ffff880077c49fff CR3: 0000000077e1d000 CR4: 00000000000406e0
    [ 1402.287632] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 1402.287632] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    [ 1402.287632] Process trinity (pid: 20198, threadinfo ffff880077f0e000, task ffff880077db17b0)
    [ 1402.287632] Stack:
    [ 1402.287632] ffff880077db17b0 ffff880077c4a000 ffff880077f0fdb8 ffffffff810b411e
    [ 1402.287632] ffff880000000000 ffff880077db17b0 ffff880077c4a000 ffffffff82283de0
    [ 1402.287632] 0000000001043400 ffffffff82283de0 ffff880077f0fde8 ffffffff81111f63
    [ 1402.287632] Call Trace:
    [ 1402.287632] [] ? lock_release+0x1af/0x1bc
    [ 1402.287632] [] ? might_fault+0x97/0x9e
    [ 1402.287632] [] ? might_fault+0x4e/0x9e
    [ 1402.287632] [] cache_do_downcall+0x3e/0x4f
    [ 1402.287632] [] cache_write.clone.16+0xbb/0x130
    [ 1402.287632] [] ? cache_write_pipefs+0x1a/0x1a
    [ 1402.287632] [] cache_write_procfs+0x19/0x1b
    [ 1402.287632] [] proc_reg_write+0x8e/0xad
    [ 1402.287632] [] vfs_write+0xaa/0xfd
    [ 1402.287632] [] ? fget_light+0x35/0x9e
    [ 1402.287632] [] sys_write+0x48/0x6f
    [ 1402.287632] [] system_call_fastpath+0x16/0x1b
    [ 1402.287632] Code: c0 c9 c3 55 48 63 d2 48 89 e5 48 8d 44 32 ff 41 57 41 56 41 55 41 54 53 bb ea ff ff ff 48 81 ec 88 00 00 00 48 89 b5 58 ff ff ff
    [ 1402.287632] 38 0a 0f 85 89 02 00 00 c6 00 00 48 8b 3d 44 4a e5 01 48 85
    [ 1402.287632] RIP [] expkey_parse+0x28/0x2e1
    [ 1402.287632] RSP
    [ 1402.287632] CR2: ffff880077c49fff
    [ 1402.287632] ---[ end trace 368ef53ff773a5e3 ]---

    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: linux-nfs@vger.kernel.org
    Cc: stable@kernel.org
    Signed-off-by: Sasha Levin
    Signed-off-by: J. Bruce Fields

    Sasha Levin
     

02 Dec, 2011

1 commit


26 Nov, 2011

1 commit


16 Nov, 2011

2 commits


09 Nov, 2011

1 commit


08 Nov, 2011

6 commits

  • Hash lockowners on just the owner string rather than on (owner, inode).
    This makes the owner-string lookup needed for RELEASE_LOCKOWNER simpler
    (currently it's doing at a linear search through the entire hash
    table!). That may come at the expense of making (owner, inode) lookups
    more expensive if a client reuses the same lockowner across multiple
    files. We might add a separate lookup for that.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The close parenthesis was hard to find with it spaced so far over.

    Signed-off-by: Bryan Schumaker
    [bfields@redhat.com: get all these lines under 80 chars while we're here]
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     
  • init_nfsd() was calling free_slabs() during cleanup code, but the call
    to init_slabs() was hidden in nfsd4_state_init(). This could be
    confusing to people unfamiliar with the code.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     
  • Fault injection on the NFS server makes it easier to test the client's
    state manager and recovery threads. Simulating errors on the server is
    easier than finding the right conditions that cause them naturally.

    This patch uses debugfs to add a simple framework for fault injection to
    the server. This framework is a config option, and can be enabled
    through CONFIG_NFSD_FAULT_INJECTION. Assuming you have debugfs mounted
    to /sys/debug, a set of files will be created in /sys/debug/nfsd/.
    Writing to any of these files will cause the corresponding action and
    write a log entry to dmesg.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     
  • Instead of creating a new lockowner and stateid for every
    open_to_lockowner call, reuse the existing lockowner if it exists.

    Reported-by: Trond Myklebust
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • I'd rather the "ignore clientid in sessions case" rule be enforced in
    just one place.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields