Re: [PATCH][RFC] vfs: add message print mechanism for the mount/umount into the VFS layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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");
+	}



--
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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux