13 Apr, 2010

8 commits


12 Apr, 2010

1 commit


10 Apr, 2010

1 commit

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block: (34 commits)
    cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
    loop: Update mtime when writing using aops
    block: expose the statistics in blkio.time and blkio.sectors for the root cgroup
    backing-dev: Handle class_create() failure
    Block: Fix block/elevator.c elevator_get() off-by-one error
    drbd: lc_element_by_index() never returns NULL
    cciss: unlock on error path
    cfq-iosched: Do not merge queues of BE and IDLE classes
    cfq-iosched: Add additional blktrace log messages in CFQ for easier debugging
    i2o: Remove the dangerous kobj_to_i2o_device macro
    block: remove 16 bytes of padding from struct request on 64bits
    cfq-iosched: fix a kbuild regression
    block: make CONFIG_BLK_CGROUP visible
    Remove GENHD_FL_DRIVERFS
    block: Export max number of segments and max segment size in sysfs
    block: Finalize conversion of block limits functions
    block: Fix overrun in lcm() and move it to lib
    vfs: improve writeback_inodes_wb()
    paride: fix off-by-one test
    drbd: fix al-to-on-disk-bitmap for 4k logical_block_size
    ...

    Linus Torvalds
     

09 Apr, 2010

1 commit


08 Apr, 2010

3 commits

  • generic setattr not longer responsible for quota transfer.
    use udf_setattr for all udf's inodes.

    Signed-off-by: Dmitry Monakhov
    Signed-off-by: Jan Kara

    Dmitry Monakhov
     
  • bloc->logicalBlockNum is unsigned so it's never less than zero.

    When I saw that, it made me worry that "bloc->logicalBlockNum + count"
    could overflow. That's why I changed the check for less than zero
    to an overflow check. (The test works because "count" is also
    unsigned.)

    Signed-off-by: Dan Carpenter
    Signed-off-by: Jan Kara

    Dan Carpenter
     
  • If nfs atomic open implementation ends up doing open request from
    ->d_revalidate() codepath and gets an error from server, return that error
    to caller explicitly and don't bother with lookup_instantiate_filp() at all.
    ->d_revalidate() can return an error itself just fine...

    See
    http://bugzilla.kernel.org/show_bug.cgi?id=15674
    http://marc.info/?l=linux-kernel&m=126988782722711&w=2

    for original report.

    Reported-by: Daniel J Blueman
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

07 Apr, 2010

5 commits

  • Order the debugfs statistics correctly. The values displayed through a
    seq_printf() statement should be in the same order as the names in the
    format string.

    In the 'Lookups' line, objects created ('crt=') and lookups timed out
    ('tmo=') have their values transposed.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • When we look into pagemap using page-types with option -p, the value of
    pfn for hugepages looks wrong (see below.) This is because pte was
    evaluated only once for one vma although it should be updated for each
    hugepage. This patch fixes it.

    $ page-types -p 3277 -Nl -b huge
    voffset offset len flags
    7f21e8a00 11e400 1 ___U___________H_G________________
    7f21e8a01 11e401 1ff ________________TG________________
    ^^^
    7f21e8c00 11e400 1 ___U___________H_G________________
    7f21e8c01 11e401 1ff ________________TG________________
    ^^^

    One hugepage contains 1 head page and 511 tail pages in x86_64 and each
    two lines represent each hugepage. Voffset and offset mean virtual
    address and physical address in the page unit, respectively. The
    different hugepages should not have the same offset value.

    With this patch applied:

    $ page-types -p 3386 -Nl -b huge
    voffset offset len flags
    7fec7a600 112c00 1 ___UD__________H_G________________
    7fec7a601 112c01 1ff ________________TG________________
    ^^^
    7fec7a800 113200 1 ___UD__________H_G________________
    7fec7a801 113201 1ff ________________TG________________
    ^^^
    OK

    More info:

    - This patch modifies walk_page_range()'s hugepage walker. But the
    change only affects pagemap_read(), which is the only caller of hugepage
    callback.

    - Without this patch, hugetlb_entry() callback is called per vma, that
    doesn't match the natural expectation from its name.

    - With this patch, hugetlb_entry() is called per hugepte entry and the
    callback can become much simpler.

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

    Naoya Horiguchi
     
  • Requested by hch, for consistency now it is exported.

    Cc: Alexander Viro
    Cc: Anton Blanchard
    Cc: Christoph Hellwig
    Cc: Jan Kara
    Cc: Jeff Moyer
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Commit 148f948ba877f4d3cdef036b1ff6d9f68986706a (vfs: Introduce new
    helpers for syncing after writing to O_SYNC file or IS_SYNC inode) broke
    the raw driver.

    We now call through generic_file_aio_write -> generic_write_sync ->
    vfs_fsync_range. vfs_fsync_range has:

    if (!fop || !fop->fsync) {
    ret = -EINVAL;
    goto out;
    }

    But drivers/char/raw.c doesn't set an fsync method.

    We have two options: fix it or remove the raw driver completely. I'm
    happy to do either, the fact this has been broken for so long suggests it
    is rarely used.

    The patch below adds an fsync method to the raw driver. My knowledge of
    the block layer is pretty sketchy so this could do with a once over.

    If we instead decide to remove the raw driver, this patch might still be
    useful as a backport to 2.6.33 and 2.6.32.

    Signed-off-by: Anton Blanchard
    Reviewed-by: Jan Kara
    Cc: Christoph Hellwig
    Cc: Alexander Viro
    Cc: Jens Axboe
    Reviewed-by: Jeff Moyer
    Tested-by: Jeff Moyer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • If we have preventing lock, cifs should overwrite file_lock structure
    with info about preventing lock. If we haven't preventing lock, cifs
    should leave it unchanged except for the lock type (change it to F_UNLCK).

    Signed-off-by: Pavel Shilovsky
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Pavel Shilovsky
     

06 Apr, 2010

10 commits

  • copy_to_user() returns the number of bytes left to be copied.

    This was a typo from: d82ef020cf31 "proc: pagemap: Hold mmap_sem during
    page walk".

    Signed-off-by: Dan Carpenter
    Acked-by: Matt Mackall
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • A recent commit allowed for smaller chunks to be created, but didn't
    make sure they were always bigger than a stripe. After some divides,
    this led to zero length stripes.

    Signed-off-by: Chris Mason

    Chris Mason
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
    9p: saving negative to unsigned char
    9p: return on mutex_lock_interruptible()
    9p: Creating files with names too long should fail with ENAMETOOLONG.
    9p: Make sure we are able to clunk the cached fid on umount
    9p: drop nlink remove
    fs/9p: Clunk the fid resulting from partial walk of the name
    9p: documentation update
    9p: Fix setting of protocol flags in v9fs_session_info structure.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: add check for changed leaves in setup_leaf_for_split
    Btrfs: create snapshot references in same commit as snapshot
    Btrfs: fix small race with delalloc flushing waitqueue's
    Btrfs: use add_to_page_cache_lru, use __page_cache_alloc
    Btrfs: fix chunk allocate size calculation
    Btrfs: kill max_extent mount option
    Btrfs: fail to mount if we have problems reading the block groups
    Btrfs: check btrfs_get_extent return for IS_ERR()
    Btrfs: handle kmalloc() failure in inode lookup ioctl
    Btrfs: dereferencing freed memory
    Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk()
    Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree()
    Btrfs: Remove unnecessary finish_wait() in wait_current_trans()
    Btrfs: add NULL check for do_walk_down()
    Btrfs: remove duplicate include in ioctl.c

    Fix trivial conflict in fs/btrfs/compression.c due to slab.h include
    cleanups.

    Linus Torvalds
     
  • Because we account for reserved space we get from the allocator before we
    actually account for allocating delalloc space, we can have a small window where
    the amount of "used" space in a space_info is more than the total amount of
    space in the space_info. This will cause a overflow in our check, so it will
    seem like we have _tons_ of free space, and we'll allow reservations to occur
    that will end up larger than the amount of space we have. I've seen users
    report ENOSPC panic's in cow_file_range a few times recently, so I tried to
    reproduce this problem and found I could reproduce it if I ran one of my tests
    in a loop for like 20 minutes. With this patch my test ran all night without
    issues. Thanks,

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

    Josef Bacik
     
  • If "err" is -EINTR here the original code calls mutex_unlock() and then
    returns, but it should just return directly.

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

    ------------------------------------------------------------------------------
    Download Intel® Parallel Studio Eval
    Try the new software tools for yourself. Speed compiling, find bugs
    proactively, and fine-tune applications for parallel performance.
    See why Intel Parallel Studio got high marks during beta.
    http://p.sf.net/sfu/intel-sw-dev

    Dan Carpenter
     
  • setup_leaf_for_split needs to drop the path and search again, and has
    checks to see if the item we want to split changed size. But, it misses
    the case where the leaf changed and now has enough room for the item
    we want to insert.

    This adds an extra check to make sure the leaf really needs splitting
    before we call btrfs_split_leaf(), which keeps us from trying to split
    a leaf with a single item.

    btrfs_split_leaf() will blindly split the single item leaf, leaving us
    with one good leaf and one empty leaf and then a crash.

    Signed-off-by: Chris Mason

    Chris Mason
     
  • This creates the reference to a new snapshot in the same commit as the
    snapshot itself. This avoids the need for a second commit in order for a
    snapshot to be persistent, and also avoids the problem of "leaking" a
    new snapshot tree root if the host crashes before the second commit takes
    place.

    It is not at all clear to me why it wasn't always done this way. If there
    is still a reason for the two-stage {create,finish}_pending_snapshots()
    approach I'm missing something! :)

    I've been running this for a couple weeks under pretty heavy usage (a few
    snapshots per minute) without obvious problems.

    Signed-off-by: Sage Weil
    Signed-off-by: Chris Mason

    Sage Weil
     
  • Everytime we start a new flushing thread, we init the waitqueue if there isn't a
    flushing thread running. The problem with this is we check
    space_info->flushing, which we clear right before doing a wake_up on the
    flushing waitqueue, which causes problems if we init the waitqueue in the middle
    of clearing the flushing flagh and calling wake_up. This is hard to hit, but
    the code is wrong anyway, so init the flushing/allocating waitqueue when
    creating the space info and let it be. I haven't seen the panic since I've been
    using this patch. Thanks,

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

    Josef Bacik
     
  • Pagecache pages should be allocated with __page_cache_alloc, so they
    obey pagecache memory policies.

    add_to_page_cache_lru is exported, so it should be used. Benefits over
    using a private pagevec: neater code, 128 bytes fewer stack used, percpu
    lru ordering is preserved, and finally don't need to flush pagevec
    before returning so batching may be shared with other LRU insertions.

    Signed-off-by: Nick Piggin :
    Signed-off-by: Chris Mason

    Nick Piggin
     

05 Apr, 2010

7 commits


04 Apr, 2010

2 commits

  • While chasing a bug report involving a OS/2 server, I noticed the server sets
    pSMBr->CountHigh to a incorrect value even in case of normal writes. This
    results in 'nbytes' being computed wrongly and triggers a kernel BUG at
    mm/filemap.c.

    void iov_iter_advance(struct iov_iter *i, size_t bytes)
    {
    BUG_ON(i->count < bytes);
    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     
  • By doing this we always overwrite nbytes value that is being passed on to
    CIFSSMBWrite() and need not rely on the callers to initialize. CIFSSMBWrite2 is
    doing this already.

    CC: Stable
    Reviewed-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Steve French
     

03 Apr, 2010

1 commit


02 Apr, 2010

1 commit

  • `make CONFIG_NILFS2_FS=m M=fs/nilfs2/` will give the following warnings:

    fs/nilfs2/btree.c: In function 'nilfs_btree_propagate':
    fs/nilfs2/btree.c:1882: warning: 'maxlevel' may be used uninitialized in this function
    fs/nilfs2/btree.c:1882: note: 'maxlevel' was declared here

    Set maxlevel = 0 to fix it.

    Signed-off-by: Li Hong
    Signed-off-by: Ryusuke Konishi

    Li Hong