03 Oct, 2012

2 commits

  • Pull user namespace changes from Eric Biederman:
    "This is a mostly modest set of changes to enable basic user namespace
    support. This allows the code to code to compile with user namespaces
    enabled and removes the assumption there is only the initial user
    namespace. Everything is converted except for the most complex of the
    filesystems: autofs4, 9p, afs, ceph, cifs, coda, fuse, gfs2, ncpfs,
    nfs, ocfs2 and xfs as those patches need a bit more review.

    The strategy is to push kuid_t and kgid_t values are far down into
    subsystems and filesystems as reasonable. Leaving the make_kuid and
    from_kuid operations to happen at the edge of userspace, as the values
    come off the disk, and as the values come in from the network.
    Letting compile type incompatible compile errors (present when user
    namespaces are enabled) guide me to find the issues.

    The most tricky areas have been the places where we had an implicit
    union of uid and gid values and were storing them in an unsigned int.
    Those places were converted into explicit unions. I made certain to
    handle those places with simple trivial patches.

    Out of that work I discovered we have generic interfaces for storing
    quota by projid. I had never heard of the project identifiers before.
    Adding full user namespace support for project identifiers accounts
    for most of the code size growth in my git tree.

    Ultimately there will be work to relax privlige checks from
    "capable(FOO)" to "ns_capable(user_ns, FOO)" where it is safe allowing
    root in a user names to do those things that today we only forbid to
    non-root users because it will confuse suid root applications.

    While I was pushing kuid_t and kgid_t changes deep into the audit code
    I made a few other cleanups. I capitalized on the fact we process
    netlink messages in the context of the message sender. I removed
    usage of NETLINK_CRED, and started directly using current->tty.

    Some of these patches have also made it into maintainer trees, with no
    problems from identical code from different trees showing up in
    linux-next.

    After reading through all of this code I feel like I might be able to
    win a game of kernel trivial pursuit."

    Fix up some fairly trivial conflicts in netfilter uid/git logging code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (107 commits)
    userns: Convert the ufs filesystem to use kuid/kgid where appropriate
    userns: Convert the udf filesystem to use kuid/kgid where appropriate
    userns: Convert ubifs to use kuid/kgid
    userns: Convert squashfs to use kuid/kgid where appropriate
    userns: Convert reiserfs to use kuid and kgid where appropriate
    userns: Convert jfs to use kuid/kgid where appropriate
    userns: Convert jffs2 to use kuid and kgid where appropriate
    userns: Convert hpfs to use kuid and kgid where appropriate
    userns: Convert btrfs to use kuid/kgid where appropriate
    userns: Convert bfs to use kuid/kgid where appropriate
    userns: Convert affs to use kuid/kgid wherwe appropriate
    userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids
    userns: On ia64 deal with current_uid and current_gid being kuid and kgid
    userns: On ppc convert current_uid from a kuid before printing.
    userns: Convert s390 getting uid and gid system calls to use kuid and kgid
    userns: Convert s390 hypfs to use kuid and kgid where appropriate
    userns: Convert binder ipc to use kuids
    userns: Teach security_path_chown to take kuids and kgids
    userns: Add user namespace support to IMA
    userns: Convert EVM to deal with kuids and kgids in it's hmac computation
    ...

    Linus Torvalds
     
  • Pull workqueue changes from Tejun Heo:
    "This is workqueue updates for v3.7-rc1. A lot of activities this
    round including considerable API and behavior cleanups.

    * delayed_work combines a timer and a work item. The handling of the
    timer part has always been a bit clunky leading to confusing
    cancelation API with weird corner-case behaviors. delayed_work is
    updated to use new IRQ safe timer and cancelation now works as
    expected.

    * Another deficiency of delayed_work was lack of the counterpart of
    mod_timer() which led to cancel+queue combinations or open-coded
    timer+work usages. mod_delayed_work[_on]() are added.

    These two delayed_work changes make delayed_work provide interface
    and behave like timer which is executed with process context.

    * A work item could be executed concurrently on multiple CPUs, which
    is rather unintuitive and made flush_work() behavior confusing and
    half-broken under certain circumstances. This problem doesn't
    exist for non-reentrant workqueues. While non-reentrancy check
    isn't free, the overhead is incurred only when a work item bounces
    across different CPUs and even in simulated pathological scenario
    the overhead isn't too high.

    All workqueues are made non-reentrant. This removes the
    distinction between flush_[delayed_]work() and
    flush_[delayed_]_work_sync(). The former is now as strong as the
    latter and the specified work item is guaranteed to have finished
    execution of any previous queueing on return.

    * In addition to the various bug fixes, Lai redid and simplified CPU
    hotplug handling significantly.

    * Joonsoo introduced system_highpri_wq and used it during CPU
    hotplug.

    There are two merge commits - one to pull in IRQ safe timer from
    tip/timers/core and the other to pull in CPU hotplug fixes from
    wq/for-3.6-fixes as Lai's hotplug restructuring depended on them."

    Fixed a number of trivial conflicts, but the more interesting conflicts
    were silent ones where the deprecated interfaces had been used by new
    code in the merge window, and thus didn't cause any real data conflicts.

    Tejun pointed out a few of them, I fixed a couple more.

    * 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits)
    workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending()
    workqueue: use cwq_set_max_active() helper for workqueue_set_max_active()
    workqueue: introduce cwq_set_max_active() helper for thaw_workqueues()
    workqueue: remove @delayed from cwq_dec_nr_in_flight()
    workqueue: fix possible stall on try_to_grab_pending() of a delayed work item
    workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback()
    workqueue: use __cpuinit instead of __devinit for cpu callbacks
    workqueue: rename manager_mutex to assoc_mutex
    workqueue: WORKER_REBIND is no longer necessary for idle rebinding
    workqueue: WORKER_REBIND is no longer necessary for busy rebinding
    workqueue: reimplement idle worker rebinding
    workqueue: deprecate __cancel_delayed_work()
    workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()
    workqueue: use mod_delayed_work() instead of __cancel + queue
    workqueue: use irqsafe timer for delayed_work
    workqueue: clean up delayed_work initializers and add missing one
    workqueue: make deferrable delayed_work initializer names consistent
    workqueue: cosmetic whitespace updates for macro definitions
    workqueue: deprecate system_nrt[_freezable]_wq
    workqueue: deprecate flush[_delayed]_work_sync()
    ...

    Linus Torvalds
     

02 Oct, 2012

2 commits

  • Pull USB changes from Greg Kroah-Hartman:
    "Here is the big USB pull request for 3.7-rc1

    There are lots of gadget driver changes (including copying a bunch of
    files into the drivers/staging/ccg/ directory so that the other gadget
    drivers can be fixed up properly without breaking that driver), and we
    remove the old obsolete ub.c driver from the tree.

    There are also the usual XHCI set of updates, and other various driver
    changes and updates. We also are trying hard to remove the old dbg()
    macro, but the final bits of that removal will be coming in through
    the networking tree before we can delete it for good.

    All of these patches have been in the linux-next tree.

    Signed-off-by: Greg Kroah-Hartman "

    Fix up several annoying - but fairly mindless - conflicts due to the
    termios structure having moved into the tty device, and often clashing
    with dbg -> dev_dbg conversion.

    * tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits)
    USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc
    USB: uas: fix gcc warning
    USB: uas: fix locking
    USB: Fix race condition when removing host controllers
    USB: uas: add locking
    USB: uas: fix abort
    USB: uas: remove aborted field, replace with status bit.
    USB: uas: fix task management
    USB: uas: keep track of command urbs
    xhci: Intel Panther Point BEI quirk.
    powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
    USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
    Revert "usb : Add sysfs files to control port power."
    USB: serial: remove vizzini driver
    usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
    Increase XHCI suspend timeout to 16ms
    USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
    USB: sierra_ms: don't keep unused variable
    fsl/usb: Add support for USB controller version 2.4
    USB: qcaux: add Pantech vendor class match
    ...

    Linus Torvalds
     
  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug
    - Protect acpi_pci_drivers and acpi_pci_roots (Taku Izumi)
    - Clear host bridge resource info to avoid issue when releasing
    (Yinghai Lu)
    - Notify acpi_pci_drivers when hot-plugging host bridges (Jiang Liu)
    - Use standard list ops for acpi_pci_drivers (Jiang Liu)

    Device hotplug
    - Use pci_get_domain_bus_and_slot() to close hotplug races (Jiang
    Liu)
    - Remove fakephp driver (Bjorn Helgaas)
    - Fix VGA ref count in hotplug remove path (Yinghai Lu)
    - Allow acpiphp to handle PCIe ports without native hotplug (Jiang
    Liu)
    - Implement resume regardless of pciehp_force param (Oliver Neukum)
    - Make pci_fixup_irqs() work after init (Thierry Reding)

    Miscellaneous
    - Add pci_pcie_type(dev) and remove pci_dev.pcie_type (Yijing Wang)
    - Factor out PCI Express Capability accessors (Jiang Liu)
    - Add pcibios_window_alignment() so powerpc EEH can use generic
    resource assignment (Gavin Shan)
    - Make pci_error_handlers const (Stephen Hemminger)
    - Cleanup drivers/pci/remove.c (Bjorn Helgaas)
    - Improve Vendor-Specific Extended Capability support (Bjorn
    Helgaas)
    - Use standard list ops for bus->devices (Bjorn Helgaas)
    - Avoid kmalloc in pci_get_subsys() and pci_get_class() (Feng Tang)
    - Reassign invalid bus number ranges (Intel DP43BF workaround)
    (Yinghai Lu)"

    * tag 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (102 commits)
    PCI: acpiphp: Handle PCIe ports without native hotplug capability
    PCI/ACPI: Use acpi_driver_data() rather than searching acpi_pci_roots
    PCI/ACPI: Protect acpi_pci_roots list with mutex
    PCI/ACPI: Use acpi_pci_root info rather than looking it up again
    PCI/ACPI: Pass acpi_pci_root to acpi_pci_drivers' add/remove interface
    PCI/ACPI: Protect acpi_pci_drivers list with mutex
    PCI/ACPI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
    PCI/ACPI: Use normal list for struct acpi_pci_driver
    PCI/ACPI: Use DEVICE_ACPI_HANDLE rather than searching acpi_pci_roots
    PCI: Fix default vga ref_count
    ia64/PCI: Clear host bridge aperture struct resource
    x86/PCI: Clear host bridge aperture struct resource
    PCI: Stop all children first, before removing all children
    Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()"
    PCI: Provide a default pcibios_update_irq()
    PCI: Discard __init annotations for pci_fixup_irqs() and related functions
    PCI: Use correct type when freeing bus resource list
    PCI: Check P2P bridge for invalid secondary/subordinate range
    PCI: Convert "new_id"/"remove_id" into generic pci_bus driver attributes
    xen-pcifront: Use hotplug-safe pci_get_domain_bus_and_slot()
    ...

    Linus Torvalds
     

30 Sep, 2012

1 commit

  • Pull NVMe driver fixes from Matthew Wilcox:
    "Now that actual hardware has been released (don't have any yet
    myself), people are starting to want some of these fixes merged."

    Willy doesn't have hardware? Guys...

    * git://git.infradead.org/users/willy/linux-nvme:
    NVMe: Cancel outstanding IOs on queue deletion
    NVMe: Free admin queue memory on initialisation failure
    NVMe: Use ida for nvme device instance
    NVMe: Fix whitespace damage in nvme_init
    NVMe: handle allocation failure in nvme_map_user_pages()
    NVMe: Fix uninitialized iod compiler warning
    NVMe: Do not set IO queue depth beyond device max
    NVMe: Set block queue max sectors
    NVMe: use namespace id for nvme_get_features
    NVMe: replace nvme_ns with nvme_dev for user admin
    NVMe: Fix nvme module init when nvme_major is set
    NVMe: Set request queue logical block size

    Linus Torvalds
     

25 Sep, 2012

1 commit


22 Sep, 2012

3 commits

  • If a read-only rbd device is opened for writing in rbd_open(), it
    returns without dropping the just-acquired device reference.

    Fix this by moving the read-only check before getting the reference.

    Signed-off-by: Alex Elder
    Reviewed-by: Yehuda Sadeh
    Reviewed-by: Josh Durgin

    Alex Elder
     
  • Pull networking updates from David Miller:
    "More bug fixes, nothing gets past these guys"

    1) More kernel info leaks found by Mathias Krause, this time in the
    IPSEC configuration layers.

    2) When IPSEC policies change, we do not properly make sure that cached
    routes (which could now be stale) throughout the system will be
    revalidated. Fix this by generalizing the generation count
    invalidation scheme used by ipv4. From Nicolas Dichtel.

    3) When repairing TCP sockets, we need to allow to restore not just the
    send window scale, but the receive one too. Extend the existing
    interface to achieve this in a backwards compatible way. From
    Andrey Vagin.

    4) A fix for FCOE scatter gather feature validation erroneously caused
    scatter gather to be disabled for things like AOE too. From Ed L
    Cashin.

    5) Several cases of mishandling of error pointers, from Mathias Krause,
    Wei Yongjun, and Devendra Naga.

    6) Fix gianfar build, from Richard Cochran.

    7) CAP_NET_* failures should return -EPERM not -EACCES, from Zhao
    Hongjiang.

    8) Hardware reset fix in janz-ican3 CAN driver, from Ira W Snyder.

    9) Fix oops during rmmod in ti_hecc CAN driver, from Marc Kleine-Budde.

    10) The removal of the conditional compilation of the clk support code
    in the stmmac driver broke things. This is because the interfaces
    used are the ones that don't also perform the enable/disable of the
    clk. Fix from Stefan Roese.

    11) The QFQ packet scheduler can record out of range virtual start
    times, resulting later in misbehavior and even crashes. Fix from
    Paolo Valente.

    12) If MSG_WAITALL is used with IOAT DMA under TCP, we can wedge the
    receiver when the advertised receive window goes to zero. Detect
    this case and force the processing of the IOAT DMA queue when it
    happens to avoid getting stuck. Fix from Michal Kubecek.

    13) batman-adv assumes that test_bit() returns only 0 or 1, but this is
    not true for x86 (which returns -1 or 0, via the 'sbb' instruction).
    Fix from Linus Lussing.

    14) Fix small packet corruption in e1000, from Tushar Dave.

    15) make_blackhole() in the IPSEC policy code can do one read unlock too
    many, fix from Li RongQing.

    16) The new tcp_try_coalesce() code introduced a bug in TCP URG
    handling, fix from Eric Dumazet.

    17) Fix memory leak in __netif_receive_skb() when doing zerocopy and
    when hit an OOM condition. From Michael S Tsirkin.

    18) netxen blindly deferences pdev->bus->self, which is not guarenteed
    to be non-NULL. Fix from Nikolay Aleksandrov.

    19) Fix a performance regression caused by mistakes in ipv6 checksum
    validation in the bnx2x driver, fix from Michal Schmidt.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
    net/stmmac: Use clk_prepare_enable and clk_disable_unprepare
    net: change return values from -EACCES to -EPERM
    net/irda: sh_sir: fix return value check in sh_sir_set_baudrate()
    stmmac: fix return value check in stmmac_open_ext_timer()
    gianfar: fix phc index build failure
    ipv6: fix return value check in fib6_add()
    bnx2x: remove false warning regarding interrupt number
    can: ti_hecc: fix oops during rmmod
    can: janz-ican3: fix support for older hardware revisions
    net: do not disable sg for packets requiring no checksum
    aoe: assert AoE packets marked as requiring no checksum
    at91ether: return PTR_ERR if call to clk_get fails
    xfrm_user: don't copy esn replay window twice for new states
    xfrm_user: ensure user supplied esn replay window is valid
    xfrm_user: fix info leak in copy_to_user_tmpl()
    xfrm_user: fix info leak in copy_to_user_policy()
    xfrm_user: fix info leak in copy_to_user_state()
    xfrm_user: fix info leak in copy_to_user_auth()
    net: qmi_wwan: adding Huawei E367, ZTE MF683 and Pantech P4200
    tcp: restore rcv_wscale in a repair mode (v2)
    ...

    Linus Torvalds
     
  • Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
    - Fix M2P batching re-using the incorrect structure field.

    In v3.5 we added batching for M2P override (Machine Frame Number ->
    Physical Frame Number), but the original MFN was saved in an
    incorrect structure - and we would oops/restore when restoring with
    the old MFN.

    - Disable BIOS SMP MP table search.

    A bootup issue that we had ignored until we found that on DL380 G6 it
    was needed.

    * tag 'stable/for-linus-3.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/boot: Disable BIOS SMP MP table search.
    xen/m2p: do not reuse kmap_op->dev_bus_addr

    Linus Torvalds
     

21 Sep, 2012

2 commits


20 Sep, 2012

1 commit

  • Pull block fixes from Jens Axboe:
    "A small collection of driver fixes/updates and a core fix for 3.6. It
    contains:

    - Bug fixes for mtip32xx, and support for new hardware (just addition
    of IDs). They have been queued up for 3.7 for a few weeks as well.

    - rate-limit a failing command error message in block core.

    - A fix for an old cciss bug from Stephen.

    - Prevent overflow of partition count from Alan."

    * 'for-linus' of git://git.kernel.dk/linux-block:
    cciss: fix handling of protocol error
    blk: add an upper sanity check on partition adding
    mtip32xx: fix user_buffer check in exec_drive_command
    mtip32xx: Remove dead code
    mtip32xx: Change printk to pr_xxxx
    mtip32xx: Proper reporting of write protect status on big-endian
    mtip32xx: Increase timeout for standby command
    mtip32xx: Handle NCQ commands during the security locked state
    mtip32xx: Add support for new devices
    block: rate-limit the error message from failing commands

    Linus Torvalds
     

18 Sep, 2012

2 commits

  • If a command completes with a status of CMD_PROTOCOL_ERR, this
    information should be conveyed to the SCSI mid layer, not dropped
    on the floor. Unlike a similar bug in the hpsa driver, this bug
    only affects tape drives and CD and DVD ROM drives in the cciss
    driver, and to induce it, you have to disconnect (or damage) a
    cable, so it is not a very likely scenario (which would explain
    why the bug has gone undetected for the last 10 years.)

    Signed-off-by: Stephen M. Cameron
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Stephen M. Cameron
     
  • Fix a serious but uncommon bug in nbd which occurs when there is heavy
    I/O going to the nbd device while, at the same time, a failure (server,
    network) or manual disconnect of the nbd connection occurs.

    There is a small window between the time that the nbd_thread is stopped
    and the socket is shutdown where requests can continue to be queued to
    nbd's internal waiting_queue. When this happens, those requests are
    never completed or freed.

    The fix is to clear the waiting_queue on shutdown of the nbd device, in
    the same way that the nbd request queue (queue_head) is already being
    cleared.

    Signed-off-by: Paul Clements
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Clements
     

17 Sep, 2012

1 commit


13 Sep, 2012

8 commits

  • * commit 'v3.6-rc5': (1098 commits)
    Linux 3.6-rc5
    HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
    Remove user-triggerable BUG from mpol_to_str
    xen/pciback: Fix proper FLR steps.
    uml: fix compile error in deliver_alarm()
    dj: memory scribble in logi_dj
    Fix order of arguments to compat_put_time[spec|val]
    xen: Use correct masking in xen_swiotlb_alloc_coherent.
    xen: fix logical error in tlb flushing
    xen/p2m: Fix one-off error in checking the P2M tree directory.
    powerpc: Don't use __put_user() in patch_instruction
    powerpc: Make sure IPI handlers see data written by IPI senders
    powerpc: Restore correct DSCR in context switch
    powerpc: Fix DSCR inheritance in copy_thread()
    powerpc: Keep thread.dscr and thread.dscr_inherit in sync
    powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
    powerpc/powernv: Always go into nap mode when CPU is offline
    powerpc: Give hypervisor decrementer interrupts their own handler
    powerpc/vphn: Fix arch_update_cpu_topology() return value
    ARM: gemini: fix the gemini build
    ...

    Conflicts:
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
    drivers/rapidio/devices/tsi721.c

    Bjorn Helgaas
     
  • Current user_buffer check is incorrect and causes hdparm to fail

    # hdparm -I /dev/rssda
    HDIO_DRIVE_CMD(identify) failed: Input/output error

    /dev/rssda:

    Patching linux-3.6-rc5 hdparm works as expected

    # hdparm -I /dev/rssda
    /dev/rssda:

    ATA device, with non-removable media
    Model Number: DELL_P320h-MTFDGAL350SAH
    Serial Number: 00000000121302025F01
    Firmware Revision: B1442808

    Reported-by: Tomas Henzl
    Signed-off-by: David Milburn
    Signed-off-by: Jens Axboe

    David Milburn
     
  • Removed the dead code in mtip_hw_read_registers() and mtip_hw_read_flags().

    Reported-by: Coverity
    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     
  • Changed printk to be compliant with latest style changes

    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     
  • Proper reporting of write protect status on big-endian

    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     
  • Increased timeout for standby command to work with larger capacity drives

    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     
  • Return error for NCQ commands when the drive is in security locked state

    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     
  • Added supported device IDs in pci table

    Signed-off-by: Asai Thambi S P
    Signed-off-by: Selvan Mani
    Signed-off-by: Jens Axboe

    Asai Thambi S P
     

12 Sep, 2012

1 commit

  • If the caller passes a valid kmap_op to m2p_add_override, we use
    kmap_op->dev_bus_addr to store the original mfn, but dev_bus_addr is
    part of the interface with Xen and if we are batching the hypercalls it
    might not have been written by the hypervisor yet. That means that later
    on Xen will write to it and we'll think that the original mfn is
    actually what Xen has written to it.

    Rather than "stealing" struct members from kmap_op, keep using
    page->index to store the original mfn and add another parameter to
    m2p_remove_override to get the corresponding kmap_op instead.
    It is now responsibility of the caller to keep track of which kmap_op
    corresponds to a particular page in the m2p_override (gntdev, the only
    user of this interface that passes a valid kmap_op, is already doing that).

    CC: stable@kernel.org
    Reported-and-Tested-By: Sander Eikelenboom
    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

08 Sep, 2012

1 commit


06 Sep, 2012

1 commit


26 Aug, 2012

1 commit

  • Pull block-related fixes from Jens Axboe:

    - Improvements to the buffered and direct write IO plugging from
    Fengguang.

    - Abstract out the mapping of a bio in a request, and use that to
    provide a blk_bio_map_sg() helper. Useful for mapping just a bio
    instead of a full request.

    - Regression fix from Hugh, fixing up a patch that went into the
    previous release cycle (and marked stable, too) attempting to prevent
    a loop in __getblk_slow().

    - Updates to discard requests, fixing up the sizing and how we align
    them. Also a change to disallow merging of discard requests, since
    that doesn't really work properly yet.

    - A few drbd fixes.

    - Documentation updates.

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: replace __getblk_slow misfix by grow_dev_page fix
    drbd: Write all pages of the bitmap after an online resize
    drbd: Finish requests that completed while IO was frozen
    drbd: fix drbd wire compatibility for empty flushes
    Documentation: update tunable options in block/cfq-iosched.txt
    Documentation: update tunable options in block/cfq-iosched.txt
    Documentation: update missing index files in block/00-INDEX
    block: move down direct IO plugging
    block: remove plugging at buffered write time
    block: disable discard request merge temporarily
    bio: Fix potential memory leak in bio_find_or_create_slab()
    block: Don't use static to define "void *p" in show_partition_start()
    block: Add blk_bio_map_sg() helper
    block: Introduce __blk_segment_map_sg() helper
    fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices
    block: split discard into aligned requests
    block: reorganize rounding of max_discard_sectors

    Linus Torvalds
     

22 Aug, 2012

3 commits

  • Delete code which sets SCSI status incorrectly as it's already been set
    correctly above this incorrect code. The bug was introduced in 2009 by
    commit b0e15f6db111 ("cciss: fix typo that causes scsi status to be
    lost.")

    Signed-off-by: Stephen M. Cameron
    Reported-by: Roel van Meer
    Tested-by: Roel van Meer
    Cc: Jens Axboe
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen M. Cameron
     
  • Now that cancel_delayed_work() can be safely called from IRQ handlers,
    there's no reason to use __cancel_delayed_work(). Use
    cancel_delayed_work() instead of __cancel_delayed_work() and mark the
    latter deprecated.

    Signed-off-by: Tejun Heo
    Acked-by: Jens Axboe
    Cc: Jiri Kosina
    Cc: Roland Dreier
    Cc: Tomi Valkeinen

    Tejun Heo
     
  • Now that mod_delayed_work() is safe to call from IRQ handlers,
    __cancel_delayed_work() followed by queue_delayed_work() can be
    replaced with mod_delayed_work().

    Most conversions are straight-forward except for the following.

    * net/core/link_watch.c: linkwatch_schedule_work() was doing a quite
    elaborate dancing around its delayed_work. Collapse it such that
    linkwatch_work is queued for immediate execution if LW_URGENT and
    existing timer is kept otherwise.

    Signed-off-by: Tejun Heo
    Cc: "David S. Miller"
    Cc: Tomi Valkeinen

    Tejun Heo
     

21 Aug, 2012

1 commit

  • flush[_delayed]_work_sync() are now spurious. Mark them deprecated
    and convert all users to flush[_delayed]_work().

    If you're cc'd and wondering what's going on: Now all workqueues are
    non-reentrant and the regular flushes guarantee that the work item is
    not pending or running on any CPU on return, so there's no reason to
    use the sync flushes at all and they're going away.

    This patch doesn't make any functional difference.

    Signed-off-by: Tejun Heo
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Ian Campbell
    Cc: Jens Axboe
    Cc: Mattia Dongili
    Cc: Kent Yoder
    Cc: David Airlie
    Cc: Jiri Kosina
    Cc: Karsten Keil
    Cc: Bryan Wu
    Cc: Benjamin Herrenschmidt
    Cc: Alasdair Kergon
    Cc: Mauro Carvalho Chehab
    Cc: Florian Tobias Schandinat
    Cc: David Woodhouse
    Cc: "David S. Miller"
    Cc: linux-wireless@vger.kernel.org
    Cc: Anton Vorontsov
    Cc: Sangbeom Kim
    Cc: "James E.J. Bottomley"
    Cc: Greg Kroah-Hartman
    Cc: Eric Van Hensbergen
    Cc: Takashi Iwai
    Cc: Steven Whitehouse
    Cc: Petr Vandrovec
    Cc: Mark Fasheh
    Cc: Christoph Hellwig
    Cc: Avi Kivity

    Tejun Heo
     

17 Aug, 2012

1 commit


16 Aug, 2012

3 commits

  • We need to write the whole bitmap after we moved the meta data
    due to an online resize operation.

    With the support for one peta byte devices bitmap IO was optimized
    to only write out touched pages. This optimization must be turned
    off when writing the bitmap after an online resize.

    This issue was introduced with drbd-8.3.10.

    The impact of this bug is that after an online resize, the next
    resync could become larger than expected.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Philipp Reisner
     
  • Requests of an acked epoch are stored on the barrier_acked_requests list. In
    case the private bio of such a request completes while IO on the drbd device
    is suspended [req_mod(completed_ok)] then the request stays there.

    When thawing IO because the fence_peer handler returned, then we use
    tl_clear() to apply the connection_lost_while_pending event to all requests
    on the transfer-log and the barrier_acked_requests list.

    Up to now the connection_lost_while_pending event was not applied
    on requests on the barrier_acked_requests list. Fixed that.

    I.e. now the connection_lost_while_pending and resend events are
    applied to requests on the barrier_acked_requests list. For that
    it is necessary that the resend event finishes (local only)
    READS correctly.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Philipp Reisner
     
  • DRBD has a concept of request epochs or reorder-domains,
    which are separated on the wire by P_BARRIER packets.

    Older DRBD is not able to handle zero-sized requests at all,
    so we need to map empty flushes to these drbd barriers.

    These are the equivalent of empty flushes, and
    by default trigger flushes on the receiving side anyways
    (unless not supported or explicitly disabled),
    so there is no need to handle this differently in newer drbd either.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Lars Ellenberg
     

08 Aug, 2012

1 commit


04 Aug, 2012

2 commits


02 Aug, 2012

1 commit

  • Pull block driver changes from Jens Axboe:

    - Making the plugging support for drivers a bit more sane from Neil.
    This supersedes the plugging change from Shaohua as well.

    - The usual round of drbd updates.

    - Using a tail add instead of a head add in the request completion for
    ndb, making us find the most completed request more quickly.

    - A few floppy changes, getting rid of a duplicated flag and also
    running the floppy init async (since it takes forever in boot terms)
    from Andi.

    * 'for-3.6/drivers' of git://git.kernel.dk/linux-block:
    floppy: remove duplicated flag FD_RAW_NEED_DISK
    blk: pass from_schedule to non-request unplug functions.
    block: stack unplug
    blk: centralize non-request unplug handling.
    md: remove plug_cnt feature of plugging.
    block/nbd: micro-optimization in nbd request completion
    drbd: announce FLUSH/FUA capability to upper layers
    drbd: fix max_bio_size to be unsigned
    drbd: flush drbd work queue before invalidate/invalidate remote
    drbd: fix potential access after free
    drbd: call local-io-error handler early
    drbd: do not reset rs_pending_cnt too early
    drbd: reset congestion information before reporting it in /proc/drbd
    drbd: report congestion if we are waiting for some userland callback
    drbd: differentiate between normal and forced detach
    drbd: cleanup, remove two unused global flags
    floppy: Run floppy initialization asynchronous

    Linus Torvalds
     

01 Aug, 2012

1 commit

  • Merge Andrew's second set of patches:
    - MM
    - a few random fixes
    - a couple of RTC leftovers

    * emailed patches from Andrew Morton : (120 commits)
    rtc/rtc-88pm80x: remove unneed devm_kfree
    rtc/rtc-88pm80x: assign ret only when rtc_register_driver fails
    mm: hugetlbfs: close race during teardown of hugetlbfs shared page tables
    tmpfs: distribute interleave better across nodes
    mm: remove redundant initialization
    mm: warn if pg_data_t isn't initialized with zero
    mips: zero out pg_data_t when it's allocated
    memcg: gix memory accounting scalability in shrink_page_list
    mm/sparse: remove index_init_lock
    mm/sparse: more checks on mem_section number
    mm/sparse: optimize sparse_index_alloc
    memcg: add mem_cgroup_from_css() helper
    memcg: further prevent OOM with too many dirty pages
    memcg: prevent OOM with too many dirty pages
    mm: mmu_notifier: fix freed page still mapped in secondary MMU
    mm: memcg: only check anon swapin page charges for swap cache
    mm: memcg: only check swap cache pages for repeated charging
    mm: memcg: split swapin charge function into private and public part
    mm: memcg: remove needless !mm fixup to init_mm when charging
    mm: memcg: remove unneeded shmem charge type
    ...

    Linus Torvalds