aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-02-01 18:08:23 -0500
committerMark Fasheh <mfasheh@suse.com>2008-04-18 11:56:05 -0400
commitb61817e1166c5e19c08baf05196477cc345e1b1a (patch)
tree8da1c387086313aecdbb8f96fd0ab33417860620 /fs/ocfs2/ocfs2.h
parent74ae4e104dfc57017783fc07d5f2f9129062207f (diff)
ocfs2: Add the USERSPACE_STACK incompat bit.
The filesystem gains the USERSPACE_STACK incomat bit and the s_cluster_info field on the superblock. When a userspace stack is in use, the name of the stack is stored on-disk for mount-time verification. The "cluster_stack" option is added to mount(2) processing. The mount process needs to pass the matching stack name. If the passed name and the on-disk name do not match, the mount is failed. When using the classic o2cb stack, the incompat bit is *not* set and no mount option is used other than the usual heartbeat=local. Thus, the filesystem is compatible with older tools. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index af929eca5412..9ff5811345a9 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -248,6 +248,7 @@ struct ocfs2_super
248 struct ocfs2_alloc_stats alloc_stats; 248 struct ocfs2_alloc_stats alloc_stats;
249 char dev_str[20]; /* "major,minor" of the device */ 249 char dev_str[20]; /* "major,minor" of the device */
250 250
251 char osb_cluster_stack[OCFS2_STACK_LABEL_LEN + 1];
251 struct ocfs2_cluster_connection *cconn; 252 struct ocfs2_cluster_connection *cconn;
252 struct ocfs2_lock_res osb_super_lockres; 253 struct ocfs2_lock_res osb_super_lockres;
253 struct ocfs2_lock_res osb_rename_lockres; 254 struct ocfs2_lock_res osb_rename_lockres;
@@ -368,6 +369,12 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
368 return ret; 369 return ret;
369} 370}
370 371
372static inline int ocfs2_userspace_stack(struct ocfs2_super *osb)
373{
374 return (osb->s_feature_incompat &
375 OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK);
376}
377
371static inline int ocfs2_mount_local(struct ocfs2_super *osb) 378static inline int ocfs2_mount_local(struct ocfs2_super *osb)
372{ 379{
373 return (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT); 380 return (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT);