[Devel] [PATCH rh7] ploop: Set discard limits after blk_queue_stack_limits()
Kirill Tkhai
ktkhai at virtuozzo.com
Fri Feb 28 18:01:20 MSK 2020
We do not care about host block device discard_granularity
and max_discard_sectors, because of filesystem block size
is much less then standard ploop cluster size (1Mb). Even
in case of underlining host block device has a huge discard
granuality, host filesystem will be able to reuse the blocks
we mark unused on fallocate(FALLOC_FL_PUNCH_HOLE).
This came from OpenVZ bug, where host block device discard
granuality is 2Mb, while ploop cluster size is 1Mb.
https://bugs.openvz.org/browse/OVZ-7130
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/io_direct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index 1fa7bfd6a2bb..f4bc099c05e9 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -1675,8 +1675,8 @@ static int dio_congested(struct ploop_io * io, int bits)
static void dio_queue_settings(struct ploop_io * io, struct request_queue * q)
{
- ploop_set_discard_limits(io->plo);
blk_queue_stack_limits(q, bdev_get_queue(io->files.bdev));
+ ploop_set_discard_limits(io->plo);
}
static void dio_issue_flush(struct ploop_io * io, struct ploop_request *preq)
More information about the Devel
mailing list