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-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux