[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 42/56] md: Allow metadata_version to be updated for externally managed metadata.
2.6.27-stable review patch.  If anyone has any objections, please let us know.

From: NeilBrown <>

commit ea43ddd8491feccf36267349748ea91b1194481e upstream.

For externally managed metadata, the 'metadata_version' sysfs
attribute is really just a channel for user-space programs to
communicate about how the array is being managed.
It can be useful for this to be changed while the array is active.

Normally changes to metadata_version are not permitted while the array
is active. Change that so that if the metadata is externally managed,
the metadata_version can be changed to a different flavour of external

Signed-off-by: NeilBrown <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/md/md.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2960,7 +2960,13 @@ metadata_store(mddev_t *mddev, const cha
int major, minor;
char *e;
- if (!list_empty(&mddev->disks))
+ /* Changing the details of 'external' metadata is
+ * always permitted. Otherwise there must be
+ * no devices attached to the array.
+ */
+ if (mddev->external && strncmp(buf, "external:", 9) == 0)
+ ;
+ else if (!list_empty(&mddev->disks))
return -EBUSY;

if (cmd_match(buf, "none")) {

 \ /
  Last update: 2009-02-11 01:45    [W:0.236 / U:5.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site