-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cfs_list_add_tail(&sbi->ll_list, &ll_super_blocks);
cfs_spin_unlock(&ll_sb_lock);
+ sbi->ll_flags |= LL_SBI_VERBOSE;
#ifdef ENABLE_CHECKSUM
sbi->ll_flags |= LL_SBI_CHECKSUM;
#endif
OBD_CONNECT_CANCELSET | OBD_CONNECT_FID |
OBD_CONNECT_AT | OBD_CONNECT_LOV_V3 |
OBD_CONNECT_RMT_CLIENT | OBD_CONNECT_VBR |
- OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH;
+ OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH|
+ OBD_CONNECT_EINPROGRESS |
+ OBD_CONNECT_JOBSTATS;
if (sbi->ll_flags & LL_SBI_SOM_PREVIEW)
data->ocd_connect_flags |= OBD_CONNECT_SOM;
GOTO(out_md, err);
}
- err = obd_statfs(obd, osfs,
+ err = obd_statfs(NULL, sbi->ll_md_exp, osfs,
cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), 0);
if (err)
GOTO(out_md_fid, err);
}
size = sizeof(*data);
- err = obd_get_info(sbi->ll_md_exp, sizeof(KEY_CONN_DATA),
+ err = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_CONN_DATA),
KEY_CONN_DATA, &size, data, NULL);
if (err) {
CERROR("Get connect data failed: %d \n", err);
OBD_CONNECT_AT | OBD_CONNECT_RMT_CLIENT |
OBD_CONNECT_OSS_CAPA | OBD_CONNECT_VBR|
OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH |
- OBD_CONNECT_MAXBYTES;
+ OBD_CONNECT_MAXBYTES |
+ OBD_CONNECT_EINPROGRESS |
+ OBD_CONNECT_JOBSTATS;
if (sbi->ll_flags & LL_SBI_SOM_PREVIEW)
data->ocd_connect_flags |= OBD_CONNECT_SOM;
* agreement on the supported algorithms at connect time */
data->ocd_connect_flags |= OBD_CONNECT_CKSUM;
- if (OBD_FAIL_CHECK(OBD_FAIL_OSC_CKSUM_ADLER_ONLY))
- data->ocd_cksum_types = OBD_CKSUM_ADLER;
- else
- data->ocd_cksum_types = cksum_types_supported();
+ if (OBD_FAIL_CHECK(OBD_FAIL_OSC_CKSUM_ADLER_ONLY))
+ data->ocd_cksum_types = OBD_CKSUM_ADLER;
+ else
+ data->ocd_cksum_types = cksum_types_supported_client();
}
#ifdef HAVE_LRU_RESIZE_SUPPORT
#endif
checksum = sbi->ll_flags & LL_SBI_CHECKSUM;
- err = obd_set_info_async(sbi->ll_dt_exp, sizeof(KEY_CHECKSUM),
+ err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CHECKSUM),
KEY_CHECKSUM, sizeof(checksum), &checksum,
NULL);
cl_sb_init(sb);
*lmmsize = obd_size_diskmd(sbi->ll_dt_exp, NULL);
size = sizeof(int);
- rc = obd_get_info(sbi->ll_md_exp, sizeof(KEY_MAX_EASIZE),
+ rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_MAX_EASIZE),
KEY_MAX_EASIZE, &size, lmmsize, NULL);
if (rc)
CERROR("Get max mdsize error rc %d \n", rc);
*flags |= tmp;
goto next;
}
-
+ tmp = ll_set_opt("verbose", s1, LL_SBI_VERBOSE);
+ if (tmp) {
+ *flags |= tmp;
+ goto next;
+ }
+ tmp = ll_set_opt("noverbose", s1, LL_SBI_VERBOSE);
+ if (tmp) {
+ *flags &= ~tmp;
+ goto next;
+ }
LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
s1);
RETURN(-EINVAL);
OBD_FREE(dt, strlen(lprof->lp_dt) + instlen + 2);
if (err)
ll_put_super(sb);
- else
- LCONSOLE_WARN("Client %s has started\n", profilenm);
+ else if (sbi->ll_flags & LL_SBI_VERBOSE)
+ LCONSOLE_WARN("Mounted %s\n", profilenm);
OBD_FREE_PTR(cfg);
RETURN(err);
class_manual_cleanup(obd);
}
+ if (sbi->ll_flags & LL_SBI_VERBOSE)
+ LCONSOLE_WARN("Unmounted %s\n", profilenm ? profilenm : "");
+
if (profilenm)
class_del_profile(profilenm);
cl_env_cache_purge(~0);
- LCONSOLE_WARN("client %p umount complete\n", cfg.cfg_instance);
-
cfs_module_put(THIS_MODULE);
EXIT;
int rc;
ENTRY;
- rc = obd_statfs(class_exp2obd(sbi->ll_md_exp), osfs, max_age, flags);
+ rc = obd_statfs(NULL, sbi->ll_md_exp, osfs, max_age, flags);
if (rc) {
CERROR("md_statfs fails: rc = %d\n", rc);
RETURN(rc);
if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
flags |= OBD_STATFS_NODELAY;
- rc = obd_statfs_rqset(class_exp2obd(sbi->ll_dt_exp),
- &obd_osfs, max_age, flags);
+ rc = obd_statfs_rqset(sbi->ll_dt_exp, &obd_osfs, max_age, flags);
if (rc) {
CERROR("obd_statfs fails: rc = %d\n", rc);
RETURN(rc);
CDEBUG(D_SEC, "flush context for user %d\n", cfs_curproc_uid());
- obd_set_info_async(sbi->ll_md_exp,
+ obd_set_info_async(NULL, sbi->ll_md_exp,
sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX,
0, NULL, NULL);
- obd_set_info_async(sbi->ll_dt_exp,
+ obd_set_info_async(NULL, sbi->ll_dt_exp,
sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX,
0, NULL, NULL);
return 0;
int ll_remount_fs(struct super_block *sb, int *flags, char *data)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
+ char *profilenm = get_profile_name(sb);
int err;
__u32 read_only;
if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
read_only = *flags & MS_RDONLY;
- err = obd_set_info_async(sbi->ll_md_exp,
+ err = obd_set_info_async(NULL, sbi->ll_md_exp,
sizeof(KEY_READ_ONLY),
KEY_READ_ONLY, sizeof(read_only),
&read_only, NULL);
if (err) {
- CERROR("Failed to change the read-only flag during "
- "remount: %d\n", err);
+ LCONSOLE_WARN("Failed to remount %s %s (%d)\n",
+ profilenm, read_only ?
+ "read-only" : "read-write", err);
return err;
}
sb->s_flags |= MS_RDONLY;
else
sb->s_flags &= ~MS_RDONLY;
+
+ if (sbi->ll_flags & LL_SBI_VERBOSE)
+ LCONSOLE_WARN("Remounted %s %s\n", profilenm,
+ read_only ? "read-only" : "read-write");
}
return 0;
}