[Devel] [PATCH RHEL7 COMMIT] Partial revert "ploop: Enable native discard support for kaio engine"
Konstantin Khorenko
khorenko at virtuozzo.com
Tue May 21 17:44:30 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.1
------>
commit 12b1f8661f25b7825ecf3e7d85648343d29f0822
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue May 21 17:44:28 2019 +0300
Partial revert "ploop: Enable native discard support for kaio engine"
This partially reverts commit 48bff0f3ae926c8463fbb99e99e19c8ae209ca41.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
ploop: Return maintaince mode
This patch set enables it for vstorage.
Also, added file /sys/block/ploopXXX/pstate/native_discard,
which shows, whether we should use maintaince-mode based
discard or not.
https://jira.sw.ru/browse/PSBM-94662
Kirill Tkhai (8):
Revert "ploop: Remove now unused PLOOP_E_ZERO_INDEX and PLOOP_E_DELTA_ZERO_INDEX branches"
Revert "ploop: Remove now unused PLOOP_REQ_RELOC_S branches"
Revert "ploop: Remove now unused PLOOP_REQ_DISCARD branches"
Revert "ploop: Remove now unused PLOOP_REQ_ZERO branches"
Revert "ploop: Remove obsolete ioctls"
Partial revert "ploop: Enable native discard support for kaio engine"
ploop: Return maintaince mode ioctls again
ploop: Show whether device supports native discard
---
drivers/block/ploop/fmt_ploop1.c | 3 +++
include/linux/ploop/ploop.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 2ae22179c9c5..32437175dadb 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -271,6 +271,9 @@ ploop1_open(struct ploop_delta * delta)
((u64)ph->bd_size + ph->l1_off) << 9)
delta->flags |= PLOOP_FMT_PREALLOCATED;
+ if (delta->io.ops->id != PLOOP_IO_DIRECT)
+ set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
+
return 0;
out_err:
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 8c7a42e32864..939385e89ac2 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -52,7 +52,7 @@ enum {
PLOOP_S_ENOSPC_EVENT, /* ENOSPC event happened but but was not
* consumed by userspace yet */
PLOOP_S_CONGESTED, /* Too many bios submitted to us */
- PLOOP_S_NO_FALLOC_DISCARD, /* FIXME: Remove this: Unable to handle discard requests by fallocate */
+ PLOOP_S_NO_FALLOC_DISCARD, /* Unable to handle discard requests by fallocate */
PLOOP_S_DISCARD, /* ploop is ready to handle discard request */
PLOOP_S_DISCARD_LOADED, /* A discard request was handled and
free blocks loaded */
More information about the Devel
mailing list