scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
PATCH 1/1 scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
The default atomic write max length in DEF_ATOMIC_WR_MAX_LENGTH is excessively large.
For 512B LBS, we would get a 4MB max, but due to block layer atomic write restrictions this is limited to 512KB.
Reduce DEF_ATOMIC_WR_MAX_LENGTH to a value which would be more realistic (for a real device supporting atomic writes), 64KB.
drivers/scsi/scsi_debug.c +1 -1
@@ -163,7 +163,7 @@ static const char *sdebug_version_date = "20210520";#define DEF_VPD_USE_HOSTNO 1#define DEF_WRITESAME_LENGTH 0xFFFF#define DEF_ATOMIC_WR 1 -#define DEF_ATOMIC_WR_MAX_LENGTH 8192 +#define DEF_ATOMIC_WR_MAX_LENGTH 128#define DEF_ATOMIC_WR_ALIGN 2#define DEF_ATOMIC_WR_GRAN 2#define DEF_ATOMIC_WR_MAX_LENGTH_BNDRY (DEF_ATOMIC_WR_MAX_LENGTH)
Signature · 1 line
2.31.1
drivers/scsi/scsi_debug.c static const char *sdebug_version_date = "20210520"; · line 166
Quoted 2 lines · John Garry
drivers/scsi/scsi_debug.c +1
-1-#define DEF_ATOMIC_WR_MAX_LENGTH 8192 +#define DEF_ATOMIC_WR_MAX_LENGTH 128
Shouldn't a comment be added next to this constant that mentions the unit of this constant?
Bart.
Quoted 7 lines · Bart Van Assche
drivers/scsi/scsi_debug.c static const char *sdebug_version_date = "20210520"; · line 166
Quoted 2 lines · John Garry
drivers/scsi/scsi_debug.c +1
-1-#define DEF_ATOMIC_WR_MAX_LENGTH 8192 +#define DEF_ATOMIC_WR_MAX_LENGTH 128Shouldn't a comment be added next to this constant that mentions the unit of this constant?
It is implied that all these values which correspond to VPD page parameters are in logical blocks.
Martin K. Petersen
AppliedJohn,
Quoted 2 lines
The default atomic write max length in
DEF_ATOMIC_WR_MAX_LENGTHis excessively large.
Applied to 6.16/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen