[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] dm-io async WRITE_SAME results in iSCSI NULL pointer [was: Re: Write same support]



>>>>> "Mike" == Mike Snitzer <snitzer redhat com> writes:

Mike,

Mike> One, thing I noticed: bio_has_data returns false for
Mike> REQ_WRITE_SAME.  But REQ_WRITE_SAME does have data, and it really
Mike> should be accounted no?:

I decided against it. We don't count discards either and write sames are
not really page-out types of activity. Happy to change it if people
think this is something we should handle. But what do we actually count?
A single logical block or the number of sectors written by the target
device?


Mike> That aside, I tried your updated code and hit this BUG when I use
Mike> the patch that has always worked (my dm-thin patch that uses the
Mike> blkdev_issue_write_same() interface):

Mike> ------------[ cut here ]------------ kernel BUG at
Mike> drivers/scsi/scsi_lib.c:1116!

That's the

                BUG_ON(!req->nr_phys_segments);

in scsi_setup_blk_pc_cmnd(). We set nr_phys_segments to bi_phys_segments
just before calling that function. So how did you end up with a
zero-segment bio?

PS. I was unsuccessful in getting the thinp test suite working. If you
can come up with a simpler way for me to get DM to issue a write same
then please share...

-- 
Martin K. Petersen	Oracle Linux Engineering


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]