[Ocfs2-commits] mfasheh commits r2584 -
branches/readonly-operation/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Sep 16 17:54:47 CDT 2005
Author: mfasheh
Date: 2005-09-16 17:54:46 -0500 (Fri, 16 Sep 2005)
New Revision: 2584
Modified:
branches/readonly-operation/fs/ocfs2/ocfs2.h
branches/readonly-operation/fs/ocfs2/super.c
Log:
* Only check local heartbeat on on hard readonly and set the soft readonly
flag for MS_RDONLY mounts
* OCFS2_OSB_ERROR_FS was incorrectly defined
Modified: branches/readonly-operation/fs/ocfs2/ocfs2.h
===================================================================
--- branches/readonly-operation/fs/ocfs2/ocfs2.h 2005-09-16 22:23:33 UTC (rev 2583)
+++ branches/readonly-operation/fs/ocfs2/ocfs2.h 2005-09-16 22:54:46 UTC (rev 2584)
@@ -182,7 +182,7 @@
#define OCFS2_OSB_SOFT_RO 0x0001
#define OCFS2_OSB_HARD_RO 0x0002
-#define OCFS2_OSB_ERROR_FS 0x0003
+#define OCFS2_OSB_ERROR_FS 0x0004
struct _ocfs2_journal;
typedef struct _ocfs2_journal_handle ocfs2_journal_handle;
Modified: branches/readonly-operation/fs/ocfs2/super.c
===================================================================
--- branches/readonly-operation/fs/ocfs2/super.c 2005-09-16 22:23:33 UTC (rev 2583)
+++ branches/readonly-operation/fs/ocfs2/super.c 2005-09-16 22:54:46 UTC (rev 2584)
@@ -592,11 +592,20 @@
"will be skipped.\n");
}
- if (!ocfs2_is_hard_readonly(osb) &&
- !(osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL)) {
- mlog(ML_ERROR, "No heartbeat for device (%s)\n", sb->s_id);
- status = -EINVAL;
- goto read_super_error;
+ if (!ocfs2_is_hard_readonly(osb)) {
+ /* If this isn't a hard readonly mount, then we need
+ * to make sure that heartbeat is in a valid state,
+ * and that we mark ourselves soft readonly is -oro
+ * was specified. */
+ if (!(osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL)) {
+ mlog(ML_ERROR, "No heartbeat for device (%s)\n",
+ sb->s_id);
+ status = -EINVAL;
+ goto read_super_error;
+ }
+
+ if (sb->s_flags & MS_RDONLY)
+ ocfs2_set_ro_flag(osb, 0);
}
status = ocfs2_mount_volume(sb);
More information about the Ocfs2-commits
mailing list