From: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
To: Sunil Mushran <sunil.mushran@oracle.com>
Cc: viro@zeniv.linux.org.uk, tytso@mit.edu,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH][RFC] vfs: add message print mechanism for the mount/umount into the VFS layer
Date: Wed, 07 Oct 2009 14:56:40 +0900 [thread overview]
Message-ID: <4ACC2D98.8030701@jp.fujitsu.com> (raw)
In-Reply-To: <4ACB784A.3090604@oracle.com>
Hi Sunil,
thank you for your comment.
Sunil Mushran wrote:
> Toshiyuki Okajima wrote:
>> up_write(&namespace_sem);
>> + /* + * message output at mount for log observers
>> + */
>> + if (newmnt->mnt_flags & MNT_VERBOSE_MSG) {
>> + printk(KERN_INFO "Device %s mounted file system type %s
>> read-%s\n",
>> + sb->s_id, sb->s_type->name,
>> + sb->s_flags & MS_RDONLY ? "only" : "write");
>> + /* fs specific messages for mount */
>> + if (sb->s_op != NULL && sb->s_op->mount_msg != NULL)
>> + sb->s_op->mount_msg(sb);
>> + }
>> return 0;
>
> How about allowing the fs to over-ride the default message? Reduces the
> clutter.
> Same on the umount.
>
>
> + if (newmnt->mnt_flags & MNT_VERBOSE_MSG) {
> + if (sb->s_op != NULL && sb->s_op->mount_msg != NULL)
> + sb->s_op->mount_msg(sb);
> + else
> + printk(KERN_INFO "Device %s mounted file system type %s
> read-%s\n",
> + sb->s_id, sb->s_type->name,
> + sb->s_flags & MS_RDONLY ? "only" : "write");
> + }
My purpose is to print the common message on the VFS layer.
By using "sop->mount_msg" or "sop->umount_msg", we can print the additional
messages as the filesystem specific information about mount/umount operation
at the same time if necessary.
- at the mount time
[VFS mount message] <= We can understand a certain filesystem is being
mounted at this moment.
[fs specific messages
... ] <- additional messages as the filesystem specific info
at the mount time.
- at the umount time
[fs specific messages <- additional messages as the filesystem specific info
... ] at the umount time.
[VFS umount message] <= We can understand a certain filesystem has been
unmounted at this moment.
(NOTE: VFS messages == "Device ??? mounted file system type ??? read-???")
Best Regards,
Toshiyuki Okajima
prev parent reply other threads:[~2009-10-07 5:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 3:51 [PATCH][RFC] vfs: add message print mechanism for the mount/umount into the VFS layer Toshiyuki Okajima
2009-10-06 17:03 ` Sunil Mushran
2009-10-07 5:56 ` Toshiyuki Okajima [this message]
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=4ACC2D98.8030701@jp.fujitsu.com \
--to=toshi.okajima@jp.fujitsu.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sunil.mushran@oracle.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).