[Devel] [PATCH RHEL7 COMMIT] ploop: Set discard limits after blk_queue_stack_limits()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Mar 2 15:07:36 MSK 2020
The commit is pushed to "branch-rh7-3.10.0-1062.12.1.vz7.131.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.12.1.vz7.131.5
------>
commit 4a7da5a54634ffad206c2944afc13142124cd8b6
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon Mar 2 15:07:36 2020 +0300
ploop: Set discard limits after blk_queue_stack_limits()
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 1fa7bfd6a2bbf..f4bc099c05e99 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