]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] md: improve locking on 'safemode' and move superblock writes
authorNeilBrown <neilb@cse.unsw.edu.au>
Wed, 22 Jun 2005 00:17:12 +0000 (17:17 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 02:07:43 +0000 (19:07 -0700)
commit9a36912fc8f90bae737047861e65fdacb01dc753
tree95a8b9228534cebb12eb31c1cc9cc0c45f685410
parent6d2b27d7194e069f9233c94274bc8cd99ee7801d
[PATCH] md: improve locking on 'safemode' and move superblock writes

When md marks the superblock dirty before a write, it calls
generic_make_request (to write the superblock) from within
generic_make_request (to write the first dirty block), which could cause
problems later.

With this patch, the superblock write is always done by the helper thread, and
write request are delayed until that write completes.

Also, the locking around marking the array dirty and writing the superblock is
improved to avoid possible races.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/md/raid6main.c
include/linux/raid/md.h
include/linux/raid/md_k.h