[Devel] [PATCH RH7] ploop: Kill unused PLOOP_S_SYNC

Kirill Tkhai ktkhai at virtuozzo.com
Tue Jun 2 18:45:21 MSK 2020


We either set this bit or clear it. Nobody tests
whether it's set. So, kill it.

It looks this is inheritance of vz6. We never used it
in vz7. Also, in further we should check whether
ploop_unplug() is actually needed for vz7.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/dev.c   |    6 ------
 include/linux/ploop/ploop.h |    2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index f9d3eb2067aa..9256302fe5d2 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -861,8 +861,6 @@ static void ploop_unplug(struct blk_plug_cb *cb, bool from_schedule)
 {
 	struct ploop_device *plo = cb->data;
 
-	clear_bit(PLOOP_S_SYNC, &plo->state);
-
 	/* And kick our "soft" queue too in case mitigation timer is in effect */
 	spin_lock_irq(&plo->lock);
 	if (plo->bio_head) {
@@ -2679,10 +2677,6 @@ static void ploop_req_state_process(struct ploop_request * preq)
 	}
 #endif
 
-	if (preq->eng_state != PLOOP_E_COMPLETE &&
-	    test_bit(PLOOP_REQ_SYNC, &preq->state))
-		set_bit(PLOOP_S_SYNC, &plo->state);
-
 	if (test_bit(PLOOP_REQ_TRACK, &preq->state)) {
 		sector_t sec;
 		clear_bit(PLOOP_REQ_TRACK, &preq->state);
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 24f748530f54..68e6a6a21b54 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -44,7 +44,7 @@ enum {
 	PLOOP_S_EXITING,	/* Exiting */
 	PLOOP_S_ABORT,		/* Device is aborted due to unrecoverable
 				 * error. Reads are still allowed. */
-	PLOOP_S_SYNC,		/* Unplug was requested */
+	PLOOP_S_UNUSED4,
 	PLOOP_S_CHANGED,	/* Media changed */
 	PLOOP_S_WRITE_CONG,	/* Write direction was congested */
 	PLOOP_S_READ_CONG,	/* Read direction was congested */




More information about the Devel mailing list