04 Jan, 2012

2 commits


25 Oct, 2011

1 commit

  • * 'nfs-for-3.2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (26 commits)
    Check validity of cl_rpcclient in nfs_server_list_show
    NFS: Get rid of the nfs_rdata_mempool
    NFS: Don't rely on PageError in nfs_readpage_release_partial
    NFS: Get rid of unnecessary calls to ClearPageError() in read code
    NFS: Get rid of nfs_restart_rpc()
    NFS: Get rid of the unused nfs_write_data->flags field
    NFS: Get rid of the unused nfs_read_data->flags field
    NFSv4: Translate NFS4ERR_BADNAME into ENOENT when applied to a lookup
    NFS: Remove the unused "lookupfh()" version of nfs4_proc_lookup()
    NFS: Use the inode->i_version to cache NFSv4 change attribute information
    SUNRPC: Remove unnecessary export of rpc_sockaddr2uaddr
    SUNRPC: Fix rpc_sockaddr2uaddr
    nfs/super.c: local functions should be static
    pnfsblock: fix writeback deadlock
    pnfsblock: fix NULL pointer dereference
    pnfs: recoalesce when ld read pagelist fails
    pnfs: recoalesce when ld write pagelist fails
    pnfs: make _set_lo_fail generic
    pnfsblock: add missing rpc_put_mount and path_put
    SUNRPC/NFS: make rpc pipe upcall generic
    ...

    Linus Torvalds
     

19 Oct, 2011

1 commit


11 Oct, 2011

1 commit


02 Jul, 2011

1 commit


12 Jan, 2011

1 commit

  • * 'nfs-for-2.6.38' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (89 commits)
    NFS fix the setting of exchange id flag
    NFS: Don't use vm_map_ram() in readdir
    NFSv4: Ensure continued open and lockowner name uniqueness
    NFS: Move cl_delegations to the nfs_server struct
    NFS: Introduce nfs_detach_delegations()
    NFS: Move cl_state_owners and related fields to the nfs_server struct
    NFS: Allow walking nfs_client.cl_superblocks list outside client.c
    pnfs: layout roc code
    pnfs: update nfs4_callback_recallany to handle layouts
    pnfs: add CB_LAYOUTRECALL handling
    pnfs: CB_LAYOUTRECALL xdr code
    pnfs: change lo refcounting to atomic_t
    pnfs: check that partial LAYOUTGET return is ignored
    pnfs: add layout to client list before sending rpc
    pnfs: serialize LAYOUTGET(openstateid)
    pnfs: layoutget rpc code cleanup
    pnfs: change how lsegs are removed from layout list
    pnfs: change layout state seqlock to a spinlock
    pnfs: add prefix to struct pnfs_layout_hdr fields
    pnfs: add prefix to struct pnfs_layout_segment fields
    ...

    Linus Torvalds
     

07 Jan, 2011

3 commits

  • Reduce some branches and memory accesses in dcache lookup by adding dentry
    flags to indicate common d_ops are set, rather than having to check them.
    This saves a pointer memory access (dentry->d_op) in common path lookup
    situations, and saves another pointer load and branch in cases where we
    have d_op but not the particular operation.

    Patched with:

    git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • RCU free the struct inode. This will allow:

    - Subsequent store-free path walking patch. The inode must be consulted for
    permissions when walking, so an RCU inode reference is a must.
    - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
    to take i_lock no longer need to take sb_inode_list_lock to walk the list in
    the first place. This will simplify and optimize locking.
    - Could remove some nested trylock loops in dcache code
    - Could potentially simplify things a bit in VM land. Do not need to take the
    page lock to follow page->mapping.

    The downsides of this is the performance cost of using RCU. In a simple
    creat/unlink microbenchmark, performance drops by about 10% due to inability to
    reuse cache-hot slab objects. As iterations increase and RCU freeing starts
    kicking over, this increases to about 20%.

    In cases where inode lifetimes are longer (ie. many inodes may be allocated
    during the average life span of a single inode), a lot of this cache reuse is
    not applicable, so the regression caused by this patch is smaller.

    The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
    however this adds some complexity to list walking and store-free path walking,
    so I prefer to implement this at a later date, if it is shown to be a win in
    real situations. I haven't found a regression in any non-micro benchmark so I
    doubt it will be a problem.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Change d_delete from a dentry deletion notification to a dentry caching
    advise, more like ->drop_inode. Require it to be constant and idempotent,
    and not take d_lock. This is how all existing filesystems use the callback
    anyway.

    This makes fine grained dentry locking of dput and dentry lru scanning
    much simpler.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

05 Jan, 2011

1 commit

  • On Tue, 2010-12-14 at 16:58 +0800, Mi Jinlong wrote:
    > Hi,
    >
    > When testing NFSv4 at RHEL6 with kernel 2.6.32, I got a kernel panic
    > at NFS client's __rpc_create_common function.
    >
    > The panic place is:
    > rpc_mkpipe
    > __rpc_lookup_create() __rpc_mkpipe() __rpc_create_common()
    > ****** BUG_ON(!d_unhashed(dentry)); ****** *panic*
    >
    > It means that the dentry's d_flags have be set DCACHE_UNHASHED,
    > but it should not be set here.
    >
    > Is someone known this bug? or give me some idea?
    >
    > A reproduce program is append, but it can't reproduce the bug every time.
    > the export is: "/nfsroot *(rw,no_root_squash,fsid=0,insecure)"
    >
    > And the panic message is append.
    >
    > ============================================================================
    > #!/bin/sh
    >
    > LOOPTOTAL=768
    > LOOPCOUNT=0
    > ret=0
    >
    > while [ $LOOPCOUNT -ne $LOOPTOTAL ]
    > do
    > ((LOOPCOUNT += 1))
    > service nfs restart
    > /usr/sbin/rpc.idmapd
    > mount -t nfs4 127.0.0.1:/ /mnt|| return 1;
    > ls -l /var/lib/nfs/rpc_pipefs/nfs/*/
    > umount /mnt
    > echo $LOOPCOUNT
    > done
    >
    > ===============================================================================
    > Code: af 60 01 00 00 89 fa 89 f0 e8 64 cf 89 f0 e8 5c 7c 64 cf 31 c0 8b 5c 24 10 8b
    > 74 24 14 8b 7c 24 18 8b 6c 24 1c 83 c4 20 c3 0b eb fc 8b 46 28 c7 44 24 08 20
    > de ee f0 c7 44 24 04 56 ea
    > EIP:[] __rpc_create_common+0x8a/0xc0 [sunrpc] SS:ESP 0068:eccb5d28
    > ---[ end trace 8f5606cd08928ed2]---
    > Kernel panic - not syncing: Fatal exception
    > Pid:7131, comm: mount.nfs4 Tainted: G D -------------------2.6.32 #1
    > Call Trace:
    > [] ? panic+0x42/0xed
    > [] ? oops_end+0xbc/0xd0
    > [] ? do_invalid_op+0x0/0x90
    > [] ? do_invalid_op+0x7f/0x90
    > [] ? __rpc_create_common+0x8a/0xc0[sunrpc]
    > [] ? rpc_free_task+0x33/0x70[sunrpc]
    > [] ? prc_call_sync+0x48/0x60[sunrpc]
    > [] ? rpc_ping+0x4e/0x60[sunrpc]
    > [] ? rpc_create+0x38f/0x4f0[sunrpc]
    > [] ? error_code+0x73/0x78
    > [] ? __rpc_create_common+0x8a/0xc0[sunrpc]
    > [] ? d_lookup+0x2a/0x40
    > [] ? rpc_mkpipe+0x111/0x1b0[sunrpc]
    > [] ? nfs_create_rpc_client+0xb4/0xf0[nfs]
    > [] ? nfs_fscache_get_client_cookie+0x1d/0x50[nfs]
    > [] ? nfs_idmap_new+0x7b/0x140[nfs]
    > [] ? strlcpy+0x3a/0x60
    > [] ? nfs4_set_client+0xea/0x2b0[nfs]
    > [] ? nfs4_create_server+0xac/0x1b0[nfs]
    > [] ? krealloc+0x40/0x50
    > [] ? nfs4_remote_get_sb+0x6b/0x250[nfs]
    > [] ? kstrdup+0x3c/0x60
    > [] ? vfs_kern_mount+0x69/0x170
    > [] ? nfs_do_root_mount+0x6c/0xa0[nfs]
    > [] ? nfs4_try_mount+0x37/0xa0[nfs]
    > [] ? nfs4_validate_text_mount_data+-x7d/0xf0[nfs]
    > [] ? nfs4_get_sb+0x92/0x2f0
    > [] ? vfs_kern_mount+0x69/0x170
    > [] ? get_fs_type+0x32/0xb0
    > [] ? do_kern_mount+0x3f/0xe0
    > [] ? do_mount+0x2ef/0x740
    > [] ? copy_mount_options+0xb0/0x120
    > [] ? sys_mount+0x6e/0xa0

    Hi,

    Does the following patch fix the problem?

    Cheers
    Trond

    --------------------------
    SUNRPC: Fix a BUG in __rpc_create_common

    From: Trond Myklebust

    Mi Jinlong reports:

    When testing NFSv4 at RHEL6 with kernel 2.6.32, I got a kernel panic
    at NFS client's __rpc_create_common function.

    The panic place is:
    rpc_mkpipe
    __rpc_lookup_create()
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

29 Oct, 2010

1 commit


26 Oct, 2010

1 commit

  • Instead of always assigning an increasing inode number in new_inode
    move the call to assign it into those callers that actually need it.
    For now callers that need it is estimated conservatively, that is
    the call is added to all filesystems that do not assign an i_ino
    by themselves. For a few more filesystems we can avoid assigning
    any inode number given that they aren't user visible, and for others
    it could be done lazily when an inode number is actually needed,
    but that's left for later patches.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Dave Chinner
    Signed-off-by: Al Viro

    Christoph Hellwig
     

25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

23 Oct, 2010

1 commit

  • * 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    BKL: introduce CONFIG_BKL.
    dabusb: remove the BKL
    sunrpc: remove the big kernel lock
    init/main.c: remove BKL notations
    blktrace: remove the big kernel lock
    rtmutex-tester: make it build without BKL
    dvb-core: kill the big kernel lock
    dvb/bt8xx: kill the big kernel lock
    tlclk: remove big kernel lock
    fix rawctl compat ioctls breakage on amd64 and itanic
    uml: kill big kernel lock
    parisc: remove big kernel lock
    cris: autoconvert trivial BKL users
    alpha: kill big kernel lock
    isapnp: BKL removal
    s390/block: kill the big kernel lock
    hpet: kill BKL, add compat_ioctl

    Linus Torvalds
     

19 Oct, 2010

1 commit

  • The sunrpc cache_ioctl function does not need the big kernel lock
    because it uses its own queue_lock already.

    rpc_pipe_ioctl apparently should be using i_lock like the other
    operations on the pipe file descriptor do.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

23 Sep, 2010

1 commit


13 Sep, 2010

2 commits

  • There is a race between rpc_info_open and rpc_release_client()
    in that nothing stops a process from opening the file after
    the clnt->cl_kref goes to zero.

    Fix this by using atomic_inc_unless_zero()...

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

    Trond Myklebust
     
  • If rpc_queue_upcall() adds a new upcall to the rpci->pipe list just
    after rpc_pipe_release calls rpc_purge_list(), but before it calls
    gss_pipe_release (as rpci->ops->release_pipe(inode)), then the latter
    will free a message without deleting it from the rpci->pipe list.

    We will be left with a freed object on the rpc->pipe list. Most
    frequent symptoms are kernel crashes in rpc.gssd system calls on the
    pipe in question.

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

    Trond Myklebust
     

22 May, 2010

1 commit


22 Mar, 2010

1 commit


05 Mar, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
    init: Open /dev/console from rootfs
    mqueue: fix typo "failues" -> "failures"
    mqueue: only set error codes if they are really necessary
    mqueue: simplify do_open() error handling
    mqueue: apply mathematics distributivity on mq_bytes calculation
    mqueue: remove unneeded info->messages initialization
    mqueue: fix mq_open() file descriptor leak on user-space processes
    fix race in d_splice_alias()
    set S_DEAD on unlink() and non-directory rename() victims
    vfs: add NOFOLLOW flag to umount(2)
    get rid of ->mnt_parent in tomoyo/realpath
    hppfs can use existing proc_mnt, no need for do_kern_mount() in there
    Mirror MS_KERNMOUNT in ->mnt_flags
    get rid of useless vfsmount_lock use in put_mnt_ns()
    Take vfsmount_lock to fs/internal.h
    get rid of insanity with namespace roots in tomoyo
    take check for new events in namespace (guts of mounts_poll()) to namespace.c
    Don't mess with generic_permission() under ->d_lock in hpfs
    sanitize const/signedness for udf
    nilfs: sanitize const/signedness in dealing with ->d_name.name
    ...

    Fix up fairly trivial (famous last words...) conflicts in
    drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c

    Linus Torvalds
     

04 Mar, 2010

1 commit


15 Feb, 2010

1 commit


24 Sep, 2009

1 commit


22 Sep, 2009

1 commit


20 Aug, 2009

2 commits


10 Aug, 2009

12 commits