소스 검색

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>
Neil Brown 17 년 전
부모
커밋
1a0fd49773
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      drivers/md/md.c

+ 2 - 0
drivers/md/md.c

@@ -5536,6 +5536,8 @@ void md_allow_write(mddev_t *mddev)
 		return;
 		return;
 	if (mddev->ro)
 	if (mddev->ro)
 		return;
 		return;
+	if (!mddev->pers->sync_request)
+		return;
 
 
 	spin_lock_irq(&mddev->write_lock);
 	spin_lock_irq(&mddev->write_lock);
 	if (mddev->in_sync) {
 	if (mddev->in_sync) {