12 Mar, 2011

4 commits


10 Mar, 2011

29 commits

  • Conflicts:
    block/blk-core.c
    block/blk-flush.c
    drivers/md/raid1.c
    drivers/md/raid10.c
    drivers/md/raid5.c
    fs/nilfs2/btnode.c
    fs/nilfs2/mdt.c

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Use plug in throttle dispatch also as we are dispatching a bunch of
    bios in throttle context and some of them might merge.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Jens Axboe

    Vivek Goyal
     
  • With the plugging now being explicitly controlled by the
    submitter, callers need not pass down unplugging hints
    to the block layer. If they want to unplug, it's because they
    manually plugged on their own - in which case, they should just
    unplug at will.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This should be useless now that we have on-stack plugging. So lets just
    kill it.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Signed-off-by: Shaohua Li
    Signed-off-by: Jens Axboe

    Shaohua Li
     
  • Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This patch adds support for creating a queuing context outside
    of the queue itself. This enables us to batch up pieces of IO
    before grabbing the block device queue lock and submitting them to
    the IO scheduler.

    The context is created on the stack of the process and assigned in
    the task structure, so that we can auto-unplug it if we hit a schedule
    event.

    The current queue plugging happens implicitly if IO is submitted to
    an empty device, yet callers have to remember to unplug that IO when
    they are going to wait for it. This is an ugly API and has caused bugs
    in the past. Additionally, it requires hacks in the vm (->sync_page()
    callback) to handle that logic. By switching to an explicit plugging
    scheme we make the API a lot nicer and can get rid of the ->sync_page()
    hack in the vm.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • It was always abuse to reuse the plugging infrastructure for this,
    convert it to the (new) real API for delaying queueing a bit. A
    default delay of 3 msec is defined, to match the previous
    behaviour.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • It was always abuse to reuse the plugging infrastructure for this,
    convert it to the (new) real API for delaying queueing a bit.

    Signed-off-by: Jens Axboe
    Acked-by: David S. Miller

    Jens Axboe
     
  • Currently we use plugging for that, but as plugging is going away,
    we need an alternative mechanism.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Convert two staging drivers - blkvsc_drv and cyasblkdev_block - from
    ->media_changed() to ->check_events(). The former always indicated
    media changed while the latter always indicated media not changed.
    Not sure what the drivers are trying to achieve but keep the original
    behavior.

    Signed-off-by: Tejun Heo
    Acked-by: Greg Kroah-Hartman
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    pktcdvd needs to forward all event related operations to the
    underlying device. Forward ->check_events() instead of
    ->media_changed() and inherit disk->[async_]events.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Peter Osterlund

    Tejun Heo
     
  • umem doesn't implement media changed detection and there's no need to
    implement dummy callback anymore. Remove it.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    s390/tape_block buffers media changed state and clears it on
    revalidation. It will behave correctly with kernel event polling.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    i2o_block buffers media changed state and clears it after reporting.
    It will behave correctly with kernel event polling.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Markus Lidel

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    xsysace buffers media changed state and clears it on revalidation. It
    will behave correctly with kernel event polling.

    Signed-off-by: Tejun Heo
    Acked-by: Grant Likely
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    ub buffers media changed state and clears it on revalidation. It will
    behave correctly with kernel event polling.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Pete Zaitcev

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    Both swim and swim3 buffer media changed state and clear it on
    revalidation. They will behave correctly with kernel event polling.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Laurent Vivier
    Cc: Benjamin Herrenschmidt

    Tejun Heo
     
  • Convert from ->media_changed() to ->check_events().

    DAC960 media change notification seems to be one way (once set, never
    cleared) and will generate spurious events when polled once the
    condition triggers.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert paride drivers from ->media_changed() to ->check_events().

    pcd and pd buffer and clear events after reporting; however, pf
    unconditionally reports MEDIA_CHANGE and will generate spurious events
    when polled.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers
    Cc: Tim Waugh

    Tejun Heo
     
  • Convert gdrom and viocd from ->media_changed() to ->check_events().

    It's unclear how the conditions are cleared and it's possible that it
    may generate spurious events when polled.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert the floppy drivers from ->media_changed() to ->check_events().
    Both floppy and ataflop buffer media changed state bit and clear them
    on revalidation and will behave correctly with kernel event polling.

    I can't tell how amiflop clears its event and it's possible that it
    may generate spurious events when polled.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Convert ->media_changed() to the new ->check_events() method. The
    conversion is mostly mechanical. The only notable change is that
    cdrom now doesn't generate any event if @slot_nr isn't CDSL_CURRENT.
    It used to return -EINVAL which would be treated as media changed. As
    media changer isn't supported anyway, this doesn't make any
    difference.

    This makes ide emit the standard disk events and allows kernel event
    polling. Currently, only MEDIA_CHANGE event is implemented. Adding
    support for EJECT_REQUEST shouldn't be difficult; however, given that
    ide driver is already deprecated, it probably is best to leave it
    alone.

    Signed-off-by: Tejun Heo
    Acked-by: Jens Axboe
    Cc: Kay Sievers
    Cc: "David S. Miller"
    Cc: linux-ide@vger.kernel.org

    Tejun Heo
     
  • Not all block drivers clear events immediately after reporting. Some
    do so in ->revalidate_disk() or other steps during ->open(). There is
    a slim chance event poll may happen between the clearing event check
    from check_disk_change() and the actual clearing of the events which
    would result in spurious events.

    Block event checks while block device open is in progress. There is
    no need to kick explicit event check afterwards as events are always
    checked during open.

    -v2: The original patch could have called disk_unblock_events() with
    an already released or %NULL @disk causing oops. Fixed by making
    sure references are put after disk_unblock_events() is called.
    It also makes the error path of __blkdev_get() a bit simpler.
    This problem was reported by Jens.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • The block event mechanism currently always checks events when the
    device is being closed regardless of the open mode. The intention was
    to allow detection of EJECT_REQUEST when a device is closed whether
    disk event polling is enabled or not.

    This is unnecessary as, for devices of interest, events are checked
    from either userland or kernel and in the former case ->check_events()
    is performed on open of each poll attempt anyway. Furthermore, this
    unconditional event check on close makes the code susceptible to event
    loop if the block driver doesn't clear reported events correctly - an
    event triggers userland to open and close the device which in turn
    causes another event, rinse and repeat.

    Check events on close only if it was blocked by excl write open.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     
  • Currently, disk_unblock_events() implicitly kick event check if the
    block count reaches zero. This behavior is not described in the
    comment and hinders with future changes. Make the unblocker
    explicitly check events by calling disk_check_events() as necessary.

    This patch doesn't cause any behavior difference.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Cc: Kay Sievers

    Tejun Heo
     

09 Mar, 2011

1 commit


08 Mar, 2011

3 commits

  • The block integrity subsystem no longer uses the bio_vec slabs so this
    code can safely be compiled in.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     
  • When throttle group limits are updated through cgroups, a thread is
    woken up to process these updates. While reviewing that code, oleg noted
    couple of race conditions existed in the code and he also suggested that
    code can be simplified.

    This patch fixes the races simplifies the code based on Oleg's suggestions:

    - Use xchg().
    - Introduced a common function throtl_update_blkio_group_common()
    which is shared now by all iops/bps update functions.

    Reviewed-by: Oleg Nesterov
    Reviewed-by: Paul E. McKenney
    Signed-off-by: Vivek Goyal

    Fixed a merge issue, throtl_schedule_delayed_work() takes throtl_data
    as the argument now, not the queue.

    Signed-off-by: Jens Axboe

    Vivek Goyal
     
  • With the help of cgroup interface one can go and upate the bps/iops
    limits of existing group. Once the limits are udpated, a thread is
    woken up to see if some blocked group needs recalculation based on new
    limits and needs to be requeued.

    There was also a piece of code where I was checking for group limit
    update when a fresh bio comes in. This patch gets rid of that piece of
    code and keeps processing the limit change at one place
    throtl_process_limit_change(). It just keeps the code simple and easy
    to understand.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Jens Axboe

    Vivek Goyal
     

07 Mar, 2011

3 commits