Re: [PATCH] file-posix: split hdev_refresh_limits from raw_refresh_limits

2020-09-03 Thread Tom Yan
Oops I forgot max_transfer needs to be in bytes (and BLKSECTGET in sg has always been implemented wrongly). Will send a new version. On Fri, 4 Sep 2020 at 06:37, Tom Yan wrote: > > sg_get_max_transfer_length() and sg_get_max_segments() have nothing > to do with the sg driver or SG_IO at all. They

[PATCH] file-posix: split hdev_refresh_limits from raw_refresh_limits

2020-09-03 Thread Tom Yan
sg_get_max_transfer_length() and sg_get_max_segments() have nothing to do with the sg driver or SG_IO at all. They can be and should be used on all host devices / cdroms (on Linux). Also use MIN_NON_ZERO instead when we clamp max_sectors against max_segments. Signed-off-by: Tom Yan --- block/fi