[Devel] [PATCH RH8 3/5] ploop: Remove unused define and comment

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jun 17 18:08:39 MSK 2021


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c |   24 ------------------------
 drivers/md/dm-ploop.h     |    1 -
 2 files changed, 25 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 6361c770d193..a655ab426e8e 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -12,30 +12,6 @@
 
 #define PREALLOC_SIZE (128ULL * 1024 * 1024)
 
-/*
- * The idea of this driver is that the most part of time it does nothing:
- * ploop_map() just replaces bio->bi_iter.bi_sector with the cluster value
- * referred in bat_entries[]. No kwork is involved, all the work becomes
- * delegated to backed device (loop). Kwork starts only when a bio aims
- * to a not present cluster or for service requests.
- *
- * Service operations are also made from kwork, so sometimes we may avoid
- * synchronization because of this. Two different service operations can't
- * be executed in parallel.
- *
- * Discard begins from switching ploop in a special mode, when all requests
- * are managed by kwork, while all not-exclusive bios (e.g., READ or simple
- * WRITE) are linked to inflight_pios_rbtree. Discard bios are linked into
- * exclusive_bios_rbtree, but their start is delayed till all not-exclusive
- * bios going into the same cluster are finished. After exclusive bio is
- * started, the corresponding cluster becomes "locked", and all further bios
- * going into the same cluster becomes delayed.
- * Since the swithing into the mode is expensive, ploop remains in the mode
- * for CLEANUP_DELAY seconds in a hope that a new discard bio will come.
- * After this interval the device returns into normal mode, and ordinary bios
- * become handled in ploop_map() as before.
- */
-
 static void handle_cleanup(struct ploop *ploop, struct pio *pio);
 
 #define DM_MSG_PREFIX "ploop"
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 72628756412e..d0f1493e12e6 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -76,7 +76,6 @@ struct ploop_cmd {
 /* We can't use 0 for unmapped clusters, since RAW image references 0 cluster */
 #define BAT_ENTRY_NONE		UINT_MAX
 
-#define CLEANUP_DELAY		20
 #define PLOOP_INFLIGHT_TIMEOUT	(60 * HZ)
 
 #define PLOOP_BIOS_HTABLE_BITS	8




More information about the Devel mailing list