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

2020-11-05 Thread Maxim Levitsky
On Thu, 2020-11-05 at 13:44 +0800, Tom Yan wrote: > Actually I made a mistake in this. BLKSECTGET (the one in the block > layer) returns the number of "sectors", which is "defined" as 512-byte > block. So we shouldn't use BLKSSZGET here, but simply 512 (1 << 9). > See logical_to_sectors() in sd.h o

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

2020-11-04 Thread Tom Yan
Actually I made a mistake in this. BLKSECTGET (the one in the block layer) returns the number of "sectors", which is "defined" as 512-byte block. So we shouldn't use BLKSSZGET here, but simply 512 (1 << 9). See logical_to_sectors() in sd.h of the kernel. On Thu, 5 Nov 2020 at 01:32, Maxim Levitsky

[PATCH 1/5] file-posix: split hdev_refresh_limits from raw_refresh_limits

2020-11-04 Thread Maxim Levitsky
From: Tom Yan We can and should get max transfer length and max segments for all host devices / cdroms (on Linux). Also use MIN_NON_ZERO instead when we clamp max transfer length against max segments. Signed-off-by: Tom Yan Signed-off-by: Maxim Levitsky --- block/file-posix.c | 61 ++