]> err.no Git - linux-2.6/commitdiff
Don't try to make md arrays dirty if that is not meaningful.
authorNeil Brown <neilb@notabene.brown>
Fri, 27 Jun 2008 22:31:27 +0000 (08:31 +1000)
committerNeil Brown <neilb@notabene.brown>
Fri, 27 Jun 2008 22:31:27 +0000 (08:31 +1000)
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>
drivers/md/md.c

index 97852099defda678291bfa24d99e38349be466bf..9e3ce432e37e9936583223a9b54e77834b809bed 100644 (file)
@@ -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) {