Re: [PATCH v5 1/9] block: Change the preempt-only flag into a counter

Bart Van Assche
2018-08-08T15:27:31Z

On Wed, 2018-08-08 at 16:21 +0800, Ming Lei wrote:
> On Tue, Aug 07, 2018 at 03:51:25PM -0700, Bart Van Assche wrote:
> > The RQF_PREEMPT flag is used for three purposes:
> > - In the SCSI core, for making sure that power management reque=
sts
> > are executed if a device is in the "quiesced" state.
> > - For domain validation by SCSI drivers that use the parallel p=
ort.
> > - In the IDE driver, for IDE preempt requests.
>=20
> I think the above description may not be accurate, BLK_MQ_REQ=
_PREEMPT is
> always set inside scsi_execute(), that means any scsi_execute=
() callers
> can use the flag of RQF_PREEMPT, of course, not limited to the ab=
ove
> three cases.

Hello Ming,

What I described is for which cases we really need the RQF_PREEMPT flag=
rather
than in which cases the RQF_PREEMPT flag is set today. I think we shoul=
d split
the RQF_PREEMPT flag into three flags, one flag per case mentioned abov=
e.

Bart.