Skip to content

Commit bfa8f18

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull more SCSI updates from James Bottomley: "The vfs has long had a write lifetime hint mechanism that gives the expected longevity on storage of the data being written. f2fs was the original consumer of this and used the hint for flash data placement (mostly to avoid write amplification by placing objects with similar lifetimes in the same erase block). More recently the SCSI based UFS (Universal Flash Storage) drivers have wanted to take advantage of this as well, for the same reasons as f2fs, necessitating plumbing the write hints through the block layer and then adding it to the SCSI core. The vfs write_hints already taken plumbs this as far as block and this completes the SCSI core enabling based on a recently agreed reuse of the old write command group number. The additions to the scsi_debug driver are for emulating this property so we can run tests on it in the absence of an actual UFS device" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_debug: Maintain write statistics per group number scsi: scsi_debug: Implement GET STREAM STATUS scsi: scsi_debug: Implement the IO Advice Hints Grouping mode page scsi: scsi_debug: Allocate the MODE SENSE response from the heap scsi: scsi_debug: Rework subpage code error handling scsi: scsi_debug: Rework page code error handling scsi: scsi_debug: Support the block limits extension VPD page scsi: scsi_debug: Reduce code duplication scsi: sd: Translate data lifetime information scsi: scsi_proto: Add structures and constants related to I/O groups and streams scsi: core: Query the Block Limits Extension VPD page
2 parents e3111d9 + af180c0 commit bfa8f18

File tree

10 files changed

+490
-71
lines changed

10 files changed

+490
-71
lines changed

drivers/scsi/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ config SCSI_SCAN_ASYNC
241241
Note that this setting also affects whether resuming from
242242
system suspend will be performed asynchronously.
243243

244+
config SCSI_PROTO_TEST
245+
tristate "scsi_proto.h unit tests" if !KUNIT_ALL_TESTS
246+
depends on SCSI && KUNIT
247+
default KUNIT_ALL_TESTS
248+
244249
menu "SCSI Transports"
245250
depends on SCSI
246251

drivers/scsi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ obj-$(CONFIG_SCSI_COMMON) += scsi_common.o
2424

2525
obj-$(CONFIG_RAID_ATTRS) += raid_class.o
2626

27+
obj-$(CONFIG_SCSI_PROTO_TEST) += scsi_proto_test.o
28+
2729
# --- NOTE ORDERING HERE ---
2830
# For kernel non-modular link, transport attributes need to
2931
# be initialised before drivers

drivers/scsi/scsi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ void scsi_attach_vpd(struct scsi_device *sdev)
517517
scsi_update_vpd_page(sdev, 0xb1, &sdev->vpd_pgb1);
518518
if (vpd_buf->data[i] == 0xb2)
519519
scsi_update_vpd_page(sdev, 0xb2, &sdev->vpd_pgb2);
520+
if (vpd_buf->data[i] == 0xb7)
521+
scsi_update_vpd_page(sdev, 0xb7, &sdev->vpd_pgb7);
520522
}
521523
kfree(vpd_buf);
522524
}

0 commit comments

Comments
 (0)