Re: [PATCH v2 2/6] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-05-31 Thread Paolo Bonzini
On 31/05/21 15:59, Kevin Wolf wrote: Apparently the motivation for Maxim's patch was, if I'm reading the description correctly, that it affected non-sg cases by imposing unnecessary restrictions. I see that patch 1 changed the max_iov part so that it won't affect non-sg cases any more, but

Re: [PATCH v2 2/6] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-05-31 Thread Kevin Wolf
Am 27.05.2021 um 22:14 hat Paolo Bonzini geschrieben: > On 27/05/21 17:51, Kevin Wolf wrote: > > Am 24.05.2021 um 18:36 hat Paolo Bonzini geschrieben: > > > bs->sg is only true for character devices, but block devices can also > > > be used with scsi-block and scsi-generic. Unfortunately

Re: [PATCH v2 2/6] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-05-27 Thread Paolo Bonzini
On 27/05/21 17:51, Kevin Wolf wrote: Am 24.05.2021 um 18:36 hat Paolo Bonzini geschrieben: bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a

Re: [PATCH v2 2/6] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-05-27 Thread Kevin Wolf
Am 24.05.2021 um 18:36 hat Paolo Bonzini geschrieben: > bs->sg is only true for character devices, but block devices can also > be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET > returns bytes in an int for /dev/sgN devices, and sectors in a short > for block devices, so account