Re: [RFC v2 1/2] scsi: sd: fix write_same16 and write_same10 for sector size > PAGE_SIZE
From: Bart Van Assche
Date: Wed Dec 03 2025 - 20:59:59 EST
On 12/3/25 1:05 PM, sw.prabhu6@xxxxxxxxx wrote:
static void *sd_set_special_bvec(struct request *rq, unsigned int data_len)
{
struct page *page;
+ struct scsi_device *sdp = scsi_disk(rq->q->disk)->device;
Instead of using this cumbersome approach to obtain the SCSI device
pointer, I recommend to change the 'struct request *rq' argument into
'struct scsi_cmnd *cmd' and to obtain the SCSI device pointer as
follows:
struct scsi_device *sdp = cmd->device;
Otherwise this patch looks good to me.
Thanks,
Bart.