query regarding command conversion
Hi,
I have a SATA disk which is represented by node /dev/sdb.
I opened that device using open_blk_excl() to perform IO from a kernel module. IO request is submitted using generic_make_request() which is in terms of struct bio.
As per my knowledge LLDs do not deal with struct bio.
My question is, where does the struct bio to struct scatterlist conversion takes place
before SCSI layer calls hostt->queuecommand()?
Thanks,
Signature · 1 line
~p~r~a~s~h~a~n~t~
Quoted 7 lines · Prashant Bhole
Hi,
I have a SATA disk which is represented by node/dev/sdb.
I opened that device usingopen_blk_excl()to perform IO from a kernel module. IO request is submitted usinggeneric_make_request()which is in terms of struct bio.
As per my knowledge LLDs do not deal with struct bio.
Quoted 5 lines
My question is, where does the struct bio to struct scatterlist conversion takes place
before SCSI layer callshostt->queuecommand()?Thanks,
It is done in scsi_init_sgtable() scsi_lib.c. As part of scsi's prep_fn
Boaz