* [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
@ 2025-05-01 10:02 John Garry
2025-05-04 3:13 ` Bart Van Assche
2025-05-06 2:10 ` Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: John Garry @ 2025-05-01 10:02 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: linux-scsi, John Garry
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.
Signed-off-by: John Garry <john.g.garry@oracle.com>
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 241a76761db8..160b7488baf1 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -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)
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
2025-05-01 10:02 [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH John Garry
@ 2025-05-04 3:13 ` Bart Van Assche
2025-05-04 7:36 ` John Garry
2025-05-06 2:10 ` Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2025-05-04 3:13 UTC (permalink / raw)
To: John Garry, James.Bottomley, martin.petersen; +Cc: linux-scsi
On 5/1/25 3:02 AM, John Garry wrote:
> -#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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
2025-05-04 3:13 ` Bart Van Assche
@ 2025-05-04 7:36 ` John Garry
0 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2025-05-04 7:36 UTC (permalink / raw)
To: Bart Van Assche, James.Bottomley, martin.petersen; +Cc: linux-scsi
On 04/05/2025 04:13, Bart Van Assche wrote:
> On 5/1/25 3:02 AM, John Garry wrote:
>> -#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?
>
It is implied that all these values which correspond to VPD page
parameters are in logical blocks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
2025-05-01 10:02 [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH John Garry
2025-05-04 3:13 ` Bart Van Assche
@ 2025-05-06 2:10 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-05-06 2:10 UTC (permalink / raw)
To: John Garry; +Cc: James.Bottomley, martin.petersen, linux-scsi
John,
> The default atomic write max length in DEF_ATOMIC_WR_MAX_LENGTH is
> excessively large.
Applied to 6.16/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-06 2:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 10:02 [PATCH] scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH John Garry
2025-05-04 3:13 ` Bart Van Assche
2025-05-04 7:36 ` John Garry
2025-05-06 2:10 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).