On 10/02/2023 16:14, Bart Van Assche wrote:
If scmd->flags would be initialized to a non-zero value in the future
then it would be non-trivial to remember that the above assignment would
have to be changed into a logical or. So I'd like to keep the logical or.
ok
req->timeout = timeout;
req->rq_flags |= RQF_QUIET;
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 7e95ec45138f..c7bfb1f5a8e7 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -462,6 +462,7 @@ struct scsi_exec_args {
unsigned int sense_len; /* sense buffer len */
struct scsi_sense_hdr *sshdr; /* decoded sense header */
blk_mq_req_flags_t req_flags; /* BLK_MQ_REQ flags */
+ unsigned int scmd_flags; /* SCMD flags */
nit: scsi_cmnd.flags is an int, so prob should keep the same type
How about changing the type of scsi_cmnd.flags from 'int' into 'unsigned
int'? I can't think of any reason to make a flags variable signed
instead of unsigned.
Yeah, it is odd to have a signed flags, but it's not the only one in
scsi_cmnd. You suggest a reasonable change, however scsi core structures
have many odd member types already.. so I'll leave it to you to decide
on the proposed change.
Thanks,
John