Print out filesystem label and UUID at server mount time for diagnosis.
b=9937
r=nathan
struct list_head fs_list;
struct module *fs_owner;
char *fs_type;
+ char *(* fs_label)(struct super_block *sb);
+ char *(* fs_uuid)(struct super_block *sb);
void *(* fs_start)(struct inode *inode, int op, void *desc_private,
int logs);
void *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso,
extern struct fsfilt_operations *fsfilt_get_ops(const char *type);
extern void fsfilt_put_ops(struct fsfilt_operations *fs_ops);
+static inline char *fsfilt_label(struct obd_device *obd, struct super_block *sb)
+{
+ if (obd->obd_fsops->fs_label == NULL)
+ return NULL;
+ if (obd->obd_fsops->fs_label(sb)[0] == '\0')
+ return NULL;
+
+ return obd->obd_fsops->fs_label(sb);
+}
+
+static inline __u8 *fsfilt_uuid(struct obd_device *obd, struct super_block *sb)
+{
+ if (obd->obd_fsops->fs_uuid == NULL)
+ return NULL;
+
+ return obd->obd_fsops->fs_uuid(sb);
+}
+
#define FSFILT_OP_UNLINK 1
#define FSFILT_OP_RMDIR 2
#define FSFILT_OP_RENAME 3
#define EXT3_XATTR_INDEX_TRUSTED 4
#endif
+static char *fsfilt_ext3_label(struct super_block *sb)
+{
+ return EXT3_SB(sb)->s_es->s_volume_name;
+}
+
+static char *fsfilt_ext3_uuid(struct super_block *sb)
+{
+ return EXT3_SB(sb)->s_es->s_uuid;
+}
+
/*
* We don't currently need any additional blocks for rmdir and
* unlink transactions because we are storing the OST oa_id inside
static struct fsfilt_operations fsfilt_ext3_ops = {
.fs_type = "ext3",
.fs_owner = THIS_MODULE,
+ .fs_label = fsfilt_ext3_label,
+ .fs_uuid = fsfilt_ext3_uuid,
.fs_start = fsfilt_ext3_start,
.fs_brw_start = fsfilt_ext3_brw_start,
.fs_commit = fsfilt_ext3_commit,
static int mds_reconnect(struct obd_export *exp, struct obd_device *obd,
struct obd_uuid *cluuid,
struct obd_connect_data *data)
-{
+{
int rc;
- ENTRY;
-
+ ENTRY;
+
if (exp == NULL || obd == NULL || cluuid == NULL)
RETURN(-EINVAL);
-
+
rc = mds_connect_internal(exp, data);
-
- RETURN(rc);
-}
+
+ RETURN(rc);
+}
/* Establish a connection to the MDS.
*
{
struct lprocfs_static_vars lvars;
struct lustre_cfg* lcfg = buf;
- char *options = NULL;
struct mds_obd *mds = &obd->u.mds;
struct vfsmount *mnt;
+ struct obd_uuid uuid;
+ __u8 *uuid_ptr;
+ char *options, *str, *label;
char ns_name[48];
unsigned long page;
int rc = 0;
rc = lquota_setup(quota_interface, obd, lcfg);
if (rc)
GOTO(err_fs, rc);
-
+
mds->mds_group_hash = upcall_cache_init(obd->obd_name);
if (IS_ERR(mds->mds_group_hash)) {
rc = PTR_ERR(mds->mds_group_hash);
lprocfs_init_vars(mds, &lvars);
lprocfs_obd_setup(obd, lvars.obd_vars);
+ uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb);
+ if (uuid_ptr != NULL) {
+ class_uuid_unparse(uuid_ptr, &uuid);
+ str = uuid.uuid;
+ } else {
+ str = "no UUID";
+ }
+
+ label = fsfilt_label(obd, obd->u.obt.obt_sb);
if (obd->obd_recovering) {
- LCONSOLE_WARN("MDT %s now serving %s, but will be in recovery "
- "until %d %s reconnect, or if no clients "
- "reconnect for %d:%.02d; during that time new "
+ LCONSOLE_WARN("MDT %s now serving %s (%s%s%s), but will be in "
+ "recovery until %d %s reconnect, or if no clients"
+ " reconnect for %d:%.02d; during that time new "
"clients will not be allowed to connect. "
"Recovery progress can be monitored by watching "
"/proc/fs/lustre/mds/%s/recovery_status.\n",
- obd->obd_name,
- lustre_cfg_string(lcfg, 1),
+ obd->obd_name, lustre_cfg_string(lcfg, 1),
+ label ?: "", label ? "/" : "", str,
obd->obd_recoverable_clients,
(obd->obd_recoverable_clients == 1)
? "client" : "clients",
(int)(OBD_RECOVERY_TIMEOUT / HZ) % 60,
obd->obd_name);
} else {
- LCONSOLE_INFO("MDT %s now serving %s with recovery %s.\n",
- obd->obd_name,
- lustre_cfg_string(lcfg, 1),
+ LCONSOLE_INFO("MDT %s now serving %s (%s%s%s) with recovery "
+ "%s\n", obd->obd_name, lustre_cfg_string(lcfg, 1),
+ label ?: "", label ? "/" : "", str,
obd->obd_replayable ? "enabled" : "disabled");
}
RETURN(0);
err_qctxt:
- lquota_cleanup(quota_interface, obd);
+ lquota_cleanup(quota_interface, obd);
err_fs:
/* No extra cleanup needed for llog_init_commit_thread() */
mds_fs_cleanup(obd);
struct lustre_cfg* lcfg = buf;
struct filter_obd *filter = &obd->u.filter;
struct vfsmount *mnt;
- char *str;
+ struct obd_uuid uuid;
+ __u8 *uuid_ptr;
+ char *str, *label;
char ns_name[48];
int rc;
ENTRY;
filter->fo_destroy_in_progress = 0;
sema_init(&filter->fo_create_lock, 1);
-
spin_lock_init(&filter->fo_translock);
spin_lock_init(&filter->fo_objidlock);
spin_lock_init(&filter->fo_stats_lock);
if (rc)
GOTO(err_post, rc);
+ uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb);
+ if (uuid_ptr != NULL) {
+ class_uuid_unparse(uuid_ptr, &uuid);
+ str = uuid.uuid;
+ } else {
+ str = "no UUID";
+ }
+ label = fsfilt_label(obd, obd->u.obt.obt_sb);
+
if (obd->obd_recovering) {
- LCONSOLE_WARN("OST %s now serving %s, but will be in recovery "
- "until %d %s reconnect, or if no clients "
- "reconnect for %d:%.02d; during that time new "
+ LCONSOLE_WARN("OST %s now serving %s (%s%s%s), but will be in"
+ "recovery until %d %s reconnect, or if no clients"
+ " reconnect for %d:%.02d; during that time new "
"clients will not be allowed to connect. "
"Recovery progress can be monitored by watching "
"/proc/fs/lustre/obdfilter/%s/recovery_status.\n",
- obd->obd_name,
- lustre_cfg_string(lcfg, 1),
+ obd->obd_name, lustre_cfg_string(lcfg, 1),
+ label ?: "", label ? "/" : "", str,
obd->obd_recoverable_clients,
(obd->obd_recoverable_clients == 1)
? "client" : "clients",
(int)(OBD_RECOVERY_TIMEOUT / HZ) % 60,
obd->obd_name);
} else {
- LCONSOLE_INFO("OST %s now serving %s with recovery %s.\n",
- obd->obd_name,
- lustre_cfg_string(lcfg, 1),
+ LCONSOLE_INFO("OST %s now serving %s (%s%s%s) with recovery "
+ "%s\n", obd->obd_name, lustre_cfg_string(lcfg, 1),
+ label ?: "", label ? "/" : "", str,
obd->obd_replayable ? "enabled" : "disabled");
}