[Devel] [PATCH 06/10] ploop: Introduce data_off_in_clusters() helper
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Mar 26 18:19:08 MSK 2019
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
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