]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] md: allow md arrays to be started read-only (module parameter).
authorNeilBrown <neilb@suse.de>
Wed, 9 Nov 2005 05:39:36 +0000 (21:39 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:38 +0000 (07:56 -0800)
commitf91de92ed6bfb70a3ff607558c910c7bf34d45e9
tree7891da2296aba0302b48220bdd291acc0e92e810
parent19133a4298223422742db7b5f940e8c54c6a1846
[PATCH] md: allow md arrays to be started read-only (module parameter).

When an md array is started, the superblock will be written, and resync may
commense.  This is not good if you want to be completely read-only as, for
example, when preparing to resume from a suspend-to-disk image.

So introduce a module parameter "start_ro" which can be set
to '1' at boot, at module load, or via
  /sys/module/md_mod/parameters/start_ro

When this is set, new arrays get an 'auto-ro' mode, which disables all
internal io (superblock updates, resync, recovery) and is automatically
switched to 'rw' when the first write request arrives.

The array can be set to true 'ro' mode using 'mdadm -r' before the first
write request, or resync can be started without a write using 'mdadm -w'.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c