16 Oct, 2016

2 commits

  • Pull befs fixes from Luis de Bethencourt:
    "I recently took maintainership of the befs file system [0]. This is
    the first time I send you a git pull request, so please let me know if
    all the below is OK.

    Salah Triki and myself have been cleaning the code and fixing a few
    small bugs.

    Sorry I couldn't send this sooner in the merge window, I was waiting
    to have my GPG key signed by kernel members at ELCE in Berlin a few
    days ago."

    [0] https://lkml.org/lkml/2016/7/27/502

    * tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs: (39 commits)
    befs: befs: fix style issues in datastream.c
    befs: improve documentation in datastream.c
    befs: fix typos in datastream.c
    befs: fix typos in btree.c
    befs: fix style issues in super.c
    befs: fix comment style
    befs: add check for ag_shift in superblock
    befs: dump inode_size superblock information
    befs: remove unnecessary initialization
    befs: fix typo in befs_sb_info
    befs: add flags field to validate superblock state
    befs: fix typo in befs_find_key
    befs: remove unused BEFS_BT_PARMATCH
    fs: befs: remove ret variable
    fs: befs: remove in vain variable assignment
    fs: befs: remove unnecessary *befs_sb variable
    fs: befs: remove useless initialization to zero
    fs: befs: remove in vain variable assignment
    fs: befs: Insert NULL inode to dentry
    fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect
    ...

    Linus Torvalds
     
  • Pull gcc plugins update from Kees Cook:
    "This adds a new gcc plugin named "latent_entropy". It is designed to
    extract as much possible uncertainty from a running system at boot
    time as possible, hoping to capitalize on any possible variation in
    CPU operation (due to runtime data differences, hardware differences,
    SMP ordering, thermal timing variation, cache behavior, etc).

    At the very least, this plugin is a much more comprehensive example
    for how to manipulate kernel code using the gcc plugin internals"

    * tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    latent_entropy: Mark functions with __latent_entropy
    gcc-plugins: Add latent_entropy plugin

    Linus Torvalds
     

15 Oct, 2016

11 commits

  • Pull more misc uaccess and vfs updates from Al Viro:
    "The rest of the stuff from -next (more uaccess work) + assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    score: traps: Add missing include file to fix build error
    fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths
    fs/super.c: fix race between freeze_super() and thaw_super()
    overlayfs: Fix setting IOP_XATTR flag
    iov_iter: kernel-doc import_iovec() and rw_copy_check_uvector()
    blackfin: no access_ok() for __copy_{to,from}_user()
    arm64: don't zero in __copy_from_user{,_inatomic}
    arm: don't zero in __copy_from_user_inatomic()/__copy_from_user()
    arc: don't leak bits of kernel stack into coredump
    alpha: get rid of tail-zeroing in __copy_user()

    Linus Torvalds
     
  • Pull cifs fixes from Steve French:
    "Including:

    - nine bug fixes for stable. Some of these we found at the recent two
    weeks of SMB3 test events/plugfests.

    - significant improvements in reconnection (e.g. if server or network
    crashes) especially when mounted with "persistenthandles" or to
    server which advertises Continuous Availability on the share.

    - a new mount option "idsfromsid" which improves POSIX compatibility
    in some cases (when winbind not configured e.g.) by better (and
    faster) fetching uid/gid from acl (when "cifsacl" mount option is
    enabled). NB: we are almost complete work on "cifsacl" (querying
    mode/uid/gid from ACL) for SMB3, but SMB3 support for cifsacl is
    not included in this set.

    - improved handling for SMB3 "credits" (even if server is buggy)

    Still working on two sets of changes:

    - cifsacl enablement for SMB3

    - cleanup of RFC1001 length calculation (so we can handle encryption
    and multichannel and RDMA)

    And a couple of new bugs were reported recently (unrelated to above)
    so will probably have another merge request next week"

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: (21 commits)
    CIFS: Retrieve uid and gid from special sid if enabled
    CIFS: Add new mount option to set owner uid and gid from special sids in acl
    CIFS: Reset read oplock to NONE if we have mandatory locks after reopen
    CIFS: Fix persistent handles re-opening on reconnect
    SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup
    SMB2: Separate Kerberos authentication from SMB2_sess_setup
    Expose cifs module parameters in sysfs
    Cleanup missing frees on some ioctls
    Enable previous version support
    Do not send SMB3 SET_INFO request if nothing is changing
    SMB3: Add mount parameter to allow user to override max credits
    fs/cifs: reopen persistent handles on reconnect
    Clarify locking of cifs file and tcon structures and make more granular
    Fix regression which breaks DFS mounting
    fs/cifs: keep guid when assigning fid to fileinfo
    SMB3: GUIDs should be constructed as random but valid uuids
    Set previous session id correctly on SMB3 reconnect
    cifs: Limit the overall credit acquired
    Display number of credits available
    Add way to query creation time of file via cifs xattr
    ...

    Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "Some fixes from Omar and Dave Sterba for our new free space tree.

    This isn't heavily used yet, but as we move toward making it the new
    default we wanted to nail down an endian bug"

    * 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    btrfs: tests: uninline member definitions in free_space_extent
    btrfs: tests: constify free space extent specs
    Btrfs: expand free space tree sanity tests to catch endianness bug
    Btrfs: fix extent buffer bitmap tests on big-endian systems
    Btrfs: catch invalid free space trees
    Btrfs: fix mount -o clear_cache,space_cache=v2
    Btrfs: fix free space tree bitmaps on big-endian systems

    Linus Torvalds
     
  • sb_wait_write()->percpu_rwsem_release() fools lockdep to avoid the
    false-positives. Now that xfs was fixed by Dave's commit dbad7c993053
    ("xfs: stop holding ILOCK over filldir callbacks") we can remove it and
    change freeze_super() and thaw_super() to run with s_writers.rw_sem locks
    held; we add two trivial helpers for that, lockdep_sb_freeze_release()
    and lockdep_sb_freeze_acquire().

    xfstests-dev/check `grep -il freeze tests/*/???` does not trigger any
    warning from lockdep.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • Pull overlayfs updates from Miklos Szeredi:
    "This update contains fixes to the "use mounter's permission to access
    underlying layers" area, and miscellaneous other fixes and cleanups.

    No new features this time"

    * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
    ovl: use vfs_get_link()
    vfs: add vfs_get_link() helper
    ovl: use generic_readlink
    ovl: explain error values when removing acl from workdir
    ovl: Fix info leak in ovl_lookup_temp()
    ovl: during copy up, switch to mounter's creds early
    ovl: lookup: do getxattr with mounter's permission
    ovl: copy_up_xattr(): use strnlen

    Linus Torvalds
     
  • Change thaw_super() to check frozen != SB_FREEZE_COMPLETE rather than
    frozen == SB_UNFROZEN, otherwise it can race with freeze_super() which
    drops sb->s_umount after SB_FREEZE_WRITE to preserve the lock ordering.

    In this case thaw_super() will wrongly call s_op->unfreeze_fs() before
    it was actually frozen, and call sb_freeze_unlock() which leads to the
    unbalanced percpu_up_write(). Unfortunately lockdep can't detect this,
    so this triggers misc BUG_ON()'s in kernel/rcu/sync.c.

    Reported-and-tested-by: Nikolay Borisov
    Signed-off-by: Oleg Nesterov
    Cc: stable@vger.kernel.org
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • ovl_fill_super calls ovl_new_inode to create a root inode for the new
    superblock before initializing sb->s_xattr. This wrongly causes
    IOP_XATTR to be cleared in i_opflags of the new inode, causing SELinux
    to log the following message:

    SELinux: (dev overlay, type overlay) has no xattr support

    Fix this by initializing sb->s_xattr and similar fields before calling
    ovl_new_inode.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Al Viro

    Vivek Goyal
     
  • Both import_iovec() and rw_copy_check_uvector() take an array
    (typically small and on-stack) which is used to hold an iovec array copy
    from userspace. This is to avoid an expensive memory allocation in the
    fast path (i.e. few iovec elements).

    The caller may have to check whether these functions actually used
    the provided buffer or allocated a new one -- but this differs between
    the too. Let's just add a kernel doc to clarify what the semantics are
    for each function.

    Signed-off-by: Vegard Nossum
    Signed-off-by: Al Viro

    Vegard Nossum
     
  • New mount option "idsfromsid" indicates to cifs.ko that
    it should try to retrieve the uid and gid owner fields
    from special sids. This patch adds the code to parse the owner
    sids in the ACL to see if they match, and if so populate the
    uid and/or gid from them. This is faster than upcalling for
    them and asking winbind, and is a fairly common case, and is
    also helpful when cifs.upcall and idmapping is not configured.

    Signed-off-by: Steve French
    Reviewed-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Reviewed-by: Pavel Shilovsky

    Steve French
     
  • Add "idsfromsid" mount option to indicate to cifs.ko that it should
    try to retrieve the uid and gid owner fields from special sids in the
    ACL if present. This first patch just adds the parsing for the mount
    option.

    Signed-off-by: Steve French
    Reviewed-by: Shirish Pargaonkar
    Reviewed-by: Pavel Shilovsky

    Steve French
     
  • Pull cgroup updates from Tejun Heo:

    - tracepoints for basic cgroup management operations added

    - kernfs and cgroup path formatting functions updated to behave in the
    style of strlcpy()

    - non-critical bug fixes

    * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    blkcg: Unlock blkcg_pol_mutex only once when cpd == NULL
    cgroup: fix error handling regressions in proc_cgroup_show() and cgroup_release_agent()
    cpuset: fix error handling regression in proc_cpuset_show()
    cgroup: add tracepoints for basic operations
    cgroup: make cgroup_path() and friends behave in the style of strlcpy()
    kernfs: remove kernfs_path_len()
    kernfs: make kernfs_path*() behave in the style of strlcpy()
    kernfs: add dummy implementation of kernfs_path_from_node()

    Linus Torvalds
     

14 Oct, 2016

16 commits

  • Resulting in a complete removal of a function basically implementing the
    inverse of vfs_readlink().

    As a bonus, now the proper security hook is also called.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • This helper is for filesystems that want to read the symlink and are better
    off with the get_link() interface (returning a char *) rather than the
    readlink() interface (copy into a userspace buffer).

    Also call the LSM hook for readlink (not get_link) since this is for
    symlink reading not following.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • All filesystems that are backers for overlayfs would also use
    generic_readlink(). Move this logic to the overlay itself, which is a nice
    cleanup.

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • Suggested-by: Linus Torvalds
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • Pull NFS client updates from Anna Schumaker:
    "Highlights include:

    Stable bugfixes:
    - sunrpc: fix writ espace race causing stalls
    - NFS: Fix inode corruption in nfs_prime_dcache()
    - NFSv4: Don't report revoked delegations as valid in nfs_have_delegation()
    - NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid
    - NFSv4: Open state recovery must account for file permission changes
    - NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic

    Features:
    - Add support for tracking multiple layout types with an ordered list
    - Add support for using multiple backchannel threads on the client
    - Add support for pNFS file layout session trunking
    - Delay xprtrdma use of DMA API (for device driver removal)
    - Add support for xprtrdma remote invalidation
    - Add support for larger xprtrdma inline thresholds
    - Use a scatter/gather list for sending xprtrdma RPC calls
    - Add support for the CB_NOTIFY_LOCK callback
    - Improve hashing sunrpc auth_creds by using both uid and gid

    Bugfixes:
    - Fix xprtrdma use of DMA API
    - Validate filenames before adding to the dcache
    - Fix corruption of xdr->nwords in xdr_copy_to_scratch
    - Fix setting buffer length in xdr_set_next_buffer()
    - Don't deadlock the state manager on the SEQUENCE status flags
    - Various delegation and stateid related fixes
    - Retry operations if an interrupted slot receives EREMOTEIO
    - Make nfs boot time y2038 safe"

    * tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (100 commits)
    NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
    fs: nfs: Make nfs boot time y2038 safe
    sunrpc: replace generic auth_cred hash with auth-specific function
    sunrpc: add RPCSEC_GSS hash_cred() function
    sunrpc: add auth_unix hash_cred() function
    sunrpc: add generic_auth hash_cred() function
    sunrpc: add hash_cred() function to rpc_authops struct
    Retry operation on EREMOTEIO on an interrupted slot
    pNFS: Fix atime updates on pNFS clients
    sunrpc: queue work on system_power_efficient_wq
    NFSv4.1: Even if the stateid is OK, we may need to recover the open modes
    NFSv4: If recovery failed for a specific open stateid, then don't retry
    NFSv4: Fix retry issues with nfs41_test/free_stateid
    NFSv4: Open state recovery must account for file permission changes
    NFSv4: Mark the lock and open stateids as invalid after freeing them
    NFSv4: Don't test open_stateid unless it is set
    NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid
    NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation
    NFSv4: Fix a race when updating an open_stateid
    NFSv4: Fix a race in nfs_inode_reclaim_delegation()
    ...

    Linus Torvalds
     
  • Pull nfsd updates from Bruce Fields:
    "Some RDMA work and some good bugfixes, and two new features that could
    benefit from user testing:

    - Anna Schumacker contributed a simple NFSv4.2 COPY implementation.
    COPY is already supported on the client side, so a call to
    copy_file_range() on a recent client should now result in a
    server-side copy that doesn't require all the data to make a round
    trip to the client and back.

    - Jeff Layton implemented callbacks to notify clients when contended
    locks become available, which should reduce latency on workloads
    with contended locks"

    * tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux:
    NFSD: Implement the COPY call
    nfsd: handle EUCLEAN
    nfsd: only WARN once on unmapped errors
    exportfs: be careful to only return expected errors.
    nfsd4: setclientid_confirm with unmatched verifier should fail
    nfsd: randomize SETCLIENTID reply to help distinguish servers
    nfsd: set the MAY_NOTIFY_LOCK flag in OPEN replies
    nfs: add a new NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK constant
    nfsd: add a LRU list for blocked locks
    nfsd: have nfsd4_lock use blocking locks for v4.1+ locks
    nfsd: plumb in a CB_NOTIFY_LOCK operation
    NFSD: fix corruption in notifier registration
    svcrdma: support Remote Invalidation
    svcrdma: Server-side support for rpcrdma_connect_private
    rpcrdma: RDMA/CM private message data structure
    svcrdma: Skip put_page() when send_reply() fails
    svcrdma: Tail iovec leaves an orphaned DMA mapping
    nfsd: fix dprintk in nfsd4_encode_getdeviceinfo
    nfsd: eliminate cb_minorversion field
    nfsd: don't set a FL_LAYOUT lease for flexfiles layouts

    Linus Torvalds
     
  • …kernel/git/dgc/linux-xfs

    < XFS has gained super CoW powers! >
    ----------------------------------
    \ ^__^
    \ (oo)\_______
    (__)\ )\/\
    ||----w |
    || ||

    Pull XFS support for shared data extents from Dave Chinner:
    "This is the second part of the XFS updates for this merge cycle. This
    pullreq contains the new shared data extents feature for XFS.

    Given the complexity and size of this change I am expecting - like the
    addition of reverse mapping last cycle - that there will be some
    follow-up bug fixes and cleanups around the -rc3 stage for issues that
    I'm sure will show up once the code hits a wider userbase.

    What it is:

    At the most basic level we are simply adding shared data extents to
    XFS - i.e. a single extent on disk can now have multiple owners. To do
    this we have to add new on-disk features to both track the shared
    extents and the number of times they've been shared. This is done by
    the new "refcount" btree that sits in every allocation group. When we
    share or unshare an extent, this tree gets updated.

    Along with this new tree, the reverse mapping tree needs to be updated
    to track each owner or a shared extent. This also needs to be updated
    ever share/unshare operation. These interactions at extent allocation
    and freeing time have complex ordering and recovery constraints, so
    there's a significant amount of new intent-based transaction code to
    ensure that operations are performed atomically from both the runtime
    and integrity/crash recovery perspectives.

    We also need to break sharing when writes hit a shared extent - this
    is where the new copy-on-write implementation comes in. We allocate
    new storage and copy the original data along with the overwrite data
    into the new location. We only do this for data as we don't share
    metadata at all - each inode has it's own metadata that tracks the
    shared data extents, the extents undergoing CoW and it's own private
    extents.

    Of course, being XFS, nothing is simple - we use delayed allocation
    for CoW similar to how we use it for normal writes. ENOSPC is a
    significant issue here - we build on the reservation code added in
    4.8-rc1 with the reverse mapping feature to ensure we don't get
    spurious ENOSPC issues part way through a CoW operation. These
    mechanisms also help minimise fragmentation due to repeated CoW
    operations. To further reduce fragmentation overhead, we've also
    introduced a CoW extent size hint, which indicates how large a region
    we should allocate when we execute a CoW operation.

    With all this functionality in place, we can hook up .copy_file_range,
    .clone_file_range and .dedupe_file_range and we gain all the
    capabilities of reflink and other vfs provided functionality that
    enable manipulation to shared extents. We also added a fallocate mode
    that explicitly unshares a range of a file, which we implemented as an
    explicit CoW of all the shared extents in a file.

    As such, it's a huge chunk of new functionality with new on-disk
    format features and internal infrastructure. It warns at mount time as
    an experimental feature and that it may eat data (as we do with all
    new on-disk features until they stabilise). We have not released
    userspace suport for it yet - userspace support currently requires
    download from Darrick's xfsprogs repo and build from source, so the
    access to this feature is really developer/tester only at this point.
    Initial userspace support will be released at the same time the kernel
    with this code in it is released.

    The new code causes 5-6 new failures with xfstests - these aren't
    serious functional failures but things the output of tests changing
    slightly due to perturbations in layouts, space usage, etc. OTOH,
    we've added 150+ new tests to xfstests that specifically exercise this
    new functionality so it's got far better test coverage than any
    functionality we've previously added to XFS.

    Darrick has done a pretty amazing job getting us to this stage, and
    special mention also needs to go to Christoph (review, testing,
    improvements and bug fixes) and Brian (caught several intricate bugs
    during review) for the effort they've also put in.

    Summary:

    - unshare range (FALLOC_FL_UNSHARE) support for fallocate

    - copy-on-write extent size hints (FS_XFLAG_COWEXTSIZE) for fsxattr
    interface

    - shared extent support for XFS

    - copy-on-write support for shared extents

    - copy_file_range support

    - clone_file_range support (implements reflink)

    - dedupe_file_range support

    - defrag support for reverse mapping enabled filesystems"

    * tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (71 commits)
    xfs: convert COW blocks to real blocks before unwritten extent conversion
    xfs: rework refcount cow recovery error handling
    xfs: clear reflink flag if setting realtime flag
    xfs: fix error initialization
    xfs: fix label inaccuracies
    xfs: remove isize check from unshare operation
    xfs: reduce stack usage of _reflink_clear_inode_flag
    xfs: check inode reflink flag before calling reflink functions
    xfs: implement swapext for rmap filesystems
    xfs: refactor swapext code
    xfs: various swapext cleanups
    xfs: recognize the reflink feature bit
    xfs: simulate per-AG reservations being critically low
    xfs: don't mix reflink and DAX mode for now
    xfs: check for invalid inode reflink flags
    xfs: set a default CoW extent size of 32 blocks
    xfs: convert unwritten status of reverse mappings for shared files
    xfs: use interval query for rmap alloc operations on shared files
    xfs: add shared rmap map/unmap/convert log item types
    xfs: increase log reservations for reflink
    ...

    Linus Torvalds
     
  • We are already doing the same thing for an ordinary open case:
    we can't keep read oplock on a file if we have mandatory byte-range
    locks because pagereading can conflict with these locks on a server.
    Fix it by setting oplock level to NONE.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • openFileList of tcon can be changed while cifs_reopen_file() is called
    that can lead to an unexpected behavior when we return to the loop.
    Fix this by introducing a temp list for keeping all file handles that
    need to be reopen.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • We split the rawntlmssp authentication into negotiate and
    authencate parts. We also clean up the code and add helpers.

    Signed-off-by: Sachin Prabhu
    Signed-off-by: Steve French
    Reviewed-by: Pavel Shilovsky

    Sachin Prabhu
     
  • Add helper functions and split Kerberos authentication off
    SMB2_sess_setup.

    Signed-off-by: Sachin Prabhu
    Signed-off-by: Steve French
    Reviewed-by: Pavel Shilovsky

    Sachin Prabhu
     
  • /sys/module/cifs/parameters should display the three
    other module load time configuration settings for cifs.ko

    Signed-off-by: Germano Percossi
    Signed-off-by: Steve French

    Germano Percossi
     
  • Cleanup some missing mem frees on some cifs ioctls, and
    clarify others to make more obvious that no data is returned.

    CC: Stable
    Signed-off-by: Steve French
    Acked-by: Sachin Prabhu

    Steve French
     
  • Add ioctl to query previous versions of file

    Allows listing snapshots on files on SMB3 mounts.

    Signed-off-by: Steve French

    Steve French
     
  • [CIFS] We had cases where we sent a SMB2/SMB3 setinfo request with all
    timestamp (and DOS attribute) fields marked as 0 (ie do not change)
    e.g. on chmod or chown.

    Signed-off-by: Steve French
    CC: Stable

    Steve French
     
  • Pull watchdog updates from Wim Van Sebroeck:

    - a new watchdog pretimeout governor framework

    - support to upload the firmware on the ziirave_wdt

    - several fixes and cleanups

    * git://www.linux-watchdog.org/linux-watchdog: (26 commits)
    watchdog: imx2_wdt: add pretimeout function support
    watchdog: softdog: implement pretimeout support
    watchdog: pretimeout: add pretimeout_available_governors attribute
    watchdog: pretimeout: add option to select a pretimeout governor in runtime
    watchdog: pretimeout: add panic pretimeout governor
    watchdog: pretimeout: add noop pretimeout governor
    watchdog: add watchdog pretimeout governor framework
    watchdog: hpwdt: add support for iLO5
    fs: compat_ioctl: add pretimeout functions for watchdogs
    watchdog: add pretimeout support to the core
    watchdog: imx2_wdt: use preferred BIT macro instead of open coded values
    watchdog: st_wdt: Remove support for obsolete platforms
    watchdog: bindings: Remove obsolete platforms from dt doc.
    watchdog: mt7621_wdt: Remove assignment of dev pointer
    watchdog: rt2880_wdt: Remove assignment of dev pointer
    watchdog: constify watchdog_ops structures
    watchdog: tegra: constify watchdog_ops structures
    watchdog: iTCO_wdt: constify iTCO_wdt_pm structure
    watchdog: cadence_wdt: Fix the suspend resume
    watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
    ...

    Linus Torvalds
     

13 Oct, 2016

11 commits

  • …linux into for-linus-4.9

    Signed-off-by: Chris Mason <clm@fb.com>

    Chris Mason
     
  • Add mount option "max_credits" to allow setting maximum SMB3
    credits to any value from 10 to 64000 (default is 32000).
    This can be useful to workaround servers with problems allocating
    credits, or to throttle the client to use smaller amount of
    simultaneous i/o or to workaround server performance issues.

    Also adds a cap, so that even if the server granted us more than
    65000 credits due to a server bug, we would not use that many.

    Signed-off-by: Steve French

    Steve French
     
  • Continuous Availability features like persistent handles
    require that clients reconnect their open files, not
    just the sessions, soon after the network connection comes
    back up, otherwise the server will throw away the state
    (byte range locks, leases, deny modes) on those handles
    after a timeout.

    Add code to reconnect handles when use_persistent set
    (e.g. Continuous Availability shares) after tree reconnect.

    Signed-off-by: Aurelien Aptel
    Reviewed-by: Germano Percossi
    Signed-off-by: Steve French

    Steve French
     
  • Remove the global file_list_lock to simplify cifs/smb3 locking and
    have spinlocks that more closely match the information they are
    protecting.

    Add new tcon->open_file_lock and file->file_info_lock spinlocks.
    Locks continue to follow a heirachy,
    cifs_socket --> cifs_ses --> cifs_tcon --> cifs_file
    where global tcp_ses_lock still protects socket and cifs_ses, while the
    the newer locks protect the lower level structure's information
    (tcon and cifs_file respectively).

    CC: Stable
    Signed-off-by: Steve French
    Signed-off-by: Pavel Shilovsky
    Reviewed-by: Aurelien Aptel
    Reviewed-by: Germano Percossi

    Steve French
     
  • Patch a6b5058 results in -EREMOTE returned by is_path_accessible() in
    cifs_mount() to be ignored which breaks DFS mounting.

    Signed-off-by: Sachin Prabhu
    Reviewed-by: Aurelien Aptel
    CC: Stable
    Signed-off-by: Steve French

    Sachin Prabhu
     
  • When we open a durable handle we give a Globally Unique
    Identifier (GUID) to the server which we must keep for later reference
    e.g. when reopening persistent handles on reconnection.

    Without this the GUID generated for a new persistent handle was lost and
    16 zero bytes were used instead on re-opening.

    Signed-off-by: Aurelien Aptel
    CC: Stable
    Signed-off-by: Steve French

    Aurelien Aptel
     
  • GUIDs although random, and 16 bytes, need to be generated as
    proper uuids.

    Signed-off-by: Steve French
    Reviewed-by: Aurelien Aptel
    Reported-by: David Goebels
    CC: Stable

    Steve French
     
  • Signed-off-by: Steve French
    CC: Stable
    Reported-by: David Goebel

    Steve French
     
  • The kernel client requests 2 credits for many operations even though
    they only use 1 credit (presumably to build up a buffer of credit).
    Some servers seem to give the client as much credit as is requested. In
    this case, the amount of credit the client has continues increasing to
    the point where (server->credits * MAX_BUFFER_SIZE) overflows in
    smb2_wait_mtu_credits().

    Fix this by throttling the credit requests if an set limit is reached.
    For async requests where the credit charge may be > 1, request as much
    credit as what is charged.
    The limit is chosen somewhat arbitrarily. The Windows client
    defaults to 128 credits, the Windows server allows clients up to
    512 credits (or 8192 for Windows 2016), and the NetApp server
    (and at least one other) does not limit clients at all.
    Choose a high enough value such that the client shouldn't limit
    performance.

    This behavior was seen with a NetApp filer (NetApp Release 9.0RC2).

    Signed-off-by: Ross Lagerwall
    CC: Stable
    Signed-off-by: Steve French

    Ross Lagerwall
     
  • In debugging smb3, it is useful to display the number
    of credits available, so we can see when the server has not granted
    sufficient operations for the client to make progress, or alternatively
    the client has requested too many credits (as we saw in a recent bug)
    so we can compare with the number of credits the server thinks
    we have.

    Add a /proc/fs/cifs/DebugData line to display the client view
    on how many credits are available.

    Signed-off-by: Steve French
    Reported-by: Germano Percossi
    CC: Stable

    Steve French
     
  • Add parsing for new pseudo-xattr user.cifs.creationtime file
    attribute to allow backup and test applications to view
    birth time of file on cifs/smb3 mounts.

    Signed-off-by: Steve French

    Steve French