Version 2.02.67 -
===============================
+ Avoid selecting names under /dev/block if there is an alternative.
Update clustered log kernel module name to log-userspace for 2.6.31 onwards.
Activate only first head of Replicator for vgchange -ay.
Add Replicators' LVs to dtree for activation.
struct dm_hash_table *names;
struct btree *devices;
struct dm_regex *preferred_names_matcher;
+ const char *dev_dir;
int has_scanned;
struct dm_list dirs;
char p0[PATH_MAX], p1[PATH_MAX];
char *s0, *s1;
struct stat stat0, stat1;
+ size_t devdir_len;
/*
* FIXME Better to compare patterns one-at-a-time against all names.
* Built-in rules.
*/
+ /*
+ * Anything beats /dev/block.
+ */
+ devdir_len = strlen(_cache.dev_dir);
+ if (!strncmp(path0, _cache.dev_dir, devdir_len) &&
+ !strncmp(path1, _cache.dev_dir, devdir_len)) {
+ if (!strncmp(path0 + devdir_len, "block/", 6)) {
+ if (strncmp(path1 + devdir_len, "block/", 6))
+ return 1;
+ } else if (!strncmp(path1 + devdir_len, "block/", 6))
+ return 0;
+ }
+
/* Return the path with fewer slashes */
for (p = path0; p++; p = (const char *) strchr(p, '/'))
slash0++;
goto bad;
}
+ if (!(_cache.dev_dir = _strdup(cmd->dev_dir))) {
+ log_error("strdup dev_dir failed.");
+ goto bad;
+ }
+
dm_list_init(&_cache.dirs);
dm_list_init(&_cache.files);