[RHEL7,COMMIT] ploop: Kill unused PLOOP_S_SYNC

Submitted by Konstantin Khorenko on June 3, 2020, 2:03 p.m.

Details

Message ID 202006031403.053E31iK030991@finist-ce7.sw.ru
State New
Series "ploop: Kill unused PLOOP_S_SYNC"
Headers show

Commit Message

Konstantin Khorenko June 3, 2020, 2:03 p.m.
The commit is pushed to "branch-rh7-3.10.0-1127.8.2.vz7.161.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.8.2.vz7.161.5
------>
commit 9e012c1bc4b61dac64c898fcf190e3eac82f31ea
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Wed Jun 3 17:03:01 2020 +0300

    ploop: Kill unused PLOOP_S_SYNC
    
    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@virtuozzo.com>
---
 drivers/block/ploop/dev.c   | 6 ------
 include/linux/ploop/ploop.h | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 98673922244c4..201315e973b70 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 24f748530f549..68e6a6a21b54f 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 */