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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html