Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: target: Add atomic se_device fields

Add atomic fields to the se_device and export them in configfs.

Initially only target_core_iblock will be supported and we will inherit
all the settings from the block layer.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
jpg: Stop being allowed to configure atomic write alignment,
Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://patch.msgid.link/20251020103820.2917593-3-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Mike Christie and committed by
Martin K. Petersen
d505447b 3434be39

+20
+15
drivers/target/target_core_configfs.c
··· 578 578 DEF_CONFIGFS_ATTRIB_SHOW(max_write_same_len); 579 579 DEF_CONFIGFS_ATTRIB_SHOW(emulate_rsoc); 580 580 DEF_CONFIGFS_ATTRIB_SHOW(submit_type); 581 + DEF_CONFIGFS_ATTRIB_SHOW(atomic_max_len); 582 + DEF_CONFIGFS_ATTRIB_SHOW(atomic_alignment); 583 + DEF_CONFIGFS_ATTRIB_SHOW(atomic_granularity); 584 + DEF_CONFIGFS_ATTRIB_SHOW(atomic_max_with_boundary); 585 + DEF_CONFIGFS_ATTRIB_SHOW(atomic_max_boundary); 581 586 582 587 #define DEF_CONFIGFS_ATTRIB_STORE_U32(_name) \ 583 588 static ssize_t _name##_store(struct config_item *item, const char *page,\ ··· 1305 1300 CONFIGFS_ATTR(, alua_support); 1306 1301 CONFIGFS_ATTR(, pgr_support); 1307 1302 CONFIGFS_ATTR(, submit_type); 1303 + CONFIGFS_ATTR_RO(, atomic_max_len); 1304 + CONFIGFS_ATTR_RO(, atomic_alignment); 1305 + CONFIGFS_ATTR_RO(, atomic_granularity); 1306 + CONFIGFS_ATTR_RO(, atomic_max_with_boundary); 1307 + CONFIGFS_ATTR_RO(, atomic_max_boundary); 1308 1308 1309 1309 /* 1310 1310 * dev_attrib attributes for devices using the target core SBC/SPC ··· 1353 1343 &attr_pgr_support, 1354 1344 &attr_emulate_rsoc, 1355 1345 &attr_submit_type, 1346 + &attr_atomic_alignment, 1347 + &attr_atomic_max_len, 1348 + &attr_atomic_granularity, 1349 + &attr_atomic_max_with_boundary, 1350 + &attr_atomic_max_boundary, 1356 1351 NULL, 1357 1352 }; 1358 1353 EXPORT_SYMBOL(sbc_attrib_attrs);
+5
include/target/target_core_base.h
··· 731 731 u32 unmap_granularity; 732 732 u32 unmap_granularity_alignment; 733 733 u32 max_write_same_len; 734 + u32 atomic_max_len; 735 + u32 atomic_alignment; 736 + u32 atomic_granularity; 737 + u32 atomic_max_with_boundary; 738 + u32 atomic_max_boundary; 734 739 u8 submit_type; 735 740 struct se_device *da_dev; 736 741 struct config_group da_group;