1. 22 4月, 2011 3 次提交
    • T
      ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd · 7eec77a1
      Tejun Heo 提交于
      check_events() implementations in both ide-gd and ide-cd are
      inadequate for in-kernel event polling.  Both generate media change
      events continuously when certain conditions are met causing infinite
      event loop between the driver and userland event handler.
      
      As disk event now supports suppression of unlisted events, simply
      de-listing DISK_EVENT_MEDIA_CHANGE from disk->events resolves the
      problem.  Internal handling around media revalidation will behave the
      same while userland will fall back to userland event polling after
      detecting the device doesn't support disk events.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NJens Axboe <jaxboe@fusionio.com>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      7eec77a1
    • T
      block: don't propagate unlisted DISK_EVENTs to userland · 7c88a168
      Tejun Heo 提交于
      DISK_EVENT_MEDIA_CHANGE is used for both userland visible event and
      internal event for revalidation of removeable devices.  Some legacy
      drivers don't implement proper event detection and continuously
      generate events under certain circumstances.  For example, ide-cd
      generates media changed continuously if there's no media in the drive,
      which can lead to infinite loop of events jumping back and forth
      between the driver and userland event handler.
      
      This patch updates disk event infrastructure such that it never
      propagates events not listed in disk->events to userland.  Those
      events are processed the same for internal purposes but uevent
      generation is suppressed.
      
      This also ensures that userland only gets events which are advertised
      in the @events sysfs node lowering risk of confusion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      7c88a168
    • J
      elevator: check for ELEVATOR_INSERT_SORT_MERGE in !elvpriv case too · 3aa72873
      Jens Axboe 提交于
      The sort insert is the one that goes to the IO scheduler. With
      the SORT_MERGE addition, we could bypass IO scheduler setup
      but still ask the IO scheduler to insert the request. This would
      cause an oops on switching IO schedulers through the sysfs
      interface, unless the disk just happened to be idle while it
      occured.
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      3aa72873
  2. 21 4月, 2011 6 次提交
  3. 20 4月, 2011 25 次提交
  4. 19 4月, 2011 6 次提交