1. 07 7月, 2011 2 次提交
  2. 02 7月, 2011 1 次提交
    • J
      compat_ioctl: fix warning caused by qemu · 390192b3
      Johannes Stezenbach 提交于
      On Linux x86_64 host with 32bit userspace, running
      qemu or even just "qemu-img create -f qcow2 some.img 1G"
      causes a kernel warning:
      
      ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img
      ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} arg(fff77350) on some.img
      
      ioctl 00005326 is CDROM_DRIVE_STATUS,
      ioctl 801c0204 is FDGETPRM.
      
      The warning appears because the Linux compat-ioctl handler for these
      ioctls only applies to block devices, while qemu also uses the ioctls on
      plain files.
      Signed-off-by: NJohannes Stezenbach <js@sig21.net>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      390192b3
  3. 01 7月, 2011 2 次提交
    • T
      block: flush MEDIA_CHANGE from drivers on close(2) · 85ef06d1
      Tejun Heo 提交于
      Currently, only open(2) is defined as the 'clearing' point.  It has
      two roles - first, it's an acknowledgement from userland indicating
      that the event has been received and kernel can clear pending states
      and proceed to generate more events.  Secondly, it's passed on to
      device drivers as a hint indicating that a synchronization point has
      been reached and it might want to take a deeper look at the device.
      
      The latter currently is only used by sr which uses two different
      mechanisms - GET_EVENT_MEDIA_STATUS_NOTIFICATION and TEST_UNIT_READY
      to discover events, where the former is lighter weight and safe to be
      used repeatedly but may not provide full coverage.  Among other
      things, GET_EVENT can't detect media removal while TUR can.
      
      This patch makes close(2) - blkdev_put() - indicate clearing hint for
      MEDIA_CHANGE to drivers.  disk_check_events() is renamed to
      disk_flush_events() and updated to take @mask for events to flush
      which is or'd to ev->clearing and will be passed to the driver on the
      next ->check_events() invocation.
      
      This change makes sr generate MEDIA_CHANGE when media is ejected from
      userland - e.g. with eject(1).
      
      Note: Given the current usage, it seems @clearing hint is needlessly
      complex.  disk_clear_events() can simply clear all events and the hint
      can be boolean @flush.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      85ef06d1
    • J
      Merge branch 'for-linus' into for-3.1/core · 04bf7869
      Jens Axboe 提交于
      Conflicts:
      	block/blk-throttle.c
      	block/cfq-iosched.c
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      04bf7869
  4. 30 6月, 2011 8 次提交
  5. 27 6月, 2011 4 次提交
  6. 26 6月, 2011 1 次提交
  7. 25 6月, 2011 21 次提交
  8. 24 6月, 2011 1 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 5220cc93
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: add REQ_SECURE to REQ_COMMON_MASK
        block: use the passed in @bdev when claiming if partno is zero
        block: Add __attribute__((format(printf...) and fix fallout
        block: make disk_block_events() properly wait for work cancellation
        block: remove non-syncing __disk_block_events() and fold it into disk_block_events()
        block: don't use non-syncing event blocking in disk_check_events()
        cfq-iosched: fix locking around ioc->ioc_data assignment
      5220cc93