Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: resolve confusion of MD_CHANGE_CLEAN md: don't clear MD_CHANGE_CLEAN in md_update_sb() for external arrays Move .gitignore from drivers/md to lib/raid6
This commit is contained in:
commit
dc6f962eb5
|
@ -1,4 +0,0 @@
|
|||
mktables
|
||||
raid6altivec*.c
|
||||
raid6int*.c
|
||||
raid6tables.c
|
|
@ -1542,8 +1542,7 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector)
|
|||
atomic_read(&bitmap->mddev->recovery_active) == 0);
|
||||
|
||||
bitmap->mddev->curr_resync_completed = bitmap->mddev->curr_resync;
|
||||
if (bitmap->mddev->persistent)
|
||||
set_bit(MD_CHANGE_CLEAN, &bitmap->mddev->flags);
|
||||
set_bit(MD_CHANGE_CLEAN, &bitmap->mddev->flags);
|
||||
sector &= ~((1ULL << CHUNK_BLOCK_SHIFT(bitmap)) - 1);
|
||||
s = 0;
|
||||
while (s < sector && s < bitmap->mddev->resync_max_sectors) {
|
||||
|
|
|
@ -2167,9 +2167,9 @@ repeat:
|
|||
rdev->recovery_offset = mddev->curr_resync_completed;
|
||||
|
||||
}
|
||||
if (mddev->external || !mddev->persistent) {
|
||||
clear_bit(MD_CHANGE_DEVS, &mddev->flags);
|
||||
if (!mddev->persistent) {
|
||||
clear_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
clear_bit(MD_CHANGE_DEVS, &mddev->flags);
|
||||
wake_up(&mddev->sb_wait);
|
||||
return;
|
||||
}
|
||||
|
@ -2178,7 +2178,6 @@ repeat:
|
|||
|
||||
mddev->utime = get_seconds();
|
||||
|
||||
set_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
if (test_and_clear_bit(MD_CHANGE_DEVS, &mddev->flags))
|
||||
force_change = 1;
|
||||
if (test_and_clear_bit(MD_CHANGE_CLEAN, &mddev->flags))
|
||||
|
@ -3371,7 +3370,7 @@ array_state_show(mddev_t *mddev, char *page)
|
|||
case 0:
|
||||
if (mddev->in_sync)
|
||||
st = clean;
|
||||
else if (test_bit(MD_CHANGE_CLEAN, &mddev->flags))
|
||||
else if (test_bit(MD_CHANGE_PENDING, &mddev->flags))
|
||||
st = write_pending;
|
||||
else if (mddev->safemode)
|
||||
st = active_idle;
|
||||
|
@ -3452,9 +3451,7 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)
|
|||
mddev->in_sync = 1;
|
||||
if (mddev->safemode == 1)
|
||||
mddev->safemode = 0;
|
||||
if (mddev->persistent)
|
||||
set_bit(MD_CHANGE_CLEAN,
|
||||
&mddev->flags);
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
}
|
||||
err = 0;
|
||||
} else
|
||||
|
@ -3466,8 +3463,7 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)
|
|||
case active:
|
||||
if (mddev->pers) {
|
||||
restart_array(mddev);
|
||||
if (mddev->external)
|
||||
clear_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
clear_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
wake_up(&mddev->sb_wait);
|
||||
err = 0;
|
||||
} else {
|
||||
|
@ -6572,6 +6568,7 @@ void md_write_start(mddev_t *mddev, struct bio *bi)
|
|||
if (mddev->in_sync) {
|
||||
mddev->in_sync = 0;
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
set_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
md_wakeup_thread(mddev->thread);
|
||||
did_change = 1;
|
||||
}
|
||||
|
@ -6580,7 +6577,6 @@ void md_write_start(mddev_t *mddev, struct bio *bi)
|
|||
if (did_change)
|
||||
sysfs_notify_dirent_safe(mddev->sysfs_state);
|
||||
wait_event(mddev->sb_wait,
|
||||
!test_bit(MD_CHANGE_CLEAN, &mddev->flags) &&
|
||||
!test_bit(MD_CHANGE_PENDING, &mddev->flags));
|
||||
}
|
||||
|
||||
|
@ -6616,6 +6612,7 @@ int md_allow_write(mddev_t *mddev)
|
|||
if (mddev->in_sync) {
|
||||
mddev->in_sync = 0;
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
set_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
if (mddev->safemode_delay &&
|
||||
mddev->safemode == 0)
|
||||
mddev->safemode = 1;
|
||||
|
@ -6625,7 +6622,7 @@ int md_allow_write(mddev_t *mddev)
|
|||
} else
|
||||
spin_unlock_irq(&mddev->write_lock);
|
||||
|
||||
if (test_bit(MD_CHANGE_CLEAN, &mddev->flags))
|
||||
if (test_bit(MD_CHANGE_PENDING, &mddev->flags))
|
||||
return -EAGAIN;
|
||||
else
|
||||
return 0;
|
||||
|
@ -6823,8 +6820,7 @@ void md_do_sync(mddev_t *mddev)
|
|||
atomic_read(&mddev->recovery_active) == 0);
|
||||
mddev->curr_resync_completed =
|
||||
mddev->curr_resync;
|
||||
if (mddev->persistent)
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||
}
|
||||
|
||||
|
@ -7103,8 +7099,7 @@ void md_check_recovery(mddev_t *mddev)
|
|||
mddev->recovery_cp == MaxSector) {
|
||||
mddev->in_sync = 1;
|
||||
did_change = 1;
|
||||
if (mddev->persistent)
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
}
|
||||
if (mddev->safemode == 1)
|
||||
mddev->safemode = 0;
|
||||
|
|
|
@ -140,7 +140,7 @@ struct mddev_s
|
|||
unsigned long flags;
|
||||
#define MD_CHANGE_DEVS 0 /* Some device status has changed */
|
||||
#define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */
|
||||
#define MD_CHANGE_PENDING 2 /* superblock update in progress */
|
||||
#define MD_CHANGE_PENDING 2 /* switch from 'clean' to 'active' in progress */
|
||||
|
||||
int suspended;
|
||||
atomic_t active_io;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
mktables
|
||||
altivec*.c
|
||||
int*.c
|
||||
tables.c
|
Loading…
Reference in New Issue