1. 09 10月, 2008 1 次提交
  2. 27 8月, 2008 2 次提交
    • F
      sg: restore command permission for TYPE_SCANNER · 14e507b8
      FUJITA Tomonori 提交于
      sg allowed any command for TYPE_SCANNER. The cmd_filter patchset
      doesn't. We can't change sg's permission since it might break the
      existing software.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      14e507b8
    • F
      block: move cmdfilter from gendisk to request_queue · abf54393
      FUJITA Tomonori 提交于
      cmd_filter works only for the block layer SG_IO with SCSI block
      devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
      character devices (such as st). We hit a kernel crash with them.
      
      The problem is that cmd_filter code accesses to gendisk (having struct
      blk_scsi_cmd_filter) via inode->i_bdev->bd_disk. It works for only
      SCSI block device files. With character device files, inode->i_bdev
      leads you to struct cdev. inode->i_bdev->bd_disk->blk_scsi_cmd_filter
      isn't safe.
      
      SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
      independent on any protocols. We shouldn't change ULDs to expose their
      gendisk.
      
      This patch moves struct blk_scsi_cmd_filter from gendisk to
      request_queue, a common object, which eveyone can access to.
      
      The user interface doesn't change; users can change the filters via
      /sys/block/. gendisk has a pointer to request_queue so the cmd_filter
      code accesses to struct blk_scsi_cmd_filter.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      abf54393
  3. 05 8月, 2008 1 次提交
  4. 12 7月, 2008 1 次提交
  5. 03 7月, 2008 3 次提交
  6. 21 6月, 2008 1 次提交
  7. 21 5月, 2008 1 次提交
    • G
      SCSI: fix race in device_create · 24b42566
      Greg Kroah-Hartman 提交于
      There is a race from when a device is created with device_create() and
      then the drvdata is set with a call to dev_set_drvdata() in which a
      sysfs file could be open, yet the drvdata will be NULL, causing all
      sorts of bad things to happen.
      
      This patch fixes the problem by using the new function,
      device_create_drvdata().  It fixes the problem in all of the scsi
      drivers that need it.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      24b42566
  8. 29 4月, 2008 1 次提交
  9. 20 4月, 2008 1 次提交
  10. 08 2月, 2008 1 次提交
  11. 28 1月, 2008 1 次提交
  12. 24 1月, 2008 4 次提交
  13. 29 10月, 2007 1 次提交
  14. 24 10月, 2007 1 次提交
  15. 23 10月, 2007 1 次提交
  16. 16 10月, 2007 1 次提交
  17. 13 10月, 2007 2 次提交
  18. 28 5月, 2007 1 次提交
  19. 09 5月, 2007 1 次提交
  20. 18 4月, 2007 1 次提交
    • A
      [SCSI] sg: cap reserved_size values at max_sectors · 44ec9542
      Alan Stern 提交于
      This patch (as857) modifies the SG_GET_RESERVED_SIZE and
      SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
      the device's request_queue's max_sectors value.  This will permit
      cdrecord to obtain a legal value for the maximum transfer length,
      fixing Bugzilla #7026.
      
      The patch also caps the initial reserved_size value.  There's no
      reason to have a reserved buffer larger than max_sectors, since it
      would be impossible to use the extra space.
      
      The corresponding ioctls in the block layer are modified similarly,
      and the initial value for the reserved_size is set as large as
      possible.  This will effectively make it default to max_sectors.
      Note that the actual value is meaningless anyway, since block devices
      don't have a reserved buffer.
      
      Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
      uniform way for users to determine the actual max_sectors value for
      any raw SCSI transport.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Acked-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      44ec9542
  21. 09 11月, 2006 1 次提交
  22. 27 9月, 2006 1 次提交
    • D
      [SCSI] sg: fixes for large page_size · 6460e75a
      Douglas Gilbert 提交于
      This sg driver patch addresses the problem with larger
      page sizes reported by Brian King in this post:
      http://marc.theaimsgroup.com/?l=linux-scsi&m=115867718623631&w=2
      Some other related matters are also addressed. Some of these
      prevent oopses when the SG_SCATTER_SZ or scatter_elem_sz are
      set to inappropriate values.
      
      The scatter_elem_sz has been tested up to 4 MB which should
      make the largest data transfer with one SCSI command, 32 MB
      less one block, achievable with a relatively small number
      of elements in the scatter gather list.
      
      ChangeLog:
          - add scatter_elem_sz boot time parameter and sysfs module
            parameter that is initialized to SG_SCATTER_SZ
          - the driver will then adjust scatter_elem_sz to be the
            max(given(scatter_elem_sz), PAGE_SIZE)
            It will also round it up, if necessary, to be a power
            of two
          - clean up sg.h header, correct bad urls and some statements
            that are no longer valid
          - make the def_reserved_size sysfs module attribute writable
      Signed-off-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6460e75a
  23. 26 8月, 2006 1 次提交
  24. 01 7月, 2006 2 次提交
  25. 10 6月, 2006 1 次提交
  26. 13 4月, 2006 3 次提交
  27. 22 3月, 2006 1 次提交
    • N
      [PATCH] sg: use compound pages · f9aed0e2
      Nick Piggin 提交于
      sg increments the refcount of constituent pages in its higher order memory
      allocations when they are about to be mapped by userspace.  This is done so
      the subsequent get_page/put_page when doing the mapping and unmapping does not
      free the page.
      
      Move over to the preferred way, that is, using compound pages instead.  This
      fixes a whole class of possible obscure bugs where a get_user_pages on a
      constituent page may outlast the user mappings or even the driver.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Douglas Gilbert <dougg@torque.net>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f9aed0e2
  28. 12 3月, 2006 1 次提交
  29. 28 2月, 2006 2 次提交