aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@notabene.brown>2008-06-27 18:31:27 -0400
committerNeil Brown <neilb@notabene.brown>2008-06-27 18:31:27 -0400
commit1a0fd497733bd029a7d5f2e5c69b1dff715b7792 (patch)
tree30f7d07f1ae8cdbebc757d3dfb3fe81e0406e2b5 /drivers/md/md.c
parentf48ed538386cb41559282d989354e8f5d442d71c (diff)
Don't try to make md arrays dirty if that is not meaningful.
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 97852099defd..9e3ce432e37e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5536,6 +5536,8 @@ void md_allow_write(mddev_t *mddev)
5536 return; 5536 return;
5537 if (mddev->ro) 5537 if (mddev->ro)
5538 return; 5538 return;
5539 if (!mddev->pers->sync_request)
5540 return;
5539 5541
5540 spin_lock_irq(&mddev->write_lock); 5542 spin_lock_irq(&mddev->write_lock);
5541 if (mddev->in_sync) { 5543 if (mddev->in_sync) {