scsi: scsi_debug: Add no_rwlock parameter
authorDouglas Gilbert <dgilbert@interlog.com>
Sun, 9 Jan 2022 01:28:50 +0000 (20:28 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Jan 2022 05:25:06 +0000 (00:25 -0500)
commit7109f3701a4a6e4eef556c1707a361bed25813b3
treee73416a814872637570da54a91e3c466feb4f473
parent500d0d24808138cf95a785c7f4e51b2841974193
scsi: scsi_debug: Add no_rwlock parameter

By default, this driver places a read lock around all user data fetches and
a write lock around all user data modifying operations (e.g. WRITE
commands). These locks have "per store" granularity.  Other drivers that
have a similar function (e.g. null_blk) do not take this data integrity
step and run significantly faster in some tests.

In the common case of a (simulated) device to device copy (e.g.  what dd
and its variants do) there should be no need for locks around data
accesses. So add the driver and sysfs parameter no_rwlock which is boolean
and when set does what its name suggests. The default is false for backward
comaptibility.

Link: https://lore.kernel.org/r/20220109012853.301953-7-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c