aboutsummaryrefslogtreecommitdiff
path: root/fs/exofs
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-09-03 20:38:02 +0300
committerBoaz Harrosh <bharrosh@panasas.com>2009-12-10 09:59:20 +0200
commit19fe294f2eaee33574ac1fdcf3cc26880de820ea (patch)
treeea00168d7f7fb8594c40a41cdb9d4aeea8ec9222 /fs/exofs
parent9cfdc7aa9f1b59627029ad00a58c3f59eb2cc383 (diff)
exofs: Prints on mount and unmout
It is important to print in the logs when a filesystem was mounted and eventually unmounted. Print the osd-device's osd_name and pid the FS was mounted/unmounted on. TODO: How to also print the namespace path the filesystem was mounted on? Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r--fs/exofs/super.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 9f500dec3b5..920f0165edf 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -257,6 +257,15 @@ static void exofs_write_super(struct super_block *sb)
sb->s_dirt = 0;
}
+static void _exofs_print_device(const char *msg, const char *dev_path,
+ struct osd_dev *od, u64 pid)
+{
+ const struct osd_dev_info *odi = osduld_device_info(od);
+
+ printk(KERN_NOTICE "exofs: %s %s osd_name-%s pid-0x%llx\n",
+ msg, dev_path ?: "", odi->osdname, _LLU(pid));
+}
+
/*
* This function is called when the vfs is freeing the superblock. We just
* need to free our own part.
@@ -279,6 +288,7 @@ static void exofs_put_super(struct super_block *sb)
msecs_to_jiffies(100));
}
+ _exofs_print_device("Unmounting", NULL, sbi->s_dev, sbi->s_pid);
osduld_put_device(sbi->s_dev);
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
@@ -395,6 +405,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
goto free_sbi;
}
+ _exofs_print_device("Mounting", opts->dev_name, sbi->s_dev, sbi->s_pid);
ret = 0;
out:
if (or)