diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 20:03:16 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 20:03:16 +0200 |
commit | b219a1d2de0c025318475e3bbf8e3215cf49d083 (patch) | |
tree | 37f1be5878c14893663929d470addfd1dab8911e /drivers/md/md.c | |
parent | Merge tag 'mtd/for-4.19' of git://git.infradead.org/linux-mtd (diff) | |
parent | md/raid5: fix data corruption of replacements after originals dropped (diff) | |
download | linux-b219a1d2de0c025318475e3bbf8e3215cf49d083.tar.xz linux-b219a1d2de0c025318475e3bbf8e3215cf49d083.zip |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull MD updates from Shaohua Li:
"A few MD fixes for 4.19-rc1:
- several md-cluster fixes from Guoqing
- a data corruption fix from BingJing
- other cleanups"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
md/raid5: fix data corruption of replacements after originals dropped
drivers/md/raid5: Do not disable irq on release_inactive_stripe_list() call
drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock()
md/r5cache: remove redundant pointer bio
md-cluster: don't send msg if array is closing
md-cluster: show array's status more accurate
md-cluster: clear another node's suspend_area after the copy is finished
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index cb4eb5faa519..724def2f9eaa 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7677,6 +7677,23 @@ static int status_resync(struct seq_file *seq, struct mddev *mddev) resync -= atomic_read(&mddev->recovery_active); if (resync == 0) { + if (test_bit(MD_RESYNCING_REMOTE, &mddev->recovery)) { + struct md_rdev *rdev; + + rdev_for_each(rdev, mddev) + if (rdev->raid_disk >= 0 && + !test_bit(Faulty, &rdev->flags) && + rdev->recovery_offset != MaxSector && + rdev->recovery_offset) { + seq_printf(seq, "\trecover=REMOTE"); + return 1; + } + if (mddev->reshape_position != MaxSector) + seq_printf(seq, "\treshape=REMOTE"); + else + seq_printf(seq, "\tresync=REMOTE"); + return 1; + } if (mddev->recovery_cp < MaxSector) { seq_printf(seq, "\tresync=PENDING"); return 1; |