[Devel] [PATCH RHEL7 COMMIT] ploop: Introduce data_off_in_clusters() helper
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Mar 28 12:37:42 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.5
------>
commit 0ee4c340b6261e99f0fa025d742a70e8af122981
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Thu Mar 28 12:37:40 2019 +0300
ploop: Introduce data_off_in_clusters() helper
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
ploop: Discard with zeroing of ploop1 indexes support
https://jira.sw.ru/browse/PSBM-92367
https://pmc.acronis.com/browse/VSTOR-19972
Kirill Tkhai (10):
ploop: Export map defines to separate header file
ploop: Make submit_alloc() return int value
ploop: Introduce ploop_submit_alloc() helper
ploop: Prohibit discard ioctls
ploop: Prohibit PLOOP_IOC_UPDATE_INDEX on singular list
ploop: Introduce data_off_in_clusters() helper
ploop: Add .complete_merge method
ploop: Zero indexes on discard
ploop: Fallocate cluster in cached_submit() during hole reuse
ploop: Populate and maintain holes bitmap
---
drivers/block/ploop/fmt_ploop1.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index eea15aac8790..370aa6369a8a 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -25,6 +25,13 @@ struct ploop1_private
sector_t l1_off;
};
+static unsigned int data_off_in_clusters(struct ploop_delta *delta)
+{
+ struct ploop1_private *ph = delta->priv;
+
+ return (ph->l1_off >> delta->cluster_log);
+}
+
int ploop1_map_index(struct ploop_delta * delta, unsigned long block, sector_t *sec)
{
struct ploop1_private * ph = delta->priv;
More information about the Devel
mailing list