25 May, 2010

3 commits

  • When wb_writeback() hasn't written anything it will re-acquire the inode
    lock before calling inode_wait_for_writeback.

    This change tests the sync bit first so that is doesn't need to drop &
    re-acquire the lock if the inode became available while wb_writeback() was
    waiting to get the lock.

    Signed-off-by: Richard Kennedy
    Cc: Alexander Viro
    Cc: Jens Axboe
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Kennedy
     
  • …tion by not migrating temporary stacks

    Page migration requires rmap to be able to find all ptes mapping a page
    at all times, otherwise the migration entry can be instantiated, but it
    is possible to leave one behind if the second rmap_walk fails to find
    the page. If this page is later faulted, migration_entry_to_page() will
    call BUG because the page is locked indicating the page was migrated by
    the migration PTE not cleaned up. For example

    kernel BUG at include/linux/swapops.h:105!
    invalid opcode: 0000 [#1] PREEMPT SMP
    ...
    Call Trace:
    [<ffffffff810e951a>] handle_mm_fault+0x3f8/0x76a
    [<ffffffff8130c7a2>] do_page_fault+0x44a/0x46e
    [<ffffffff813099b5>] page_fault+0x25/0x30
    [<ffffffff8114de33>] load_elf_binary+0x152a/0x192b
    [<ffffffff8111329b>] search_binary_handler+0x173/0x313
    [<ffffffff81114896>] do_execve+0x219/0x30a
    [<ffffffff8100a5c6>] sys_execve+0x43/0x5e
    [<ffffffff8100320a>] stub_execve+0x6a/0xc0
    RIP [<ffffffff811094ff>] migration_entry_wait+0xc1/0x129

    There is a race between shift_arg_pages and migration that triggers this
    bug. A temporary stack is setup during exec and later moved. If
    migration moves a page in the temporary stack and the VMA is then removed
    before migration completes, the migration PTE may not be found leading to
    a BUG when the stack is faulted.

    This patch causes pages within the temporary stack during exec to be
    skipped by migration. It does this by marking the VMA covering the
    temporary stack with an otherwise impossible combination of VMA flags.
    These flags are cleared when the temporary stack is moved to its final
    location.

    [kamezawa.hiroyu@jp.fujitsu.com: idea for having migration skip temporary stacks]
    Signed-off-by: Mel Gorman <mel@csn.ul.ie>
    Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Reviewed-by: Rik van Riel <riel@redhat.com>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Minchan Kim <minchan.kim@gmail.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Mel Gorman
     
  • If !CONFIG_HUGETLB_PAGE, pagemap_hugetlb_range() is never called. So put
    it (and its calling function) into #ifdef block.

    Signed-off-by: Naoya Horiguchi
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     

24 May, 2010

5 commits

  • * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
    uml: Pushdown the bkl from harddog_kern ioctl
    sunrpc: Pushdown the bkl from sunrpc cache ioctl
    sunrpc: Pushdown the bkl from ioctl
    autofs4: Pushdown the bkl from ioctl
    uml: Convert to unlocked_ioctls to remove implicit BKL
    ncpfs: BKL ioctl pushdown
    coda: Clean-up whitespace problems in pioctl.c
    coda: BKL ioctl pushdown
    drivers: Push down BKL into various drivers
    isdn: Push down BKL into ioctl functions
    scsi: Push down BKL into ioctl functions
    dvb: Push down BKL into ioctl functions
    smbfs: Push down BKL into ioctl function
    coda/psdev: Remove BKL from ioctl function
    um/mmapper: Remove BKL usage
    sn_hwperf: Kill BKL usage
    hfsplus: Push down BKL into ioctl function

    Linus Torvalds
     
  • * 'for-linus' of git://git.open-osd.org/linux-open-osd:
    exofs: confusion between kmap() and kmap_atomic() api
    exofs: Add default address_space_operations

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
    fat: convert to unlocked_ioctl
    fat: Cleanup nls_unload() usage
    fat: use pack_hex_byte() instead of custom one

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
    9p: Optimize TCREATE by eliminating a redundant fid clone.
    9p: cleanup: remove unneeded assignment
    9p: Add mksock support
    fs/9p: Make sure we properly instantiate dentry.
    9p: add 9P2000.L rename operation
    9p: add 9P2000.L statfs operation
    9p: VFS switches for 9p2000.L: VFS switches
    9p: VFS switches for 9p2000.L: protocol and client changes

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (59 commits)
    ceph: reuse mon subscribe message instead of allocated anew
    ceph: avoid resending queued message to monitor
    ceph: Storage class should be before const qualifier
    ceph: all allocation functions should get gfp_mask
    ceph: specify max_bytes on readdir replies
    ceph: cleanup pool op strings
    ceph: Use kzalloc
    ceph: use common helper for aborted dir request invalidation
    ceph: cope with out of order (unsafe after safe) mds reply
    ceph: save peer feature bits in connection structure
    ceph: resync headers with userland
    ceph: use ceph. prefix for virtual xattrs
    ceph: throw out dirty caps metadata, data on session teardown
    ceph: attempt mds reconnect if mds closes our session
    ceph: clean up send_mds_reconnect interface
    ceph: wait for mds OPEN reply to indicate reconnect success
    ceph: only send cap releases when mds is OPEN|HUNG
    ceph: dicard cap releases on mds restart
    ceph: make mon client statfs handling more generic
    ceph: drop src address(es) from message header [new protocol feature]
    ...

    Linus Torvalds
     

23 May, 2010

4 commits

  • This patch removes a redundant fid clone on the directory fid and hence
    reduces a server transaction while creating new filesystem object.

    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Venkateswararao Jujjuri
     
  • We never use "v9ses" and so we can remove it.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Eric Van Hensbergen

    Dan Carpenter
     
  • Without this patch, an attempt to mksock will get an EINVAL.

    Before this patch:
    [root@localhost 1dir]# mksock mysock
    mksock: error making mysock: Invalid argument

    With this patch:
    [root@localhost 1dir]# mksock mysock
    [root@localhost 1dir]# ls -l mysock
    s--------- 1 root root 0 2010-03-31 17:44 mysock

    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Venkateswararao Jujjuri
     
  • For lookup if we get ENOENT error from the server we still
    instantiate the dentry. We need to make sure we have dentry
    operations set in that case so that a later dput on the dentry
    does the expected. Without the patch we get the below error

    #ln -sf abc abclink
    ln: creating symbolic link `abclink': No such file or directory

    Now on the host do
    $ touch abclink

    Guest now gives ENOENT error.
    # ls
    ls: cannot access abclink: No such file or directory

    Debugged-by:Gautham R Shenoy
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     

22 May, 2010

28 commits