summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorMariusz Dabrowski <mariusz.dabrowski@intel.com>2019-07-10 13:38:53 +0200
committerJes Sorensen <jsorensen@fb.com>2019-07-10 22:12:09 +0200
commitb06815989179e0f153e44e4336290e655edce9a1 (patch)
treedd3b3b2de676d8de7c0ce322300441de4f972f0a /config.c
parentsuper-intel: Use put_unaligned in split_ull (diff)
downloadmdadm-b06815989179e0f153e44e4336290e655edce9a1.tar.xz
mdadm-b06815989179e0f153e44e4336290e655edce9a1.zip
mdadm: load default sysfs attributes after assemblation
Added new type of line to mdadm.conf which allows to specify values of sysfs attributes for MD devices that should be loaded after the array is assembled. Each line is interpreted as list of structures containing sysname of MD device (md126 etc.) and list of sysfs attributes and their values. Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com> Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/config.c b/config.c
index e14eae0c..7592b2d7 100644
--- a/config.c
+++ b/config.c
@@ -80,7 +80,8 @@ char DefaultAltConfFile[] = CONFFILE2;
char DefaultAltConfDir[] = CONFFILE2 ".d";
enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev,
- Homehost, HomeCluster, AutoMode, Policy, PartPolicy, LTEnd };
+ Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs,
+ LTEnd };
char *keywords[] = {
[Devices] = "devices",
[Array] = "array",
@@ -93,6 +94,7 @@ char *keywords[] = {
[AutoMode] = "auto",
[Policy] = "policy",
[PartPolicy]="part-policy",
+ [Sysfs] = "sysfs",
[LTEnd] = NULL
};
@@ -764,6 +766,9 @@ void conf_file(FILE *f)
case PartPolicy:
policyline(line, rule_part);
break;
+ case Sysfs:
+ sysfsline(line);
+ break;
default:
pr_err("Unknown keyword %s\n", line);
}