[Ocfs2-tools-devel] [PATCH 01/11] mkfs.ocfs2: Select extended slot map with a userspace cluster stack.
Joel Becker
joel.becker at oracle.com
Tue May 27 18:44:21 PDT 2008
Userspace cluster stacks require the extended slot map. When a
userspace cluster stack is requested or detected during mkfs, the
extended slot map will be used.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
mkfs.ocfs2/check.c | 10 +++++++---
mkfs.ocfs2/mkfs.c | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/mkfs.ocfs2/check.c b/mkfs.ocfs2/check.c
index 901132c..543a3c3 100644
--- a/mkfs.ocfs2/check.c
+++ b/mkfs.ocfs2/check.c
@@ -203,10 +203,14 @@ int ocfs2_fill_cluster_information(State *s)
free(s->cluster_name);
s->cluster_name = NULL;
}
- if (s->cluster_stack)
- fprintf(stdout, "Cluster stack: %s\nCluster name: %s\n",
+ if (s->cluster_stack) {
+ fprintf(stdout,
+ "Cluster stack: %s\n"
+ "Cluster name: %s\n"
+ "NOTE: Selecting extended slot map for userspace "
+ "cluster stack\n",
s->cluster_stack, s->cluster_name);
- else
+ } else
fprintf(stdout, "Cluster stack: classic o2cb\n");
rc = 0;
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index f43daf2..77018af 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -1857,7 +1857,9 @@ format_superblock(State *s, SystemFileDiskRecord *rec,
OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT;
if (s->cluster_stack) {
- s->feature_flags.incompat |= OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK;
+ s->feature_flags.incompat |=
+ (OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP|
+ OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK);
memcpy(di->id2.i_super.s_cluster_info.ci_stack,
s->cluster_stack, OCFS2_STACK_LABEL_LEN);
memcpy(di->id2.i_super.s_cluster_info.ci_cluster,
--
1.5.4.5
More information about the Ocfs2-tools-devel
mailing list