1. 14 Oct, 2016 12 commits
    • Linus Torvalds's avatar
      Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · b6daa51b
      Linus Torvalds authored
      Pull percpu updates from Tejun Heo:
      
       - Nick improved generic implementations of percpu operations which
         modify the variable and return so that they calculate the physical
         address only once.
      
       - percpu_ref percpu <-> atomic mode switching improvements. The
         patchset was originally posted about a year ago but fell through the
         crack.
      
       - misc non-critical fixes.
      
      * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
        mm/percpu.c: fix potential memory leakage for pcpu_embed_first_chunk()
        mm/percpu.c: correct max_distance calculation for pcpu_embed_first_chunk()
        percpu: eliminate two sparse warnings
        percpu: improve generic percpu modify-return implementation
        percpu-refcount: init ->confirm_switch member properly
        percpu_ref: allow operation mode switching operations to be called concurrently
        percpu_ref: restructure operation mode switching
        percpu_ref: unify staggered atomic switching wait behavior
        percpu_ref: reorganize __percpu_ref_switch_to_atomic() and relocate percpu_ref_switch_to_atomic()
        percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation
      b6daa51b
    • Linus Torvalds's avatar
      Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · f96ed261
      Linus Torvalds authored
      Pull libata updates from Tejun Heo:
       - Write same support added
       - Minor ahci MSIX irq handling updates
       - Non-critical SCSI command translation fixes
       - Controller specific changes
      
      * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ahci: qoriq: Revert "ahci: qoriq: Disable NCQ on ls2080a SoC"
        libata: remove <asm-generic/libata-portmap.h>
        libata: remove unused definitions from <asm/libata-portmap.h>
        pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
        ata: Replace BUG() with BUG_ON().
        ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc.
        libata: Some drives failing on SCT Write Same
        ahci: use pci_alloc_irq_vectors
        libata: SCT Write Same handle ATA_DFLAG_PIO
        libata: SCT Write Same / DSM Trim
        libata: Add support for SCT Write Same
        libata: Safely overwrite attached page in WRITE SAME xlat
        ahci: also use a per-port lock for the multi-MSIX case
        ARM: dts: STiH407-family: Add ports-implemented property in sata nodes
        ahci: st: Add ports-implemented property in support
        ahci: qoriq: enable snoopable sata read and write
        ahci: qoriq: adjust sata parameter
        libata-scsi: fix MODE SELECT translation for Control mode page
        libata-scsi: use u8 array to store mode page copy
      f96ed261
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · b56061b0
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is just a set of minor updates and fixes which weren't quite
        ready in time for the first pull request.
      
        The only real thing of note is Mike Christie is stepping down as
        Maintainer of iscsi to be replaced by Lee Duncan and Chris Leech"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: Kconfig fix
        scsi: g_NCR5380: Stop using scsi_module.c
        scsi: g_NCR5380: Reduce overrides[] from array to struct
        scsi: g_NCR5380: Remove deprecated __setup
        scsi: ufs: Fix error return code in ufshcd_init()
        scsi: ufs: Data Segment only needed for WRITE DESCRIPTOR
        scsi: cxgb4i: Set completion bit in work request
        MAINTAINERS: Update open-iscsi maintainers
        scsi: ufs: Enable no vccq quirk for skhynix device
        scsi: be2iscsi: mark symbols static where possible
      b56061b0
    • Dave Jones's avatar
      pkeys: Remove easily triggered WARN · 49606342
      Dave Jones authored
      This easy-to-trigger warning shows up instantly when running
      Trinity on a kernel with CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS disabled.
      
      At most this should have been a printk, but the -EINVAL alone should be more
      than adequate indicator that something isn't available.
      Signed-off-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      49606342
    • Linus Torvalds's avatar
      Merge tag 'metag-for-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag · e9f8f48b
      Linus Torvalds authored
      Pull metag architecture fix from James Hogan:
       "A simple build fix for irqsoff atomics which has started hitting
        meta1_defconfig during the 4.9 merge window"
      
      * tag 'metag-for-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
        metag: Only define atomic_dec_if_positive conditionally
      e9f8f48b
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · d8bfb96a
      Linus Torvalds authored
      Pull more powerpc updates from Michael Ellerman:
       "Some more powerpc updates for 4.9:
      
        Freescale updates from Scott Wood:
         - qbman support (a prerequisite for datapath drivers such as ethernet)
         - a PCI DMA fix+improvement
         - reset handler changes
         - more 8xx optimizations
         - some cleanups and fixes.'
      
        Fixes:
         - selftests/powerpc: Add missing binaries to .gitignores (Michael Ellerman)
         - selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes (Michael Ellerman)
         - powerpc/pseries: Fix stack corruption in htpe code (Laurent Dufour)
         - powerpc/64s: Fix power4_fixup_nap placement (Nicholas Piggin)
         - powerpc/64: Fix incorrect return value from __copy_tofrom_user (Paul Mackerras)
         - powerpc/mm/hash64: Fix might_have_hea() check (Michael Ellerman)
      
        Other:
         - MAINTAINERS: Remove myself from PA Semi entries (Olof Johansson)
         - MAINTAINERS: Drop separate pseries entry (Michael Ellerman)
         - MAINTAINERS: Update powerpc website & add selftests (Michael Ellerman):
      
      * tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (35 commits)
        powerpc/mm/hash64: Fix might_have_hea() check
        powerpc/64: Fix incorrect return value from __copy_tofrom_user
        powerpc/64s: Fix power4_fixup_nap placement
        powerpc/pseries: Fix stack corruption in htpe code
        selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes
        MAINTAINERS: Update powerpc website & add selftests
        MAINTAINERS: Drop separate pseries entry
        MAINTAINERS: Remove myself from PA Semi entries
        selftests/powerpc: Add missing binaries to .gitignores
        arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig
        soc/qman: Add self-test for QMan driver
        soc/bman: Add self-test for BMan driver
        soc/fsl: Introduce DPAA 1.x QMan device driver
        soc/fsl: Introduce DPAA 1.x BMan device driver
        powerpc/8xx: make user addr DTLB miss the short path
        powerpc/8xx: Move additional DTLBMiss handlers out of exception area
        powerpc/8xx: use r3 to scratch CR in ITLBmiss
        soc/fsl/qe: fix gpio save_regs functions
        powerpc/8xx: add dedicated machine check handler
        powerpc/8xx: add system_reset_exception
        ...
      d8bfb96a
    • Ralf Baechle's avatar
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 29fbff86
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix various build warnings in tlan/qed/xen-netback drivers, from
          Arnd Bergmann.
      
       2) Propagate proper error code in strparser's strp_recv(), from Geert
          Uytterhoeven.
      
       3) Fix accidental broadcast of RTM_GETTFILTER responses, from Eric
          Dumazret.
      
       4) Need to use list_for_each_entry_safe() in qed driver, from Wei
          Yongjun.
      
       5) Openvswitch 802.1AD bug fixes from Jiri Benc.
      
       6) Cure BUILD_BUG_ON() in mlx5 driver, from Tom Herbert.
      
       7) Fix UDP ipv6 checksumming in netvsc driver, from Stephen Hemminger.
      
       8) stmmac driver fixes from Giuseppe CAVALLARO.
      
       9) Fix access to mangled IP6CB in tcp, from Eric Dumazet.
      
      10) Fix info leaks in tipc and rtnetlink, from Dan Carpenter.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        net: bridge: add the multicast_flood flag attribute to brport_attrs
        net: axienet: Remove unused parameter from __axienet_device_reset
        liquidio: CN23XX: fix a loop timeout
        net: rtnl: info leak in rtnl_fill_vfinfo()
        tipc: info leak in __tipc_nl_add_udp_addr()
        net: ipv4: Do not drop to make_route if oif is l3mdev
        net: phy: Trigger state machine on state change and not polling.
        ipv6: tcp: restore IP6CB for pktoptions skbs
        netvsc: Remove mistaken udp.h inclusion.
        xen-netback: fix type mismatch warning
        stmmac: fix error check when init ptp
        stmmac: fix ptp init for gmac4
        qed: fix old-style function definition
        netvsc: fix checksum on UDP IPV6
        net_sched: reorder pernet ops and act ops registrations
        xen-netback: fix guest Rx stall detection (after guest Rx refactor)
        drivers/ptp: Fix kernel memory disclosure
        net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON
        qmi_wwan: add support for Quectel EC21 and EC25
        openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev
        ...
      29fbff86
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs · c4a86165
      Linus Torvalds authored
      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()
        ...
      c4a86165
    • Linus Torvalds's avatar
      Merge tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux · 27785564
      Linus Torvalds authored
      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
      27785564
    • Linus Torvalds's avatar
      Merge tag 'xfs-reflink-for-linus-4.9-rc1' of... · 35a891be
      Linus Torvalds authored
      Merge tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/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
        ...
      35a891be
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 40bd3a5f
      Linus Torvalds authored
      PCI changes for the v4.9 merge window:
       "Here are some more changes I'd like to have in v4.9.  There's one
        small Tegra bug fix in the PHY poweroff path, which is only used in
        failure paths.
      
        The rest is all strictly cleanup that should make host bridge drivers
        more readable, but shouldn't actually change any behavior.
      
        Summary:
      
         - use local struct device pointers in many host bridge drivers for
           clarity
      
         - remove unused platform data
      
         - use generic DesignWare accessors
      
         - misc cleanups: remove redundant structure entries and re-order
           structure members to put comon generic fields first etc"
      
      * tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (108 commits)
        MAINTAINERS: Add maintainer for the PCIe Marvell Armada 8K driver
        MAINTAINERS: Add DT binding to the Aardvark PCIe driver maintainer
        PCI: rockchip: Indent "if" statement body
        PCI: hisi: Reorder struct hisi_pcie
        PCI: hisi: Pass device-specific struct to internal functions
        PCI: hisi: Include register block base in PCIE_SYS_STATE4 address
        PCI: dra7xx: Reorder struct dra7xx_pcie
        PCI: xilinx-nwl: Remove unused platform data
        PCI: xilinx-nwl: Add local struct device pointers
        PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument
        PCI: xilinx: Remove unused platform data
        PCI: xilinx: Add local struct device pointers
        PCI: xgene: Add register accessors
        PCI: xgene: Pass struct xgene_pcie_port to setup functions
        PCI: xgene: Remove unused platform data
        PCI: tegra: Remove unused platform data
        PCI: tegra: Add local struct device pointers
        PCI: tegra: Fix argument order in tegra_pcie_phy_disable()
        PCI: rockchip: Remove unused platform data
        PCI: rcar-gen2: Add local struct device pointers
        ...
      40bd3a5f
  2. 13 Oct, 2016 28 commits