04 Jul, 2012

1 commit

  • Pull block bits from Jens Axboe:
    "As vacation is coming up, thought I'd better get rid of my pending
    changes in my for-linus branch for this iteration. It contains:

    - Two patches for mtip32xx. Killing a non-compliant sysfs interface
    and moving it to debugfs, where it belongs.

    - A few patches from Asias. Two legit bug fixes, and one killing an
    interface that is no longer in use.

    - A patch from Jan, making the annoying partition ioctl warning a bit
    less annoying, by restricting it to !CAP_SYS_RAWIO only.

    - Three bug fixes for drbd from Lars Ellenberg.

    - A fix for an old regression for umem, it hasn't really worked since
    the plugging scheme was changed in 3.0.

    - A few fixes from Tejun.

    - A splice fix from Eric Dumazet, fixing an issue with pipe
    resizing."

    * 'for-linus' of git://git.kernel.dk/linux-block:
    scsi: Silence unnecessary warnings about ioctl to partition
    block: Drop dead function blk_abort_queue()
    block: Mitigate lock unbalance caused by lock switching
    block: Avoid missed wakeup in request waitqueue
    umem: fix up unplugging
    splice: fix racy pipe->buffers uses
    drbd: fix null pointer dereference with on-congestion policy when diskless
    drbd: fix list corruption by failing but already aborted reads
    drbd: fix access of unallocated pages and kernel panic
    xen/blkfront: Add WARN to deal with misbehaving backends.
    blkcg: drop local variable @q from blkg_destroy()
    mtip32xx: Create debugfs entries for troubleshooting
    mtip32xx: Remove 'registers' and 'flags' from sysfs
    blkcg: fix blkg_alloc() failure path
    block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
    block: fix return value on cfq_init() failure
    mtip32xx: Remove version.h header file inclusion
    xen/blkback: Copy id field when doing BLKIF_DISCARD.

    Linus Torvalds
     

29 Jun, 2012

5 commits


27 Jun, 2012

1 commit

  • Commit "818039c UBIFS: fix debugfs-less systems support" fixed one
    regression but introduced a different regression - the debugfs is now always
    compiled out. Root cause: IS_ENABLED() arguments should be used with the
    CONFIG_* prefix.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     

23 Jun, 2012

2 commits

  • Pull Ceph fixes from Sage Weil:
    "There are a couple of fixes from Yan for bad pointer dereferences in
    the messenger code and when fiddling with page->private after page
    migration, a fix from Alex for a use-after-free in the osd client
    code, and a couple fixes for the message refcounting and shutdown
    ordering."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    libceph: flush msgr queue during mon_client shutdown
    rbd: Clear ceph_msg->bio_iter for retransmitted message
    libceph: use con get/put ops from osd_client
    libceph: osd_client: don't drop reply reference too early
    ceph: check PG_Private flag before accessing page->private

    Linus Torvalds
     
  • Pull XFS fixes from Ben Myers:
    - Fix stale data exposure with unwritten extents
    - Fix a warning in xfs_alloc_vextent with ODEBUG
    - Fix overallocation and alignment of pages for xfs_bufs
    - Fix a cursor leak
    - Fix a log hang
    - Fix a crash related to xfs_sync_worker
    - Rename xfs log structure from struct log to struct xlog so we can use
    crash dumps effectively

    * tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs:
    xfs: rename log structure to xlog
    xfs: shutdown xfs_sync_worker before the log
    xfs: Fix overallocation in xfs_buf_allocate_memory()
    xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
    xfs: check for stale inode before acquiring iflock on push
    xfs: fix debug_object WARN at xfs_alloc_vextent()
    xfs: xfs_vm_writepage clear iomap_valid when !buffer_uptodate (REV2)

    Linus Torvalds
     

22 Jun, 2012

7 commits

  • Pull NFS client bugfixes from Trond Myklebust:
    - Fix a write hang due to an uninitalised variable when
    !defined(CONFIG_NFS_V4)
    - Address upcall races in the legacy NFSv4 idmapper
    - Remove an O_DIRECT refcounting issue
    - Fix a pNFS refcounting bug when the file layout metadata server is
    also acting as a data server
    - Fix a pNFS module loading race.

    * tag 'nfs-for-3.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Force the legacy idmapper to be single threaded
    NFS: Initialise commit_info.rpc_out when !defined(CONFIG_NFS_V4)
    NFS: Fix a refcounting issue in O_DIRECT
    NFSv4.1: Fix a race in set_pnfs_layoutdriver
    NFSv4.1: Fix umount when filelayout DS is also the MDS

    Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "This is a small pull with btrfs fixes. The biggest of the bunch is
    another fix for the new backref walking code.

    We're still hammering out one btrfs dio vs buffered reads problem, but
    that one will have to wait for the next rc."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: delay iput with async extents
    Btrfs: add a missing spin_lock
    Btrfs: don't assume to be on the correct extent in add_all_parents
    Btrfs: introduce btrfs_next_old_item

    Linus Torvalds
     
  • Rename the XFS log structure to xlog to help crash distinquish it from the
    other logs in Linux.

    Signed-off-by: Mark Tinguely
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Ben Myers

    Mark Tinguely
     
  • Revert commit 1307bbd, which uses the s_umount semaphore to provide
    exclusion between xfs_sync_worker and unmount, in favor of shutting down
    the sync worker before freeing the log in xfs_log_unmount. This is a
    cleaner way of resolving the race between xfs_sync_worker and unmount
    than using s_umount.

    Signed-off-by: Ben Myers
    Reviewed-by: Mark Tinguely
    Reviewed-by: Dave Chinner

    Ben Myers
     
  • Commit de1cbee which removed b_file_offset in favor of b_bn introduced a bug
    causing xfs_buf_allocate_memory() to overestimate the number of necessary
    pages. The problem is that xfs_buf_alloc() sets b_bn to -1 and thus effectively
    every buffer is straddling a page boundary which causes
    xfs_buf_allocate_memory() to allocate two pages and use vmalloc() for access
    which is unnecessary.

    Dave says xfs_buf_alloc() doesn't need to set b_bn to -1 anymore since the
    buffer is inserted into the cache only after being fully initialized now.
    So just make xfs_buf_alloc() fill in proper block number from the beginning.

    CC: David Chinner
    Signed-off-by: Jan Kara
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Dave Chinner
    Signed-off-by: Ben Myers

    Jan Kara
     
  • When we fail to find an matching extent near the requested extent
    specification during a left-right distance search in
    xfs_alloc_ag_vextent_near, we fail to free the original cursor that
    we used to look up the XFS_BTNUM_CNT tree and hence leak it.

    Reported-by: Chris J Arges
    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Ben Myers

    Dave Chinner
     
  • An inode in the AIL can be flush locked and marked stale if
    a cluster free transaction occurs at the right time. The
    inode item is then marked as flushing, which causes xfsaild
    to spin and leaves the filesystem stalled. This is
    reproduced by running xfstests 273 in a loop for an
    extended period of time.

    Check for stale inodes before the flush lock. This marks
    the inode as pinned, leads to a log flush and allows the
    filesystem to proceed.

    Signed-off-by: Brian Foster
    Reviewed-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Brian Foster
     

21 Jun, 2012

12 commits

  • There is some concern that these iput()'s could be the final iputs and could
    induce lockups on people waiting on writeback. This would happen in the
    rare case that we don't create ordered extents because of an error, but it
    is theoretically possible and we already have a mechanism to deal with this
    so just make them delayed iputs to negate any worry.

    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Josef Bacik
     
  • When fixing up the locking in the delayed ref destruction work I accidently
    broke the locking myself ;(. Add back a spin_lock that should be there and
    we are now all set. Thanks,
    Btrfs: add a missing spin_lock

    When fixing up the locking in the delayed ref destruction work I accidently
    broke the locking myself ;(. Add back a spin_lock that should be there and
    we are now all set. Thanks,

    Reported-by: Dan Carpenter
    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Josef Bacik
     
  • add_all_parents did assume that path is already at a correct extent data
    item, which may not be true in case of data extents that were partly
    rewritten and splitted.

    We need to check if we're on a matching extent for every item and only
    for the ones after the first. The loop is changed to do this now.

    This patch also fixes a bug introduced with commit 3b127fd8 "Btrfs:
    remove obsolete btrfs_next_leaf call from __resolve_indirect_ref".
    The removal of next_leaf did sometimes result in slot==nritems when
    the above described case happens, and thus resulting in invalid values
    (e.g. wanted_obejctid) in add_all_parents (leading to missed backrefs
    or even crashes).

    Signed-off-by: Alexander Block
    Signed-off-by: Jan Schmidt
    Signed-off-by: Chris Mason

    Alexander Block
     
  • We introduce btrfs_next_old_item that uses btrfs_next_old_leaf instead
    of btrfs_next_leaf.

    btrfs_next_item is also changed to simply call btrfs_next_old_item with
    time_seq being 0.

    Signed-off-by: Alexander Block
    Signed-off-by: Chris Mason

    Alexander Block
     
  • Pull staging tree fixes from Greg Kroah-Hartman:
    "Here are a number of small fixes for the drivers/staging tree, as well
    as iio and pstore drivers (which came from the staging tree in the
    3.5-rc1 merge). All of these are tiny, but resolve issues that people
    have been reporting.

    There's also a documentation update to reflect what the iio drivers
    really are doing, which is good to get straightened out.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'staging-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: r8712u: Add new USB IDs
    staging: gdm72xx: Release netlink socket properly
    iio: drop wrong reference from Kconfig
    pstore/inode: Make pstore_fill_super() static
    pstore/ram: Should zap persistent zone on unlink
    pstore/ram_core: Factor persistent_ram_zap() out of post_init()
    pstore/ram_core: Do not reset restored zone's position and size
    pstore/ram: Should update old dmesg buffer before reading
    staging:iio:ad7298: Fix linker error due to missing IIO kfifo buffer
    Revert "staging: usbip: bugfix for stack corruption on 64-bit architectures"
    staging: usbip: bugfix for stack corruption on 64-bit architectures
    staging/comedi: fix build for USB not enabled
    staging: omapdrm: fix crash when freeing bad fb
    staging:iio:ad7606: Re-add missing scale attribute
    iio: Fix potential use after free
    staging:iio: remove num_interrupt_lines from documentation
    iio: documentation: Add out_altvoltage and friends

    Linus Torvalds
     
  • Pull driver core and printk fixes from Greg Kroah-Hartman:
    "Here are some fixes for 3.5-rc4 that resolve the kmsg problems that
    people have reported showing up after the printk and kmsg changes went
    into 3.5-rc1. There are also a smattering of other tiny fixes for the
    extcon and hyper-v drivers that people have reported.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'driver-core-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()
    extcon: Set platform drvdata in gpio_extcon_probe() and fix irq leak
    extcon: Fix wrong index in max8997_extcon_cable[]
    kmsg - kmsg_dump() fix CONFIG_PRINTK=n compilation
    printk: return -EINVAL if the message len is bigger than the buf size
    printk: use mutex lock to stop syslog_seq from going wild
    kmsg - kmsg_dump() use iterator to receive log buffer content
    vme: change maintainer e-mail address
    Extcon: Don't try to create duplicate link names
    driver core: fixup reversed deferred probe order
    printk: Fix alignment of buf causing crash on ARM EABI
    Tools: hv: verify origin of netlink connector message

    Linus Torvalds
     
  • * emailed from Andrew Morton : (21 patches)
    mm/memblock: fix overlapping allocation when doubling reserved array
    c/r: prctl: Move PR_GET_TID_ADDRESS to a proper place
    pidns: find_new_reaper() can no longer switch to init_pid_ns.child_reaper
    pidns: guarantee that the pidns init will be the last pidns process reaped
    fault-inject: avoid call to random32() if fault injection is disabled
    Viresh has moved
    get_maintainer: Fix --help warning
    mm/memory.c: fix kernel-doc warnings
    mm: fix kernel-doc warnings
    mm: correctly synchronize rss-counters at exit/exec
    mm, thp: print useful information when mmap_sem is unlocked in zap_pmd_range
    h8300: use the declarations provided by
    h8300: fix use of extinct _sbss and _ebss
    xtensa: use the declarations provided by
    xtensa: use "test -e" instead of bashism "test -a"
    xtensa: replace xtensa-specific _f{data,text} by _s{data,text}
    memcg: fix use_hierarchy css_is_ancestor oops regression
    mm, oom: fix and cleanup oom score calculations
    nilfs2: ensure proper cache clearing for gc-inodes
    thp: avoid atomic64_read in pmd_read_atomic for 32bit PAE
    ...

    Linus Torvalds
     
  • do_exit() and exec_mmap() call sync_mm_rss() before mm_release() does
    put_user(clear_child_tid) which can update task->rss_stat and thus make
    mm->rss_stat inconsistent. This triggers the "BUG:" printk in check_mm().

    Let's fix this bug in the safest way, and optimize/cleanup this later.

    Reported-by: Markus Trippelsdorf
    Signed-off-by: Konstantin Khlebnikov
    Cc: Oleg Nesterov
    Cc: KAMEZAWA Hiroyuki
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     
  • A gc-inode is a pseudo inode used to buffer the blocks to be moved by
    garbage collection.

    Block caches of gc-inodes must be cleared every time a garbage collection
    function (nilfs_clean_segments) completes. Otherwise, stale blocks
    buffered in the caches may be wrongly reused in successive calls of the GC
    function.

    For user files, this is not a problem because their gc-inodes are
    distinguished by a checkpoint number as well as an inode number. They
    never buffer different blocks if either an inode number, a checkpoint
    number, or a block offset differs.

    However, gc-inodes of sufile, cpfile and DAT file can store different data
    for the same block offset. Thus, the nilfs_clean_segments function can
    move incorrect block for these meta-data files if an old block is cached.
    I found this is really causing meta-data corruption in nilfs.

    This fixes the issue by ensuring cache clear of gc-inodes and resolves
    reported GC problems including checkpoint file corruption, b-tree
    corruption, and the following warning during GC.

    nilfs_palloc_freev: entry number 307234 already freed.
    ...

    Signed-off-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc: [2.6.37+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Fengguang reports:

    [ 780.529603] XFS (vdd): Ending clean mount
    [ 781.454590] ODEBUG: object is on stack, but not annotated
    [ 781.455433] ------------[ cut here ]------------
    [ 781.455433] WARNING: at /c/kernel-tests/sound/lib/debugobjects.c:301 __debug_object_init+0x173/0x1f1()
    [ 781.455433] Hardware name: Bochs
    [ 781.455433] Modules linked in:
    [ 781.455433] Pid: 26910, comm: kworker/0:2 Not tainted 3.4.0+ #51
    [ 781.455433] Call Trace:
    [ 781.455433] [] warn_slowpath_common+0x83/0x9b
    [ 781.455433] [] warn_slowpath_null+0x1a/0x1c
    [ 781.455433] [] __debug_object_init+0x173/0x1f1
    [ 781.455433] [] debug_object_init+0x14/0x16
    [ 781.455433] [] __init_work+0x20/0x22
    [ 781.455433] [] xfs_alloc_vextent+0x6c/0xd5

    Use INIT_WORK_ONSTACK in xfs_alloc_vextent instead of INIT_WORK.

    Reported-by: Wu Fengguang
    Signed-off-by: Jie Liu
    Signed-off-by: Ben Myers

    Jeff Liu
     
  • On filesytems with a block size smaller than PAGE_SIZE we currently have
    a problem with unwritten extents. If a we have multi-block page for
    which an unwritten extent has been allocated, and only some of the
    buffers have been written to, and they are not contiguous, we can expose
    stale data from disk in the blocks between the writes after extent
    conversion.

    Example of a page with unwritten and real data.
    buffer content
    0 empty b_state = 0
    1 DATA b_state = 0x1023 Uptodate,Dirty,Mapped,Unwritten
    2 DATA b_state = 0x1023 Uptodate,Dirty,Mapped,Unwritten
    3 empty b_state = 0
    4 empty b_state = 0
    5 DATA b_state = 0x1023 Uptodate,Dirty,Mapped,Unwritten
    6 DATA b_state = 0x1023 Uptodate,Dirty,Mapped,Unwritten
    7 empty b_state = 0

    Buffers 1, 2, 5, and 6 have been written to, leaving 0, 3, 4, and 7
    empty. Currently buffers 1, 2, 5, and 6 are added to a single ioend,
    and when IO has completed, extent conversion creates a real extent from
    block 1 through block 6, leaving 0 and 7 unwritten. However buffers 3
    and 4 were not written to disk, so stale data is exposed from those
    blocks on a subsequent read.

    Fix this by setting iomap_valid = 0 when we find a buffer that is not
    Uptodate. This ensures that buffers 5 and 6 are not added to the same
    ioend as buffers 1 and 2. Later these blocks will be converted into two
    separate real extents, leaving the blocks in between unwritten.

    Signed-off-by: Alain Renaud
    Reviewed-by: Dave Chinner
    Signed-off-by: Ben Myers

    Alain Renaud
     
  • It was initially coded under the assumption that there would only be one
    request at a time, so use a lock to enforce this requirement..

    Signed-off-by: Bryan Schumaker
    CC: stable@vger.kernel.org [3.4+]
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     

20 Jun, 2012

4 commits


18 Jun, 2012

4 commits

  • Currently there is a 'chicken and egg' issue when the DS is also the mounted
    MDS. The nfs_match_client() reference from nfs4_set_ds_client bumps the
    cl_count, the nfs_client is not freed at umount, and nfs4_deviceid_purge_client
    is not called to dereference the MDS usage of a deviceid which holds a
    reference to the DS nfs_client. The result is the umount program returns,
    but the nfs_client is not freed, and the cl_session hearbeat continues.

    The MDS (and all other nfs mounts) lose their last nfs_client reference in
    nfs_free_server when the last nfs_server (fsid) is umounted.
    The file layout DS lose their last nfs_client reference in destroy_ds
    when the last deviceid referencing the data server is put and destroy_ds is
    called. This is triggered by a call to nfs4_deviceid_purge_client which
    removes references to a pNFS deviceid used by an MDS mount.

    The fix is to track how many pnfs enabled filesystems are mounted from
    this server, and then to purge the device id cache once that count reaches
    zero.

    Reported-by: Jorge Mora
    Reported-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • The asserts here never check anything because it uses '|' instead of
    '&'. Now if the flags are not set it prints a warning a a stack trace.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Artem Bityutskiy

    Dan Carpenter
     
  • HFS+ doesn't really implement hard links - instead, hardlinks are indicated
    by a magic file type which refers to an indirect node in a hidden
    directory. The spec indicates that stat() should return the inode number
    of the indirect node, but it turns out that this doesn't satisfy the
    firmware when it's looking for a bootloader - it wants the catalog ID of
    the hardlink file instead. Fix up this case.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • The variable io_size was unsigned int, which caused the wrong sector number
    to be calculated after aligning it. This then caused mount to fail with big
    volumes, as backup volume header information was searched from a
    wrong sector.

    Signed-off-by: Janne Kalliomäki
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Linus Torvalds

    Janne Kalliomäki
     

17 Jun, 2012

1 commit


16 Jun, 2012

3 commits

  • Pull NFS client bugfixes from Trond Myklebust:
    "Highlights include:

    - Fix a couple of mount regressions due to the recent cleanups.
    - Fix an Oops in the open recovery code
    - Fix an rpc_pipefs upcall hang that results from some of the net
    namespace work from 3.4.x (stable kernel candidate).
    - Fix a couple of write and o_direct regressions that were found at
    last weeks Bakeathon testing event in Ann Arbor."

    * tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: add an endian notation for sparse
    NFSv4.1: integer overflow in decode_cb_sequence_args()
    rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
    NFSv4 do not send an empty SETATTR compound
    NFSv2: EOF incorrectly set on short read
    NFS: Use the NFS_DEFAULT_VERSION for v2 and v3 mounts
    NFS: fix directio refcount bug on commit
    NFSv4: Fix unnecessary delegation returns in nfs4_do_open
    NFSv4.1: Convert another trivial printk into a dprintk
    NFS4: Fix open bug when pnfs module blacklisted
    NFS: Remove incorrect BUG_ON in nfs_found_client
    NFS: Map minor mismatch error to protocol not support error.
    NFS: Fix a commit bug
    NFS4: Set parsed mount data version to 4
    NFSv4.1: Ensure we clear session state flags after a session creation
    NFSv4.1: Convert a trivial printk into a dprintk
    NFSv4: Fix up decode_attr_mdsthreshold
    NFSv4: Fix an Oops in the open recovery code
    NFSv4.1: Fix a request leak on the back channel

    Linus Torvalds
     
  • Pull two nfsd bugfixes from J. Bruce Fields.

    * 'for-3.5' of git://linux-nfs.org/~bfields/linux:
    nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
    NFS: hard-code init_net for NFS callback transports

    Linus Torvalds
     
  • Avoid warning in 32 bit machines

    Signed-off-by: Chris Mason

    Chris Mason