21 May, 2011

1 commit

  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 May, 2011

1 commit

  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (44 commits)
    debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
    sysfs: remove "last sysfs file:" line from the oops messages
    drivers/base/memory.c: fix warning due to "memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION"
    memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
    SYSFS: Fix erroneous comments for sysfs_update_group().
    driver core: remove the driver-model structures from the documentation
    driver core: Add the device driver-model structures to kerneldoc
    Translated Documentation/email-clients.txt
    RAW driver: Remove call to kobject_put().
    reboot: disable usermodehelper to prevent fs access
    efivars: prevent oops on unload when efi is not enabled
    Allow setting of number of raw devices as a module parameter
    Introduce CONFIG_GOOGLE_FIRMWARE
    driver: Google Memory Console
    driver: Google EFI SMI
    x86: Better comments for get_bios_ebda()
    x86: get_bios_ebda_length()
    misc: fix ti-st build issues
    params.c: Use new strtobool function to process boolean inputs
    debugfs: move to new strtobool
    ...

    Fix up trivial conflicts in fs/debugfs/file.c due to the same patch
    being applied twice, and an unrelated cleanup nearby.

    Linus Torvalds
     

19 May, 2011

2 commits

  • No functional changes requires that we eat errors from strtobool.
    If people want to not do this, then it should be fixed at a later date.

    V2: Simplification suggested by Rusty Russell removes the need for
    additional variable ret.

    Signed-off-by: Jonathan Cameron
    Signed-off-by: Rusty Russell

    Jonathan Cameron
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
    configfs: Fix race between configfs_readdir() and configfs_d_iput()
    configfs: Don't try to d_delete() negative dentries.
    ocfs2/dlm: Target node death during resource migration leads to thread spin
    ocfs2: Skip mount recovery for hard-ro mounts
    ocfs2/cluster: Heartbeat mismatch message improved
    ocfs2/cluster: Increase the live threshold for global heartbeat
    ocfs2/dlm: Use negotiated o2dlm protocol version
    ocfs2: skip existing hole when removing the last extent_rec in punching-hole codes.
    ocfs2: Initialize data_ac (might be used uninitialized)

    Linus Torvalds
     

18 May, 2011

5 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: don't delay blk_run_queue_async
    scsi: remove performance regression due to async queue run
    blk-throttle: Use task_subsys_state() to determine a task's blkio_cgroup
    block: rescan partitions on invalidated devices on -ENOMEDIA too
    cdrom: always check_disk_change() on open
    block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers

    Linus Torvalds
     
  • configfs_readdir() will use the existing inode numbers of inodes in the
    dcache, but it makes them up for attribute files that aren't currently
    instantiated. There is a race where a closing attribute file can be
    tearing down at the same time as configfs_readdir() is trying to get its
    inode number.

    We want to get the inode number of open attribute files, because they
    should match while instantiated. We can't lock down the transition
    where dentry->d_inode is set to NULL, so we just check for NULL there.
    We can, however, ensure that an inode we find isn't iput() in
    configfs_d_iput() until after we've accessed it.

    Signed-off-by: Joel Becker

    Joel Becker
     
  • When configfs is faking mkdir() on its subsystem or default group
    objects, it starts by adding a negative dentry. It then tries to
    instantiate the group. If that should fail, it must clean up after
    itself.

    I was using d_delete() here, but configfs_attach_group() promises to
    return an empty dentry on error. d_delete() explodes with the entry
    dentry. Let's try d_drop() instead. The unhashing is what we want for
    our dentry.

    Signed-off-by: Joel Becker

    Joel Becker
     
  • As Metze pointed out, commit 84cdf74e broke mapchars option:

    Commit "cifs: fix unaligned accesses in cifsConvertToUCS"
    (84cdf74e8096a10dd6acbb870dd404b92f07a756) does multiple steps
    in just one commit (moving the function and changing it without
    testing).

    put_unaligned_le16(temp, &target[j]); is never called for any
    codepoint the goes via the 'default' switch statement. As a result
    we put just zero (or maybe uninitialized) bytes into the target
    buffer.

    His proposed patch looks correct, but doesn't apply to the current head
    of the tree. This patch should also fix it.

    Cc: # .38.x: 581ade4: cifs: clean up various nits in unicode routines (try #2)
    Reported-by: Stefan Metzmacher
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • The is_path_accessible check uses a QPathInfo call, which isn't
    supported by ancient win9x era servers. Fall back to an older
    SMBQueryInfo call if it fails with the magic error codes.

    Cc: stable@kernel.org
    Reported-and-Tested-by: Sandro Bonazzola
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

16 May, 2011

1 commit


15 May, 2011

5 commits

  • Steps to reproduce the bug:

    - Call FS_IOC_SETLFAGS ioctl with flags=FS_COMPR_FL
    - Call FS_IOC_SETFLAGS ioctl with flags=0
    - Call FS_IOC_GETFLAGS ioctl, and you'll see FS_COMPR_FL is still set!

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • As we've added per file compression/cow support.

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • FS_COW_FL and FS_NOCOW_FL were newly introduced to control per file
    COW in btrfs, but FS_NOCOW_FL is sufficient.

    The fact is we don't have corresponding BTRFS_INODE_COW flag.

    COW is default, and FS_NOCOW_FL can be used to switch off COW for
    a single file.

    If we mount btrfs with nodatacow, a newly created file will be set with
    the FS_NOCOW_FL flag. So to turn on COW for it, we can just clear the
    FS_NOCOW_FL flag.

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • When a btrfs disk is created by mixed data & metadata option, it will have no
    pure data or pure metadata space info.

    In btrfs's for-linus branch, commit 78b1ea13838039cd88afdd62519b40b344d6c920
    (Btrfs: fix OOPS of empty filesystem after balance) initializes space infos at
    the very beginning. The problem is this initialization does not take the mixed
    case into account, which will cause btrfs will easily get into ENOSPC in mixed
    case.

    Signed-off-by: Liu Bo
    Signed-off-by: Chris Mason

    liubo
     
  • If posix_acl_from_xattr() returns an error code, a negative address is
    dereferenced causing an oops; fix by checking for error code first.

    Signed-off-by: Daniel J Blueman
    Reviewed-by: Josef Bacik
    Signed-off-by: Chris Mason

    Daniel J Blueman
     

14 May, 2011

11 commits

  • Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
    warning:

    In file included from arch/x86/include/asm/uaccess.h:573,
    from include/linux/uaccess.h:5,
    from include/linux/highmem.h:7,
    from include/linux/pagemap.h:10,
    from fs/debugfs/file.c:18:
    In function 'copy_from_user',
    inlined from 'write_file_bool' at fs/debugfs/file.c:435:
    arch/x86/include/asm/uaccess_64.h:65: warning: call to
    'copy_from_user_overflow' declared with attribute warning:
    copy_from_user() buffer size is not provably correct

    presumably due to buf_size being signed causing GCC to fail to
    see that buf_size can't become negative.

    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     
  • On some arches (x86, sh, arm, unicore, powerpc) the oops message would
    print out the last sysfs file accessed.

    This was very useful in finding a number of sysfs and driver core bugs
    in the 2.5 and early 2.6 development days, but it has been a number of
    years since this file has actually helped in debugging anything that
    couldn't also be trivially determined from the stack traceback.

    So it's time to delete the line. This is good as we need all the space
    we can get for oops messages at times on consoles.

    Acked-by: Phil Carmody
    Acked-by: Ingo Molnar
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    NFSv4.1: Ensure that layoutget uses the correct gfp modes
    NFSv4.1: remove pnfs_layout_hdr from pnfs_destroy_all_layouts tmp_list
    NFSv41: Resend on NFS4ERR_RETRY_UNCACHED_REP

    Linus Torvalds
     
  • It's a hot function, and we're better off not mixing types in the mask
    calculations. The compiler just ends up mixing 16-bit and 32-bit
    operations, for no good reason.

    So do everything in 'unsigned int' rather than mixing 'unsigned int'
    masking with a 'umode_t' (16-bit) mode variable.

    This, together with the parent commit (47a150edc2ae: "Cache user_ns in
    struct cred") makes acl_permission_check() much nicer.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • During resource migration, if the target node were to die, the thread doing
    the migration spins until the target node is not removed from the domain map.
    This patch slows the spin by making the thread wait for the recovery to kick in.

    Signed-off-by: Sunil Mushran
    Signed-off-by: Joel Becker

    Sunil Mushran
     
  • Patch skips mount recovery for hard-ro mounts which otherwise leads to an oops.

    Signed-off-by: Sunil Mushran
    Acked-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Sunil Mushran
     
  • If o2hb finds unexpected values in the heartbeat slot, it prints a message
    "ERROR: Device "dm-6": another node is heartbeating in our slot!"

    This message could be misleading. This patch adds two more messages to
    help users better diagnose the problem.

    Signed-off-by: Sunil Mushran
    Acked-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Sunil Mushran
     
  • We have seen isolated cases (very few, I might add) of o2hb not detecting all
    live nodes on startup. One plausible reasoning for it is that other node had
    a hb io delay at the same time. The live threshold set at 2 (as low as it can
    be) could be increased to ameliorate the situation.

    But increasing the threshold directly affects mount time. Currently it takes
    around 5 secs to mount a volume in o2cb cluster with local heartbeat. Increasing
    the threshold will make mounts even slower. As the issue itself is rare, we have
    left things as they are for the local heartbeat mode.

    However we can improve the situation for global heartbeat mode as in that mode,
    we start the heartbeat much before the mount.

    This patch doubles the live threshold for the start of the first region in
    global heartbeat mode.

    Addresses internal Oracle bug#10635585.

    Signed-off-by: Sunil Mushran
    Acked-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Sunil Mushran
     
  • Patch fixes a bug in the o2dlm protocol negotiation in that it is using
    the builtin version rather than the negotiated version during the domain
    join. This causes join errors when a node having kernel >= 2.6.37 joins
    a cluster with nodes having kernels < 2.6.37.

    This only affects the o2cb cluster stack.

    Signed-off-by: Sunil Mushran
    Reported-by: Jacek Stepniewski
    Acked-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Sunil Mushran
     
  • In the case of removing a partial extent record which covers a hole, current
    punching-hole logic will try to remove more than the length of whole extent
    record, which leads to the failure of following assert(fs/ocfs2/alloc.c):

    5507 BUG_ON(cpos < le32_to_cpu(rec->e_cpos) || trunc_range > rec_range);

    This patch tries to skip existing hole at the last attempt of removing a partial
    extent record, what's more, it also adds some necessary comments for better
    understanding of punching-hole codes.

    Signed-off-by: Tristan Ye
    Signed-off-by: Joel Becker

    Tristan Ye
     
  • CLANG found that there is a path that has data_ac uninitialized,
    this place
    2917 /* This gets us the dx_root */
    2918 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac);
    2919 if (ret) {

    3
    Taking true branch
    2920 mlog_errno(ret);
    2921 goto out;

    4
    Control jumps to line 3168
    2922 }

    Goes to the out: label without data_ac being initialized.

    Ciao, Marcus

    Signed-Off-By: Marcus Meissner
    Signed-off-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Marcus Meissner
     

12 May, 2011

8 commits


11 May, 2011

2 commits


10 May, 2011

4 commits

  • Some cases (e.g. ecryptfs) can call ->dentry_revalidate with NULL
    nameidata.

    https://bugzilla.kernel.org/show_bug.cgi?id=34732

    Tyler Hicks pointed out that this bug was introduced by commit
    e7c0a16786 "fuse: make fuse_dentry_revalidate() RCU aware"

    Reported-by: Witold Baryluk
    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • After having applied commit 9954e7af14868b8b ("nilfs2: add free
    entries count only if clear bit operation succeeded"), a free routine
    of nilfs came to fall into an infinite loop, outputting the same
    message endlessly:

    nilfs_palloc_freev: entry number 29497 already freed
    nilfs_palloc_freev: entry number 29497 already freed
    nilfs_palloc_freev: entry number 29497 already freed
    nilfs_palloc_freev: entry number 29497 already freed
    nilfs_palloc_freev: entry number 29497 already freed ...

    That patch broke the routine so that a loop counter is never updated
    in an abnormal state. This fixes the regression.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     
  • The recent conversion of the xfsaild functionality to a work queue
    introduced a hard-to-hit log space grant hang. One is caused by a
    race condition in determining whether there is a psh in progress or
    not.

    The XFS_AIL_PUSHING_BIT is used to determine whether a push is
    currently in progress. When the AIL push work completes, it checked
    whether the target changed and cleared the PUSHING bit to allow a
    new push to be requeued. The race condition is as follows:

    Thread 1 push work

    smp_wmb()
    smp_rmb()
    check ailp->xa_target unchanged
    update ailp->xa_target
    test/set PUSHING bit
    does not queue
    clear PUSHING bit
    does not requeue

    Now that the push target is updated, new attempts to push the AIL
    will not trigger as the push target will be the same, and hence
    despite trying to push the AIL we won't ever wake it again.

    The fix is to ensure that the AIL push work clears the PUSHING bit
    before it checks if the target is unchanged.

    As a result, both push triggers operate on the same test/set bit
    criteria, so even if we race in the push work and miss the target
    update, the thread requesting the push will still set the PUSHING
    bit and queue the push work to occur. For safety sake, the same
    queue check is done if the push work detects the target change,
    though only one of the two will will queue new work due to the use
    of test_and_set_bit() checks.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Alex Elder

    (cherry picked from commit e4d3c4a43b595d5124ae824d300626e6489ae857)

    Dave Chinner
     
  • The recent conversion of the xfsaild functionality to a work queue
    introduced a hard-to-hit log space grant hang. One of the problems
    noticed was that updates of the push target are not 32 bit safe as
    the target is a 64 bit value.

    We cannot copy a 64 bit LSN without the possibility of corrupting
    the result when racing with another updating thread. We have
    function to do this update safely without needing to care about
    32/64 bit issues - xfs_trans_ail_copy_lsn() - so use that when
    updating the AIL push target.

    Also move the reading of the target in the push work inside the AIL
    lock, and use XFS_LSN_CMP() for the unlocked comparison during work
    termination to close read holes as well.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Alex Elder

    (cherry picked from commit fd5670f22fce247754243cf2ed41941e5762d990)

    Dave Chinner