1. 17 3月, 2011 7 次提交
  2. 12 3月, 2011 4 次提交
  3. 10 3月, 2011 29 次提交
    • J
      Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core · 4c63f564
      Jens Axboe 提交于
      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: NJens Axboe <jaxboe@fusionio.com>
      4c63f564
    • V
      blk-throttle: Use blk_plug in throttle dispatch · 69d60eb9
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      69d60eb9
    • J
      block: kill off REQ_UNPLUG · 721a9602
      Jens Axboe 提交于
      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: NJens Axboe <jaxboe@fusionio.com>
      721a9602
    • J
      aio: remove request submission batching · cf15900e
      Jens Axboe 提交于
      This should be useless now that we have on-stack plugging. So lets just
      kill it.
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      cf15900e
    • S
      fs: make aio plug · 9f5b9425
      Shaohua Li 提交于
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      9f5b9425
    • J
      fs: make mpage read/write_pages() plug · 2ed1a6bc
      Jens Axboe 提交于
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      2ed1a6bc
    • J
      read-ahead: use plugging · 5b417b18
      Jens Axboe 提交于
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      5b417b18
    • J
      fs: make generic file read/write functions plug · 55602dd6
      Jens Axboe 提交于
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      55602dd6
    • J
      block: remove per-queue plugging · 7eaceacc
      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: NJens Axboe <jaxboe@fusionio.com>
      7eaceacc
    • J
      block: initial patch for on-stack per-task plugging · 73c10101
      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: NJens Axboe <jaxboe@fusionio.com>
      73c10101
    • J
      scsi: convert to blk_delay_queue() · a488e749
      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: NJens Axboe <jaxboe@fusionio.com>
      a488e749
    • J
      ide-cd: convert to blk_delay_queue() for a short pause · 0a41e90b
      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: NJens Axboe <jaxboe@fusionio.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      0a41e90b
    • J
      block: add API for delaying work/request_fn a little bit · 3cca6dc1
      Jens Axboe 提交于
      Currently we use plugging for that, but as plugging is going away,
      we need an alternative mechanism.
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      3cca6dc1
    • T
      staging: Convert to bdops->check_events() · cafb0bfc
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      cafb0bfc
    • T
      pktcdvd: Convert to bdops->check_events() · 3c0d2060
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Peter Osterlund <petero2@telia.com>
      3c0d2060
    • T
      umem: Drop dummy ->media_changed() · 6fac80e3
      Tejun Heo 提交于
      umem doesn't implement media changed detection and there's no need to
      implement dummy callback anymore.  Remove it.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      6fac80e3
    • T
      s390/tape_block: Convert to bdops->check_events() · ffe80cea
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      ffe80cea
    • T
      i2o_block: Convert to bdops->check_events() · f47350fd
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      f47350fd
    • T
      xsysace: Convert to bdops->check_events() · 3a200911
      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: NTejun Heo <tj@kernel.org>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      3a200911
    • T
      ub: Convert to bdops->check_events() · aaa7c015
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      aaa7c015
    • T
      swim[3]: Convert to bdops->check_events() · 4bbde777
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Laurent Vivier <laurent@lvivier.info>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      4bbde777
    • T
      dac960: Convert to bdops->check_events() · 507daea2
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      507daea2
    • T
      paride: Convert to bdops->check_events() · b1b56b93
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Tim Waugh <tim@cyberelk.net>
      b1b56b93
    • T
      gdrom,viocd: Convert to bdops->check_events() · 1c27030b
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      1c27030b
    • T
      floppy,{ami|ata}flop: Convert to bdops->check_events() · 1a8a74f0
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      1a8a74f0
    • T
      ide: Convert to bdops->check_events() · 5b03a1b1
      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: NTejun Heo <tj@kernel.org>
      Acked-by: NJens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-ide@vger.kernel.org
      5b03a1b1
    • T
      block: Don't check events while open is in progress · 69e02c59
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      69e02c59
    • T
      block: Don't check events on close unless it was blocked · 6936217c
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      6936217c
    • T
      block: Don't implicitly trigger event check on disk_unblock_events() · facc31dd
      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: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      facc31dd