20 Oct, 2011

1 commit


26 Jul, 2011

1 commit


23 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits)
    vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp
    isofs: Remove global fs lock
    jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory
    fix IN_DELETE_SELF on overwriting rename() on ramfs et.al.
    mm/truncate.c: fix build for CONFIG_BLOCK not enabled
    fs:update the NOTE of the file_operations structure
    Remove dead code in dget_parent()
    AFS: Fix silly characters in a comment
    switch d_add_ci() to d_splice_alias() in "found negative" case as well
    simplify gfs2_lookup()
    jfs_lookup(): don't bother with . or ..
    get rid of useless dget_parent() in btrfs rename() and link()
    get rid of useless dget_parent() in fs/btrfs/ioctl.c
    fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
    drivers: fix up various ->llseek() implementations
    fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek
    Ext4: handle SEEK_HOLE/SEEK_DATA generically
    Btrfs: implement our own ->llseek
    fs: add SEEK_HOLE and SEEK_DATA flags
    reiserfs: make reiserfs default to barrier=flush
    ...

    Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new
    shrinker callout for the inode cache, that clashed with the xfs code to
    start the periodic workers later.

    Linus Torvalds
     

20 Jul, 2011

1 commit


15 Jul, 2011

1 commit


13 Jul, 2011

1 commit


06 Jul, 2011

1 commit


02 Jul, 2011

1 commit


17 Jun, 2011

1 commit


15 Jun, 2011

1 commit

  • If the NLM daemon is killed on the NFS server, we can currently end up
    hanging forever on an 'unlock' request, instead of aborting. Basically,
    if the rpcbind request fails, or the server keeps returning garbage, we
    really want to quit instead of retrying.

    Tested-by: Vasily Averin
    Signed-off-by: Trond Myklebust
    Cc: stable@kernel.org

    Trond Myklebust
     

28 May, 2011

3 commits

  • TI-RPC introduces the capability of performing RPC over AF_LOCAL
    sockets. It uses this mainly for registering and unregistering
    local RPC services securely with the local rpcbind, but we could
    also conceivably use it as a generic upcall mechanism.

    This patch provides a client-side only implementation for the moment.
    We might also consider a server-side implementation to provide
    AF_LOCAL access to NLM (for statd downcalls, and such like).

    Autobinding is not supported on kernel AF_LOCAL transports at this
    time. Kernel ULPs must specify the pathname of the remote endpoint
    when an AF_LOCAL transport is created. rpcbind supports registering
    services available via AF_LOCAL, so the kernel could handle it with
    some adjustment to ->rpcbind and ->set_port. But we don't need this
    feature for doing upcalls via well-known named sockets.

    This has not been tested with ULPs that move a substantial amount of
    data. Thus, I can't attest to how robust the write_space and
    congestion management logic is.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up. The documenting comment at the top of net/sunrpc/clnt.c is
    out of date. We adopted BSD's RTO estimation mechanism years ago.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up. Preferred style is not to use curly braces around
    switch cases. I'm about to add another case that needs a third
    type cast.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

25 Apr, 2011

1 commit

  • On occasion, it is useful for the NFS layer to distinguish between
    soft timeouts and other EIO errors due to (say) encoding errors,
    or authentication errors.

    The following patch ensures that the default behaviour of the RPC
    layer remains to return EIO on soft timeouts (until we have
    audited all the callers).

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

18 Mar, 2011

1 commit

  • RPC task RPC_TASK_QUEUED bit is set must be checked before trying to wake up
    task rpc_killall_tasks() because task->tk_waitqueue can not be set (equal to
    NULL).
    Also, as Trond Myklebust mentioned, such approach (instead of checking
    tk_waitqueue to NULL) allows us to "optimise away the call to
    rpc_wake_up_queued_task() altogether for those
    tasks that aren't queued".

    Here is an example of dereferencing of tk_waitqueue equal to NULL:

    CPU 0 CPU 1 CPU 2
    -------------------- --------------------- --------------------------
    nfs4_run_open_task
    rpc_run_task
    rpc_execute
    rpc_set_active
    rpc_make_runnable
    (waiting)
    rpc_async_schedule
    nfs4_open_prepare
    nfs_wait_on_sequence
    nfs_umount_begin
    rpc_killall_tasks
    rpc_wake_up_task
    rpc_wake_up_queued_task
    spin_lock(tk_waitqueue == NULL)
    BUG()
    rpc_sleep_on
    spin_lock(&q->lock)
    __rpc_sleep_on
    task->tk_waitqueue = q

    Signed-off-by: Stanislav Kinsbursky
    Cc: stable@kernel.org
    Signed-off-by: Trond Myklebust

    Stanislav Kinsbursky
     

12 Mar, 2011

2 commits

  • Use our own async error handler.
    Mark the layout as failed and retry i/o through the MDS on specified errors.

    Update the mds_offset in nfs_readpage_retry so that a failed short-read retry
    to a DS gets correctly resent through the MDS.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • rpc_run_task can only fail if it is not passed in a preallocated task.
    However, that is not at all clear with the current code. So
    remove several impossible to occur failure checks.

    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     

22 Dec, 2010

1 commit


17 Dec, 2010

2 commits

  • Now that all client-side XDR decoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC res *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each decoder function.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Now that all client-side XDR encoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC arg *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each encoder function.

    Also, all the client-side encoder functions return 0 now, making a
    return value superfluous. Take this opportunity to convert them to
    return void instead.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

23 Nov, 2010

1 commit


27 Oct, 2010

1 commit

  • * 'for-2.6.37' of git://linux-nfs.org/~bfields/linux: (99 commits)
    svcrpc: svc_tcp_sendto XPT_DEAD check is redundant
    svcrpc: no need for XPT_DEAD check in svc_xprt_enqueue
    svcrpc: assume svc_delete_xprt() called only once
    svcrpc: never clear XPT_BUSY on dead xprt
    nfsd4: fix connection allocation in sequence()
    nfsd4: only require krb5 principal for NFSv4.0 callbacks
    nfsd4: move minorversion to client
    nfsd4: delay session removal till free_client
    nfsd4: separate callback change and callback probe
    nfsd4: callback program number is per-session
    nfsd4: track backchannel connections
    nfsd4: confirm only on succesful create_session
    nfsd4: make backchannel sequence number per-session
    nfsd4: use client pointer to backchannel session
    nfsd4: move callback setup into session init code
    nfsd4: don't cache seq_misordered replies
    SUNRPC: Properly initialize sock_xprt.srcaddr in all cases
    SUNRPC: Use conventional switch statement when reclassifying sockets
    sunrpc/xprtrdma: clean up workqueue usage
    sunrpc: Turn list_for_each-s into the ..._entry-s
    ...

    Fix up trivial conflicts (two different deprecation notices added in
    separate branches) in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     

26 Oct, 2010

1 commit

  • * 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (67 commits)
    SUNRPC: Cleanup duplicate assignment in rpcauth_refreshcred
    nfs: fix unchecked value
    Ask for time_delta during fsinfo probe
    Revalidate caches on lock
    SUNRPC: After calling xprt_release(), we must restart from call_reserve
    NFSv4: Fix up the 'dircount' hint in encode_readdir
    NFSv4: Clean up nfs4_decode_dirent
    NFSv4: nfs4_decode_dirent must clear entry->fattr->valid
    NFSv4: Fix a regression in decode_getfattr
    NFSv4: Fix up decode_attr_filehandle() to handle the case of empty fh pointer
    NFS: Ensure we check all allocation return values in new readdir code
    NFS: Readdir plus in v4
    NFS: introduce generic decode_getattr function
    NFS: check xdr_decode for errors
    NFS: nfs_readdir_filler catch all errors
    NFS: readdir with vmapped pages
    NFS: remove page size checking code
    NFS: decode_dirent should use an xdr_stream
    SUNRPC: Add a helper function xdr_inline_peek
    NFS: remove readdir plus limit
    ...

    Linus Torvalds
     

25 Oct, 2010

1 commit

  • Rob Leslie reports seeing the following Oops after his Kerberos session
    expired.

    BUG: unable to handle kernel NULL pointer dereference at 00000058
    IP: [] rpcauth_refreshcred+0x11/0x12c [sunrpc]
    *pde = 00000000
    Oops: 0000 [#1]
    last sysfs file: /sys/devices/platform/pc87360.26144/temp3_input
    Modules linked in: autofs4 authenc esp4 xfrm4_mode_transport ipt_LOG ipt_REJECT xt_limit xt_state ipt_REDIRECT xt_owner xt_HL xt_hl xt_tcpudp xt_mark cls_u32 cls_tcindex sch_sfq sch_htb sch_dsmark geodewdt deflate ctr twofish_generic twofish_i586 twofish_common camellia serpent blowfish cast5 cbc xcbc rmd160 sha512_generic sha1_generic hmac crypto_null af_key rpcsec_gss_krb5 nfsd exportfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ip_gre sit tunnel4 dummy ext3 jbd nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables pc8736x_gpio nsc_gpio pc87360 hwmon_vid loop aes_i586 aes_generic sha256_generic dm_crypt cs5535_gpio serio_raw cs5535_mfgpt hifn_795x des_generic geode_rng rng_core led_class ext4 mbcache jbd2 crc16 dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sd_mod crc_t10dif ide_pci_generic cs5536 amd74xx ide_core pata_cs5536 ata_generic libata usb_storage via_rhine mii scsi_mod btrfs zlib_deflate crc32c libcrc32c [last unloaded: scsi_wait_scan]

    Pid: 12875, comm: sudo Not tainted 2.6.36-net5501 #1 /
    EIP: 0060:[] EFLAGS: 00010292 CPU: 0
    EIP is at rpcauth_refreshcred+0x11/0x12c [sunrpc]
    EAX: 00000000 EBX: defb13a0 ECX: 00000006 EDX: e18683b8
    ESI: defb13a0 EDI: 00000000 EBP: 00000000 ESP: de571d58
    DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
    Process sudo (pid: 12875, ti=de570000 task=decd1430 task.ti=de570000)
    Stack:
    e186e008 00000000 defb13a0 0000000d deda6000 e1868f22 e196f12b defb13a0
    defb13d8 00000000 00000000 e186e0aa 00000000 defb13a0 de571dac 00000000
    e186956c de571e34 debea5c0 de571dc8 e186967a 00000000 debea5c0 de571e34
    Call Trace:
    [] ? rpc_wake_up_next+0x114/0x11b [sunrpc]
    [] ? call_decode+0x24a/0x5af [sunrpc]
    [] ? nfs4_xdr_dec_access+0x0/0xa2 [nfs]
    [] ? __rpc_execute+0x62/0x17b [sunrpc]
    [] ? rpc_run_task+0x91/0x97 [sunrpc]
    [] ? rpc_call_sync+0x40/0x5b [sunrpc]
    [] ? nfs4_proc_access+0x10a/0x176 [nfs]
    [] ? nfs_do_access+0x2b1/0x2c0 [nfs]
    [] ? rpcauth_lookupcred+0x62/0x84 [sunrpc]
    [] ? nfs_permission+0xad/0x13b [nfs]
    [] ? exec_permission+0x15/0x4b
    [] ? link_path_walk+0x4f/0x456
    [] ? path_walk+0x4c/0xa8
    [] ? do_path_lookup+0x1f/0x68
    [] ? user_path_at+0x37/0x5f
    [] ? handle_mm_fault+0x229/0x55b
    [] ? sys_faccessat+0x93/0x146
    [] ? sys_access+0xf/0x13
    [] ? syscall_call+0x7/0xb
    Code: 0f 94 c2 84 d2 74 09 8b 44 24 0c e8 6a e9 8b de 83 c4 14 89 d8 5b 5e 5f 5d c3 55 57 56 53 83 ec 1c fc 89 c6 8b 40 10 89 44 24 04 58 58 85 db 0f 85 d4 00 00 00 0f b7 46 70 8b 56 20 89 c5 83
    EIP: [] rpcauth_refreshcred+0x11/0x12c [sunrpc] SS:ESP 0068:de571d58
    CR2: 0000000000000058

    This appears to be caused by the function rpc_verify_header() first
    calling xprt_release(), then doing a call_refresh. If we release the
    transport slot, we should _always_ jump back to call_reserve before
    calling anything else.

    Signed-off-by: Trond Myklebust
    Cc: stable@kernel.org

    Trond Myklebust
     

02 Oct, 2010

1 commit


13 Sep, 2010

3 commits

  • This is just a minor cleanup: net/sunrpc/clnt.c clarifies the rpc client
    state machine by commenting each state and by laying out the functions
    implementing each state in the order that each state is normally
    executed (in the absence of errors).

    The previous patch "Fix null dereference in call_allocate" changed the
    order of the states. Move the functions and update the comments to
    reflect the change.

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

    J. Bruce Fields
     
  • 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
     
  • In call_allocate we need to reach the auth in order to factor au_cslack
    into the allocation.

    As of a17c2153d2e271b0cbacae9bed83b0eaa41db7e1 "SUNRPC: Move the bound
    cred to struct rpc_rqst", call_allocate attempts to do this by
    dereferencing tk_client->cl_auth, however this is not guaranteed to be
    defined--cl_auth can be zero in the case of gss context destruction (see
    rpc_free_auth).

    Reorder the client state machine to bind credentials before allocating,
    so that we can instead reach the auth through the cred.

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

    J. Bruce Fields
     

04 Aug, 2010

4 commits


21 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
    qlcnic: adding co maintainer
    ixgbe: add support for active DA cables
    ixgbe: dcb, do not tag tc_prio_control frames
    ixgbe: fix ixgbe_tx_is_paused logic
    ixgbe: always enable vlan strip/insert when DCB is enabled
    ixgbe: remove some redundant code in setting FCoE FIP filter
    ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
    ixgbe: fix header len when unsplit packet overflows to data buffer
    ipv6: Never schedule DAD timer on dead address
    ipv6: Use POSTDAD state
    ipv6: Use state_lock to protect ifa state
    ipv6: Replace inet6_ifaddr->dead with state
    cxgb4: notify upper drivers if the device is already up when they load
    cxgb4: keep interrupts available when the ports are brought down
    cxgb4: fix initial addition of MAC address
    cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
    cnic: Convert cnic_local_flags to atomic ops.
    can: Fix SJA1000 command register writes on SMP systems
    bridge: fix build for CONFIG_SYSFS disabled
    ARCNET: Limit com20020 PCI ID matches for SOHARD cards
    ...

    Fix up various conflicts with pcmcia tree drivers/net/
    {pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
    wireless/orinoco/spectrum_cs.c} and feature removal
    (Documentation/feature-removal-schedule.txt).

    Also fix a non-content conflict due to pm_qos_requirement getting
    renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c

    Linus Torvalds
     

18 May, 2010

1 commit

  • This patch removes from net/ (but not any netfilter files)
    all the unnecessary return; statements that precede the
    last closing brace of void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

15 May, 2010

1 commit


22 Mar, 2010

1 commit


04 Dec, 2009

4 commits

  • Introduce soft connect behavior for UDP transports. In this case, a
    major timeout returns ETIMEDOUT instead of EIO.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Currently, if a remote RPC service is unreachable, an RPC ping will
    hang until the underlying transport connect attempt times out. A more
    desirable behavior might be to have the ping fail immediately so upper
    layers can recover appropriately.

    In the case of an NFS mount, for instance, this would mean the
    mount(2) system call could fail immediately if the server isn't
    listening, rather than hanging uninterruptibly for more than 3
    minutes.

    Change rpc_ping() so that it fails immediately for connection-oriented
    transports. rpc_create() will then fail immediately for such
    transports if an RPC ping was requested.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Autobinding is handled by the rpciod process, not in user processes
    that are generating regular RPC requests. Thus autobinding is usually
    not affected by signals targetting user processes, such as KILL or
    timer expiration events.

    In addition, an RPC request generated by a user process that has
    RPC_TASK_SOFTCONN set and needs to perform an autobind will hang if
    the remote rpcbind service is not available.

    For rpcbind queries on connection-oriented transports, let's use the
    new soft connect semantic to return control to the user's process
    quickly, if the kernel's rpcbind client can't connect to the remote
    rpcbind service.

    Logic is introduced in call_bind_status() to handle connection errors
    that occurred during an asynchronous rpcbind query. The logic
    abandons the rpcbind query if the RPC request has SOFTCONN set, and
    retries after a few seconds in the normal case.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • The kernel sometimes makes RPC calls to services that aren't running.
    Because the kernel's RPC client always assumes the hard retry semantic
    when reconnecting a connection-oriented RPC transport, the underlying
    reconnect logic takes a long while to time out, even though the remote
    may have responded immediately with ECONNREFUSED.

    In certain cases, like upcalls to our local rpcbind daemon, or for NFS
    mount requests, we'd like the kernel to fail immediately if the remote
    service isn't reachable. This allows another transport to be tried
    immediately, or the pending request can be abandoned quickly.

    Introduce a per-request flag which controls how call_transmit_status()
    behaves when request transmission fails because the server cannot be
    reached.

    We don't want soft connection semantics to apply to other errors. The
    default case of the switch statement in call_transmit_status() no
    longer falls through; the fall through code is copied to the default
    case, and a "break;" is added.

    The transport's connection re-establishment timeout is also ignored for
    such requests. We want the request to fail immediately, so the
    reconnect delay is skipped. Additionally, we don't want a connect
    failure here to further increase the reconnect timeout value, since
    this request will not be retried.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever