Whamcloud - gitweb
LU-12703 utils: reset rootpath in llapi_search_rootpath()
[fs/lustre-release.git] / lustre / utils / libmount_utils_ldiskfs.c
index 15f79bf..60179b6 100644 (file)
@@ -607,6 +607,10 @@ static int enable_default_ext4_features(struct mkfs_opts *mop, char *anchor,
        if (enable_64bit || strstr(mop->mo_mkfsopts, "meta_bg"))
                append_unique(anchor, ",", "^resize_inode", NULL, maxbuflen);
 
+       /* Allow xattrs larger than one block, stored in a separate inode */
+       if (IS_MDT(&mop->mo_ldd) && is_e2fsprogs_feature_supp("-O ea_inode"))
+               append_unique(anchor, ",", "ea_inode", NULL, maxbuflen);
+
        /* Cluster inode/block bitmaps and inode table for more efficient IO.
         * Align the flex groups on a 1MB boundary for better performance. */
        /* This -O feature needs to go last, since it adds the "-G" option. */
@@ -1253,13 +1257,13 @@ static int tune_block_dev_slaves(const char *sys_path, struct mount_opts *mop)
        }
 
        while ((d = readdir(slaves_dir)) != NULL) {
-               char path[PATH_MAX];
+               char path[PATH_MAX * 2];
                int rc2;
 
                if (d->d_type != DT_LNK)
                        continue;
 
-               snprintf(path, sizeof(path), "%s/%s", slaves_path, d->d_name);
+               snprintf(path, sizeof(path), "/dev/%s", d->d_name);
                rc2 = tune_block_dev(path, mop);
                if (rc2 != 0)
                        rc = rc2;
@@ -1277,7 +1281,7 @@ static int tune_block_dev(const char *src, struct mount_opts *mop)
 {
        struct stat st;
        char sys_path[PATH_MAX];
-       char partition_path[PATH_MAX];
+       char partition_path[PATH_MAX + sizeof("partition")];
        char *real_sys_path = NULL;
        int rc;