#define OBD_IOC_NO_TRANSNO _IOW('f', 140, OBD_IOC_DATA_TYPE)
#endif
+static bool is_mgs(void)
+{
+ glob_t path;
+ int rc;
+
+ rc = cfs_get_param_paths(&path, "mgs/MGS/exports");
+ if (!rc) {
+ cfs_free_param_data(&path);
+ return true;
+ }
+
+ return false;
+}
+
static bool is_mds(void)
{
glob_t path;
int rc;
- rc = cfs_get_param_paths(&path, "mdt/*-MDT0000");
+ rc = cfs_get_param_paths(&path, "mdt/*-MDT*/exports");
if (!rc) {
cfs_free_param_data(&path);
return true;
glob_t path;
int rc;
- rc = cfs_get_param_paths(&path, "obdfilter/*-OST0000");
+ rc = cfs_get_param_paths(&path, "obdfilter/*-OST*/exports");
if (!rc) {
cfs_free_param_data(&path);
return true;
lustre_cfg_init(lcfg, cmd, &bufs);
memset(&data, 0, sizeof(data));
+getdev:
if (dynamic) {
if (is_mds()) {
rc = data.ioc_dev = get_mds_device();
rc = -errno;
}
} else {
+ if (!is_mgs()) {
+ dynamic = true;
+ goto getdev;
+ }
rc = data.ioc_dev = get_mgs_device();
}
if (rc < 0)