1. 17 10月, 2017 1 次提交
  2. 26 9月, 2017 1 次提交
  3. 26 8月, 2017 4 次提交
  4. 17 8月, 2017 1 次提交
  5. 29 6月, 2017 1 次提交
  6. 27 6月, 2017 1 次提交
  7. 13 6月, 2017 1 次提交
    • B
      scsi: Protect SCSI device state changes with a mutex · 0db6ca8a
      Bart Van Assche 提交于
      Serializing SCSI device state changes avoids that two state changes can
      occur concurrently, e.g. the state changes in scsi_target_block() and
      __scsi_remove_device(). This serialization is essential to make patch
      "Make __scsi_remove_device go straight from BLOCKED to DEL" work
      reliably.
      
      Enable this mechanism for all scsi_target_*block() callers but not for
      the scsi_internal_device_unblock() calls from the mpt3sas driver because
      that driver can call scsi_internal_device_unblock() from atomic context.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      0db6ca8a
  8. 17 5月, 2017 1 次提交
  9. 12 5月, 2017 2 次提交
  10. 26 4月, 2017 2 次提交
  11. 25 4月, 2017 2 次提交
  12. 09 4月, 2017 6 次提交
  13. 08 4月, 2017 2 次提交
  14. 07 4月, 2017 2 次提交
  15. 09 3月, 2017 1 次提交
  16. 02 3月, 2017 1 次提交
    • D
      scsi: sd: Check for unaligned partial completion · c46f0917
      Damien Le Moal 提交于
      Commit <f2e767bb> ("mpt3sas: Force request partial completion
      alignment") was not considering the case of commands not operating on
      logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned
      partial replies). In this case, forcing alignment of resid to the device
      logical block size can break the command result, e.g. in the case of
      REQ_OP_ZONE_REPORT, the exact number of zone reported by the device.
      
      Move the partial completion alignement check of mpt3sas to a generic
      implementation in sd_done(). The check is added within the default
      section of the initial req_op() switch case so that the report and reset
      zone commands are ignored. In addition, as sd_done() is not called for
      passthrough requests, resid corrections are not done as intended by the
      initial mpt3sas patch.
      
      Fixes: f2e767bb ("mpt3sas: Force request partial completion alignment")
      Cc: <stable@vger.kernel.org> # v4.10
      Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      c46f0917
  17. 24 2月, 2017 1 次提交
  18. 23 2月, 2017 3 次提交
  19. 02 2月, 2017 1 次提交
    • D
      scsi, block: fix duplicate bdi name registration crashes · 0dba1314
      Dan Williams 提交于
      Warnings of the following form occur because scsi reuses a devt number
      while the block layer still has it referenced as the name of the bdi
      [1]:
      
       WARNING: CPU: 1 PID: 93 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80
       sysfs: cannot create duplicate filename '/devices/virtual/bdi/8:192'
       [..]
       Call Trace:
        dump_stack+0x86/0xc3
        __warn+0xcb/0xf0
        warn_slowpath_fmt+0x5f/0x80
        ? kernfs_path_from_node+0x4f/0x60
        sysfs_warn_dup+0x62/0x80
        sysfs_create_dir_ns+0x77/0x90
        kobject_add_internal+0xb2/0x350
        kobject_add+0x75/0xd0
        device_add+0x15a/0x650
        device_create_groups_vargs+0xe0/0xf0
        device_create_vargs+0x1c/0x20
        bdi_register+0x90/0x240
        ? lockdep_init_map+0x57/0x200
        bdi_register_owner+0x36/0x60
        device_add_disk+0x1bb/0x4e0
        ? __pm_runtime_use_autosuspend+0x5c/0x70
        sd_probe_async+0x10d/0x1c0
        async_run_entry_fn+0x39/0x170
      
      This is a brute-force fix to pass the devt release information from
      sd_probe() to the locations where we register the bdi,
      device_add_disk(), and unregister the bdi, blk_cleanup_queue().
      
      Thanks to Omar for the quick reproducer script [2]. This patch survives
      where an unmodified kernel fails in a few seconds.
      
      [1]: https://marc.info/?l=linux-scsi&m=147116857810716&w=4
      [2]: http://marc.info/?l=linux-block&m=148554717109098&w=2
      
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Jan Kara <jack@suse.cz>
      Reported-by: NOmar Sandoval <osandov@osandov.com>
      Tested-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      0dba1314
  20. 01 2月, 2017 1 次提交
  21. 28 1月, 2017 1 次提交
  22. 27 1月, 2017 1 次提交
    • B
      Revert "sd: remove __data_len hack for WRITE SAME" · 08965c2e
      Bart Van Assche 提交于
      This patch reverts commit f80de881 and avoids that sending a
      WRITE SAME command to the iSCSI initiator triggers the following:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000014
      TARGET_CORE[iSCSI]: Expected Transfer Length: 260096 does not match SCSI CDB Length: 512 for SAM Opcode: 0x41
      IP: iscsi_tcp_segment_done+0x20b/0x310 [libiscsi_tcp]
      
      Oops: 0000 [#1] SMP
      Modules linked in: target_core_user uio target_core_iblock target_core_file iscsi_target_mod target_core_mod netconsole configfs crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 crypto_simd cryptd glue_helper virtio_console virtio_rng virtio_balloon serio_raw i2c_piix4 acpi_cpufreq button iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ext4 jbd2 mbcache virtio_blk virtio_net psmouse floppy drm_kms_helper syscopyarea
      sysfillrect sysimgblt fb_sys_fops ttm drm virtio_pci
      CPU: 2 PID: 5 Comm: kworker/u8:0 Not tainted 4.10.0-rc5-debug+ #3
      Workqueue: iscsi_q_0 iscsi_xmitworker [libiscsi]
      RIP: 0010:iscsi_tcp_segment_done+0x20b/0x310 [libiscsi_tcp]
      Call Trace:
       iscsi_sw_tcp_xmit_segment+0x84/0x120 [iscsi_tcp]
       iscsi_sw_tcp_pdu_xmit+0x51/0x180 [iscsi_tcp]
       iscsi_tcp_task_xmit+0xb3/0x290 [libiscsi_tcp]
       iscsi_xmit_task+0x4e/0xc0 [libiscsi]
       iscsi_xmitworker+0x243/0x330 [libiscsi]
       process_one_work+0x1d8/0x4b0
       worker_thread+0x49/0x4a0
       kthread+0x102/0x140
      
      Fixes: f80de881 ("sd: remove __data_len hack for WRITE SAME")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: Chris Leech <cleech@redhat.com>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      08965c2e
  23. 21 1月, 2017 1 次提交
  24. 18 1月, 2017 2 次提交