Standardize mount/umount console message to include profile name,
and optionally suppress them with the 'quiet' mount option. We
have been using private namespaces for testing and mounting then
umounting the FS as needed for each job. In this context these
messages end up causing alot of syslog noise.
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I7514f6016c337a358e5e31146644810dff292d02
Reviewed-on: http://review.whamcloud.com/2199
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
.TP
.BI noacl
Disable Access Control List support.
.TP
.BI noacl
Disable Access Control List support.
+.TP
+.BI verbose
+Enable mount/umount console messages.
+.TP
+.BI noverbose
+Disable mount/umount console messages.
.PP
In addition to the standard mount options and backing disk type
(e.g. ext3) options listed in
.PP
In addition to the standard mount options and backing disk type
(e.g. ext3) options listed in
#define LL_SBI_32BIT_API 0x2000 /* generate 32 bit inodes. */
#define LL_SBI_64BIT_HASH 0x4000 /* support 64-bits dir hash/offset */
#define LL_SBI_AGL_ENABLED 0x8000 /* enable agl */
#define LL_SBI_32BIT_API 0x2000 /* generate 32 bit inodes. */
#define LL_SBI_64BIT_HASH 0x4000 /* support 64-bits dir hash/offset */
#define LL_SBI_AGL_ENABLED 0x8000 /* enable agl */
+#define LL_SBI_VERBOSE 0x10000 /* verbose mount/umount */
/* default value for ll_sb_info->contention_time */
#define SBI_DEFAULT_CONTENTION_SECONDS 60
/* default value for ll_sb_info->contention_time */
#define SBI_DEFAULT_CONTENTION_SECONDS 60
cfs_list_add_tail(&sbi->ll_list, &ll_super_blocks);
cfs_spin_unlock(&ll_sb_lock);
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
#ifdef ENABLE_CHECKSUM
sbi->ll_flags |= LL_SBI_CHECKSUM;
#endif
*flags |= tmp;
goto next;
}
*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);
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);
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);
OBD_FREE_PTR(cfg);
RETURN(err);
class_manual_cleanup(obd);
}
class_manual_cleanup(obd);
}
+ if (sbi->ll_flags & LL_SBI_VERBOSE)
+ LCONSOLE_WARN("Unmounted %s\n", profilenm ? profilenm : "");
+
if (profilenm)
class_del_profile(profilenm);
if (profilenm)
class_del_profile(profilenm);
- LCONSOLE_WARN("client %p umount complete\n", cfg.cfg_instance);
-
cfs_module_put(THIS_MODULE);
EXIT;
cfs_module_put(THIS_MODULE);
EXIT;
int ll_remount_fs(struct super_block *sb, int *flags, char *data)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
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;
int err;
__u32 read_only;
KEY_READ_ONLY, sizeof(read_only),
&read_only, NULL);
if (err) {
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);
sb->s_flags |= MS_RDONLY;
else
sb->s_flags &= ~MS_RDONLY;
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");