diff options
author | Akihiko Odaki <akihiko.odaki@gmail.com> | 2021-07-05 22:04:58 +0900 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2021-07-06 14:28:55 +0100 |
commit | 9f460c64e13897117f35ffb61f6f5e0102cabc70 (patch) | |
tree | 3f33b9e9ade124bcd6638a3687f4aa9a0f2976de | |
parent | 12a521b56d0538ca0363dd79db8f359cef40da69 (diff) |
block/io: Merge discard request alignments
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-id: 20210705130458.97642-3-akihiko.odaki@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | block/io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/io.c b/block/io.c index cf177a9d2d..e0a689c584 100644 --- a/block/io.c +++ b/block/io.c @@ -125,6 +125,8 @@ void bdrv_parent_drained_begin_single(BdrvChild *c, bool poll) static void bdrv_merge_limits(BlockLimits *dst, const BlockLimits *src) { + dst->pdiscard_alignment = MAX(dst->pdiscard_alignment, + src->pdiscard_alignment); dst->opt_transfer = MAX(dst->opt_transfer, src->opt_transfer); dst->max_transfer = MIN_NON_ZERO(dst->max_transfer, src->max_transfer); dst->max_hw_transfer = MIN_NON_ZERO(dst->max_hw_transfer, |