Bugzilla : 15576
Description: Resolve device initialization race
Details : Prevent proc handler from accessing devices added to the
- obd_devs array but yet be intialized.
+ obd_devs array but yet be intialized.
Severity : enhancement
Bugzilla : 15308
Details : REQ_BLOCK_PC requests are not handled properly in the sd iostat
patch, causing memory corruption.
+Severity : minor
+Frequency : rare
+Bugzilla : 16140
+Description: journal_dev option does not work in b1_6
+Details : pass mount option during pre-mount.
+
--------------------------------------------------------------------------------
2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com>
Note ext3/ldiskfs can't be mounted ro. */
s_flags = sb->s_flags;
+ /* allocate memory for options */
+ OBD_PAGE_ALLOC(__page, CFS_ALLOC_STD);
+ if (!__page)
+ GOTO(out_free, rc = -ENOMEM);
+ page = (unsigned long)cfs_page_address(__page);
+ options = (char *)page;
+ memset(options, 0, CFS_PAGE_SIZE);
+
+ /* mount-line options must be added for pre-mount because it may
+ * contain mount options such as journal_dev which are required
+ * to mount successfuly the underlying filesystem */
+ if (lmd->lmd_opts && (*(lmd->lmd_opts) != 0))
+ strncat(options, lmd->lmd_opts, CFS_PAGE_SIZE - 1);
+
/* Pre-mount ldiskfs to read the MOUNT_DATA_FILE */
CDEBUG(D_MOUNT, "Pre-mount ldiskfs %s\n", lmd->lmd_dev);
- mnt = ll_kern_mount("ldiskfs", s_flags, lmd->lmd_dev, 0);
+ mnt = ll_kern_mount("ldiskfs", s_flags, lmd->lmd_dev, (void *)options);
if (IS_ERR(mnt)) {
rc = PTR_ERR(mnt);
CERROR("premount %s:%#lx ldiskfs failed: %d "
/* Done with our pre-mount, now do the real mount. */
/* Glom up mount options */
- OBD_PAGE_ALLOC(__page, CFS_ALLOC_STD);
- if (!__page)
- GOTO(out_free, rc = -ENOMEM);
- page = (unsigned long)cfs_page_address(__page);
-
- options = (char *)page;
memset(options, 0, CFS_PAGE_SIZE);
strncpy(options, ldd->ldd_mount_opts, CFS_PAGE_SIZE - 2);
MT_STR(ldd), lmd->lmd_dev, options);
mnt = ll_kern_mount(MT_STR(ldd), s_flags, lmd->lmd_dev,
(void *)options);
- OBD_PAGE_FREE(__page);
if (IS_ERR(mnt)) {
rc = PTR_ERR(mnt);
CERROR("ll_kern_mount failed: rc = %d\n", rc);
GOTO(out_free, rc);
}
+ OBD_PAGE_FREE(__page);
lsi->lsi_ldd = ldd; /* freed at lsi cleanup */
CDEBUG(D_SUPER, "%s: mnt = %p\n", lmd->lmd_dev, mnt);
RETURN(mnt);
out_free:
+ if (__page)
+ OBD_PAGE_FREE(__page);
OBD_FREE(ldd, sizeof(*ldd));
lsi->lsi_ldd = NULL;
RETURN(ERR_PTR(rc));