Patch "md/raid1: clean up request counts properly in close_sync()" has been added to the 3.16-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    md/raid1: clean up request counts properly in close_sync()

to the 3.16-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     md-raid1-clean-up-request-counts-properly-in-close_sync.patch
and it can be found in the queue-3.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 669cc7ba77864e7b1ac39c9f2b2afb8730f341f4 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@xxxxxxx>
Date: Thu, 4 Sep 2014 16:30:38 +1000
Subject: md/raid1: clean up request counts properly in close_sync()

From: NeilBrown <neilb@xxxxxxx>

commit 669cc7ba77864e7b1ac39c9f2b2afb8730f341f4 upstream.

If there are outstanding writes when close_sync is called,
the change to ->start_next_window might cause them to
decrement the wrong counter when they complete.  Fix this
by merging the two counters into the one that will be decremented.

Having an incorrect value in a counter can cause raise_barrier()
to hangs, so this is suitable for -stable.

Fixes: 79ef3a8aa1cb1523cc231c9a90a278333c21f761
Signed-off-by: NeilBrown <neilb@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/md/raid1.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1548,8 +1548,13 @@ static void close_sync(struct r1conf *co
 	mempool_destroy(conf->r1buf_pool);
 	conf->r1buf_pool = NULL;
 
+	spin_lock_irq(&conf->resync_lock);
 	conf->next_resync = 0;
 	conf->start_next_window = MaxSector;
+	conf->current_window_requests +=
+		conf->next_window_requests;
+	conf->next_window_requests = 0;
+	spin_unlock_irq(&conf->resync_lock);
 }
 
 static int raid1_spare_active(struct mddev *mddev)


Patches currently in stable-queue which might be from neilb@xxxxxxx are

queue-3.16/md-raid1-fix_read_error-should-act-on-all-non-faulty-devices.patch
queue-3.16/md-raid1-count-resync-requests-in-nr_pending.patch
queue-3.16/md-raid1-update-next_resync-under-resync_lock.patch
queue-3.16/md-raid1-intialise-start_next_window-for-read-case-to-avoid-hang.patch
queue-3.16/md-raid1-don-t-use-next_resync-to-determine-how-far-resync-has-progressed.patch
queue-3.16/md-raid1-be-more-cautious-where-we-read-balance-during-resync.patch
queue-3.16/md-raid1-make-sure-resync-waits-for-conflicting-writes-to-complete.patch
queue-3.16/md-raid1-clean-up-request-counts-properly-in-close_sync.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]