Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Branch HEAD
[fs/lustre-release.git]
/
lustre
/
obdclass
/
obd_mount.c
diff --git
a/lustre/obdclass/obd_mount.c
b/lustre/obdclass/obd_mount.c
index
b070f25
..
a09dc36
100644
(file)
--- a/
lustre/obdclass/obd_mount.c
+++ b/
lustre/obdclass/obd_mount.c
@@
-750,8
+750,8
@@
static int lustre_stop_mgc(struct super_block *sb)
{
struct lustre_sb_info *lsi = s2lsi(sb);
struct obd_device *obd;
- char *niduuid, *ptr = 0;
- int i, rc = 0, len;
+ char *niduuid
= 0
, *ptr = 0;
+ int i, rc = 0, len
= 0
;
ENTRY;
if (!lsi)
@@
-770,11
+770,8
@@
static int lustre_stop_mgc(struct super_block *sb)
GOTO(out, rc = -EBUSY);
}
- /* MGC must always stop */
- obd->obd_force = 1;
- /* client_disconnect_export uses the no_recov flag to decide whether it
- should disconnect or just invalidate. (The MGC has no
- recoverable data in any case.) */
+ /* The MGC has no recoverable data in any case.
+ * force shotdown set in umount_begin */
obd->obd_no_recov = 1;
if (obd->u.cli.cl_mgc_mgsexp)
@@
-1305,6
+1302,7
@@
static struct vfsmount *server_kernel_mount(struct super_block *sb)
struct vfsmount *mnt;
char *options = NULL;
unsigned long page, s_flags;
+ struct page *__page;
int rc;
ENTRY;
@@
-1321,25
+1319,10
@@
static struct vfsmount *server_kernel_mount(struct super_block *sb)
mnt = ll_kern_mount("ldiskfs", s_flags, lmd->lmd_dev, 0);
if (IS_ERR(mnt)) {
rc = PTR_ERR(mnt);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- /* 2.6 kernels: if ldiskfs fails, try ldiskfs2 */
- mnt = ll_kern_mount("ldiskfs2", s_flags, lmd->lmd_dev, 0);
- if (IS_ERR(mnt)) {
- int rc2 = PTR_ERR(mnt);
- CERROR("premount %s:%#lx ldiskfs failed: %d, ldiskfs2 "
- "failed: %d. Is the ldiskfs module available?\n",
- lmd->lmd_dev, s_flags, rc, rc2);
- GOTO(out_free, rc);
- }
-#else
- /* 2.4 kernels: if ldiskfs fails, try ext3 */
- mnt = ll_kern_mount("ext3", s_flags, lmd->lmd_dev, 0);
- if (IS_ERR(mnt)) {
- rc = PTR_ERR(mnt);
- CERROR("premount ext3 failed: rc = %d\n", rc);
- GOTO(out_free, rc);
- }
-#endif
+ CERROR("premount %s:%#lx ldiskfs failed: %d "
+ "Is the ldiskfs module available?\n",
+ lmd->lmd_dev, s_flags, rc );
+ GOTO(out_free, rc);
}
OBD_SET_CTXT_MAGIC(&mount_ctxt);
@@
-1358,9
+1341,10
@@
static struct vfsmount *server_kernel_mount(struct super_block *sb)
/* Done with our pre-mount, now do the real mount. */
/* Glom up mount options */
-
page = __get_free_page(GFP_KERNEL
);
- if (!page)
+
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);
@@
-1382,7
+1366,7
@@
static struct vfsmount *server_kernel_mount(struct super_block *sb)
MT_STR(ldd), lmd->lmd_dev, options);
mnt = ll_kern_mount(MT_STR(ldd), s_flags, lmd->lmd_dev,
(void *)options);
-
free_page(
page);
+
OBD_PAGE_FREE(__
page);
if (IS_ERR(mnt)) {
rc = PTR_ERR(mnt);
CERROR("ll_kern_mount failed: rc = %d\n", rc);
@@
-1403,7
+1387,7
@@
static void server_wait_finished(struct vfsmount *mnt)
{
wait_queue_head_t waitq;
struct l_wait_info lwi;
- int retries =
12
0;
+ int retries =
33
0;
init_waitqueue_head(&waitq);
@@
-1461,12
+1445,10
@@
static void server_put_super(struct super_block *sb)
obd = class_name2obd(lsi->lsi_ldd->ldd_svname);
if (obd) {
CDEBUG(D_MOUNT, "stopping %s\n", obd->obd_name);
- if (lsi->lsi_flags & LSI_UMOUNT_FORCE)
- obd->obd_force = 1;
if (lsi->lsi_flags & LSI_UMOUNT_FAILOVER)
obd->obd_fail = 1;
/* We can't seem to give an error return code
-
to .put_super, so we better make sure we clean up! */
+
*
to .put_super, so we better make sure we clean up! */
obd->obd_force = 1;
class_manual_cleanup(obd);
} else {
@@
-2121,8
+2103,6
@@
void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb))
/***************** FS registration ******************/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-/* 2.5 and later */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
struct super_block * lustre_get_sb(struct file_system_type *fs_type,
int flags, const char *devname, void * data)
@@
-2162,28
+2142,6
@@
struct file_system_type lustre_fs_type = {
.fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV,
};
-#else
-/* 2.4 */
-static struct super_block *lustre_read_super(struct super_block *sb,
- void *data, int silent)
-{
- int rc;
- ENTRY;
-
- rc = lustre_fill_super(sb, data, silent);
- if (rc)
- RETURN(NULL);
- RETURN(sb);
-}
-
-static struct file_system_type lustre_fs_type = {
- .owner = THIS_MODULE,
- .name = "lustre",
- .fs_flags = FS_NFSEXP_FSID,
- .read_super = lustre_read_super,
-};
-#endif
-
int lustre_register_fs(void)
{
return register_filesystem(&lustre_fs_type);