20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

18 Jul, 2007

4 commits

  • * 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block:
    bsg: fix missing space in version print
    Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG
    bsg: Kconfig updates
    bsg: minor cleanup
    bsg: device hash table cleanup
    bsg: fix initialization error handling bugs
    bsg: mark FUJITA Tomonori as bsg maintainer
    bsg: convert to dynamic major
    bsg: address various review comments

    Linus Torvalds
     
  • Put WARN_ON and fixed all callers of unregister_blkdev(). Now we can make
    unregister_blkdev return void.

    Cc: Jens Axboe
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • When unregister_blkdev() has failed, something wrong happened. This patch
    adds WARN_ON to notify of such badness.

    Cc: Jens Axboe
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
    variant in the past. But with __GFP_ZERO it is possible now to do zeroing
    while allocating.

    Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
    we can.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

17 Jul, 2007

9 commits


16 Jul, 2007

22 commits


10 Jul, 2007

4 commits

  • elevator

    Signed-off-by: Matthias Kaehlcke
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Matthias Kaehlcke
     
  • instead of going through all options.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Jan Engelhardt
     
  • With the cfq_queue hash removal, we inadvertently got rid of the
    async queue sharing. This was not intentional, in fact CFQ purposely
    shares the async queue per priority level to get good merging for
    async writes.

    So put some logic in cfq_get_queue() to track the shared queues.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Barrier bios are completed twice - once after the barrier write itself
    is done and again after the whole sequence is complete.
    flush_dry_bio_endio() is for the first completion. It doesn't really
    complete the bio. It rewinds bvec and resets bio so that it can be
    completed again when the whole barrier sequence is complete.

    The bvec rewinding code has the following problems.

    1. The rewinding code is wrong because filesystems may pass bvec with
    non zero bv_offset.

    2. The block layer doesn't guarantee anything about the state of
    bvec array on request completion. bv_offset and len are updated
    iff __end_that_request_first() completes the bvec partially.

    Because of #2, #1 doesn't really matter (nobody cares whether bvec is
    re-wound correctly or not) but then again by not doing unwinding at
    all, we'll always give back the same bvec to the caller as full bvec
    completion doesn't alter bvecs and the final completion is always full
    completion.

    Drop unnecessary rewinding code.

    This is spotted by Neil Brown.

    Signed-off-by: Tejun Heo
    Cc: Neil Brown
    Signed-off-by: Jens Axboe

    Tejun Heo