On Mon, 2017-08-28 at 10:10 +0200, Christoph Hellwig wrote:
> All that can be done by clearing or setting a flag on the first call to
> ->queue_rq or ->queuecommand instead.  In NVMe we use RQF_DONTPREP for
> that, but for SCSI we probablt can't use that given that it has more
> meaning for the old request path.  But how about just adding a new
> RQD_DRV_INITIALIZED or similar flag?

Hello Christoph,

More changes would have to be made to implement the above proposal than just
setting a flag at the start of .queue_rq() / .queuecommand() for all
filesystem requests. The numerous code paths that lead to a request not being
executed immediately, e.g. a SCSI host being busy or a preparation status !=
BLKPREP_OK, would have to be inspected and code would have to be added to clear
the "command initialized" flag to ensure that initialization occurs shortly
before the first time a command is executed.

The choice we have to make is to add more state information and complicated
code for keeping that state information up-to-date to the SCSI core or making a
small and easy to maintain change to the block layer core that does not involve
any new state information. That's why I'm asking you to reconsider the patch at
the start of this e-mail thread.

Thanks,

Bart.

Reply via email to