[PATCH v3 0/7] scsi: target: Add WRITE_ATOMIC_16 support

John Garry posted 7 patches 2 months ago
drivers/target/target_core_configfs.c | 15 ++++++++
drivers/target/target_core_device.c   | 23 ++++++++++--
drivers/target/target_core_file.c     |  4 +--
drivers/target/target_core_iblock.c   |  9 +++--
drivers/target/target_core_sbc.c      | 51 +++++++++++++++++++++++++++
drivers/target/target_core_spc.c      | 49 +++++++++++++++++++++----
include/target/target_core_backend.h  |  6 ++--
include/target/target_core_base.h     |  6 ++++
8 files changed, 148 insertions(+), 15 deletions(-)
[PATCH v3 0/7] scsi: target: Add WRITE_ATOMIC_16 support
Posted by John Garry 2 months ago
This is a reposting of Mike's atomic writes support for the SCSI target.

Again, we are now only supporting target_core_iblock. It's implemented
similar to UNMAP where we do not do any emulation and instead pass the
operation to the block layer.

Changes since v2:
- Fix 32b build error

Changes since v1:
- Don't make atomic alignment configurable
- Drop atomic_supported configfs entry
- reformatting
- fix lba size in sbc_check_atomic()
- fix return code from sbc_check_atomic()

Mike Christie (7):
  scsi: target: Rename target_configure_unmap_from_queue
  scsi: target: Add atomic se_device fields
  scsi: target: Add helper to setup atomic values from block_device
  scsi: target: Add WRITE_ATOMIC_16 handler
  scsi: target: Report atomic values in INQUIRY
  scsi: target: Add WRITE_ATOMIC_16 support to RSOC
  scsi: target: Add atomic support to target_core_iblock

 drivers/target/target_core_configfs.c | 15 ++++++++
 drivers/target/target_core_device.c   | 23 ++++++++++--
 drivers/target/target_core_file.c     |  4 +--
 drivers/target/target_core_iblock.c   |  9 +++--
 drivers/target/target_core_sbc.c      | 51 +++++++++++++++++++++++++++
 drivers/target/target_core_spc.c      | 49 +++++++++++++++++++++----
 include/target/target_core_backend.h  |  6 ++--
 include/target/target_core_base.h     |  6 ++++
 8 files changed, 148 insertions(+), 15 deletions(-)

-- 
2.43.5
Re: [PATCH v3 0/7] scsi: target: Add WRITE_ATOMIC_16 support
Posted by Martin K. Petersen 1 month, 2 weeks ago
John,

> This is a reposting of Mike's atomic writes support for the SCSI
> target.
>
> Again, we are now only supporting target_core_iblock. It's implemented
> similar to UNMAP where we do not do any emulation and instead pass the
> operation to the block layer.

Applied to 6.19/scsi-staging, thanks!

-- 
Martin K. Petersen
Re: [PATCH v3 0/7] scsi: target: Add WRITE_ATOMIC_16 support
Posted by Martin K. Petersen 1 month, 2 weeks ago
On Mon, 20 Oct 2025 10:38:13 +0000, John Garry wrote:

> This is a reposting of Mike's atomic writes support for the SCSI target.
> 
> Again, we are now only supporting target_core_iblock. It's implemented
> similar to UNMAP where we do not do any emulation and instead pass the
> operation to the block layer.
> 
> Changes since v2:
> - Fix 32b build error
> 
> [...]

Applied to 6.19/scsi-queue, thanks!

[1/7] scsi: target: Rename target_configure_unmap_from_queue
      https://git.kernel.org/mkp/scsi/c/3434be392051
[2/7] scsi: target: Add atomic se_device fields
      https://git.kernel.org/mkp/scsi/c/d505447b8d78
[3/7] scsi: target: Add helper to setup atomic values from block_device
      https://git.kernel.org/mkp/scsi/c/c486634fe2b1
[4/7] scsi: target: Add WRITE_ATOMIC_16 handler
      https://git.kernel.org/mkp/scsi/c/526145725106
[5/7] scsi: target: Report atomic values in INQUIRY
      https://git.kernel.org/mkp/scsi/c/710ad826e300
[6/7] scsi: target: Add WRITE_ATOMIC_16 support to RSOC
      https://git.kernel.org/mkp/scsi/c/2d9668883bba
[7/7] scsi: target: Add atomic support to target_core_iblock
      https://git.kernel.org/mkp/scsi/c/8e62d8f4b159

-- 
Martin K. Petersen