Skip to content

Commit

Permalink
Don't try to make md arrays dirty if that is not meaningful.
Browse files Browse the repository at this point in the history
Arrays personalities such as 'raid0' and 'linear' have no redundancy,
and so marking them as 'clean' or 'dirty' is not meaningful.
So always allow write requests without requiring a superblock update.

Such arrays types are detected by ->sync_request being NULL.  If it is
not possible to send a sync request we don't need a 'dirty' flag because
all a dirty flag does is trigger some sync_requests.

Signed-off-by: Neil Brown <neilb@suse.de>
  • Loading branch information
Neil Brown committed Jun 27, 2008
1 parent f48ed53 commit 1a0fd49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -5536,6 +5536,8 @@ void md_allow_write(mddev_t *mddev)
return;
if (mddev->ro)
return;
if (!mddev->pers->sync_request)
return;

spin_lock_irq(&mddev->write_lock);
if (mddev->in_sync) {
Expand Down

0 comments on commit 1a0fd49

Please sign in to comment.