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
*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 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;
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;
}