* [PATCH 1/2] incremental: fix check journal device
@ 2017-08-17 7:41 Chen Rong
2017-08-17 7:41 ` [PATCH 2/2] tests/20raid5journal: fix test_incremental Chen Rong
0 siblings, 1 reply; 2+ messages in thread
From: Chen Rong @ 2017-08-17 7:41 UTC (permalink / raw)
To: linux-raid; +Cc: Chen Rong
set journal_clean=1 if not journal device
Signed-off-by: Chen Rong <rongx.a.chen@intel.com>
---
Incremental.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Incremental.c b/Incremental.c
index 0f507bb..a91f82c 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -733,7 +733,7 @@ static int count_active(struct supertype *st, struct mdinfo *sra,
info.array.raid_disks = raid_disks;
st->ss->getinfo_super(st, &info, devmap + raid_disks * devnum);
- if (info.disk.raid_disk == MD_DISK_ROLE_JOURNAL)
+ if (info.disk.raid_disk != MD_DISK_ROLE_JOURNAL)
bestinfo->journal_clean = 1;
if (!avail) {
raid_disks = info.array.raid_disks;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] tests/20raid5journal: fix test_incremental
2017-08-17 7:41 [PATCH 1/2] incremental: fix check journal device Chen Rong
@ 2017-08-17 7:41 ` Chen Rong
0 siblings, 0 replies; 2+ messages in thread
From: Chen Rong @ 2017-08-17 7:41 UTC (permalink / raw)
To: linux-raid; +Cc: Chen Rong
Remove "check inactive", the result of /proc/mdstat is "active (read-only)",
Can not add $dev4 to a read only filesystem, so do "mdadm -I $dev4" first.
Signed-off-by: Chen Rong <rongx.a.chen@intel.com>
---
tests/20raid5journal | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/20raid5journal b/tests/20raid5journal
index f751ace..fee6c0c 100644
--- a/tests/20raid5journal
+++ b/tests/20raid5journal
@@ -40,12 +40,11 @@ test_assemble() {
# test --incremental
test_incremental() {
create_with_journal_and_stop
+ mdadm -I $dev4
for d in $dev0 $dev1 $dev2 $dev3
do
mdadm -I $d
done
- check inactive
- mdadm -I $dev4
check raid5
mdadm -S $md0
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-17 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 7:41 [PATCH 1/2] incremental: fix check journal device Chen Rong
2017-08-17 7:41 ` [PATCH 2/2] tests/20raid5journal: fix test_incremental Chen Rong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).