From: Boaz Harrosh <bharrosh@panasas.com>
To: open-osd mailing-list <osd-dev@open-osd.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] exofs: Prints on mount and unmout
Date: Sun, 13 Sep 2009 20:13:39 +0300 [thread overview]
Message-ID: <4AAD2843.6020204@panasas.com> (raw)
It is important to print in the logs when a filesystem was
mounted and eventually unmounted.
Print the osd-device's osd_name and partition ID 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>
---
fs/exofs/super.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 9f500de..920f016 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)
--
1.6.2.1
reply other threads:[~2009-09-13 17:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AAD2843.6020204@panasas.com \
--to=bharrosh@panasas.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=osd-dev@open-osd.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.