From owner-freebsd-hackers Sun Jul 9 12:51:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tkc.att.ne.jp (tkc.att.ne.jp [165.76.16.7]) by hub.freebsd.org (Postfix) with ESMTP id 2915537B585 for ; Sun, 9 Jul 2000 12:51:32 -0700 (PDT) (envelope-from mzaki@tkc.att.ne.jp) Received: from work.mzaki.nom (138.pool5.tokyo.att.ne.jp [165.76.22.153]) by tkc.att.ne.jp (8.8.8+Spin/3.6W-CONS(10/24/99)) id EAA21588; Mon, 10 Jul 2000 04:51:29 +0900 (JST) Received: from localhost (mzaki@localhost [127.0.0.1]) by work.mzaki.nom (8.9.3/8.9.3) with ESMTP id EAA00458 for ; Mon, 10 Jul 2000 04:51:32 +0900 (JST) (envelope-from mzaki@tkc.att.ne.jp) To: FreeBSD-hackers@FreeBSD.ORG Subject: Re: why the RockRidge message? In-Reply-To: In your message of "Sun, 9 Jul 2000 20:04:16 +0200" <20000709200416.B760@freebie.wbnet> References: <20000708200629.A2570@freebie.wbnet> <396871AD.B41ADFAB@newsguy.com> <863dljweu5.wl@tkc.att.ne.jp> <20000709200416.B760@freebie.wbnet> From: Motomichi Matsuzaki X-Mailer: Mew version 1.95b3 on XEmacs 21.1 (Bryce Canyon) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Jul_10_04:51:26_2000_518)--" Content-Transfer-Encoding: 7bit Message-Id: <20000710045132W.mzaki@tkc.att.ne.jp> Date: Mon, 10 Jul 2000 04:51:32 +0900 X-Dispatcher: imput version 991007(IM132) Lines: 102 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----Next_Part(Mon_Jul_10_04:51:26_2000_518)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, At Sun, 9 Jul 2000 20:04:16 +0200, Wilko Bulte wrote: > > >> I really don't understand why the cd9660 filesystem needs to whine about the > > >> RockRidge extensions everytime one mounts a RR cdrom. > > > The right solution would be return this > > > information upon request through some mean. > Wouldn't it be possible to display this when one types 'mount'? technically possible, but there is few room on the bit fields for this purpose. see MNT_* are defined for mnt_flag in struct mount, its unused fields are only 4bits (0x0f000000). yes, 4bits are enough for representing extension types, however, this is the limited resource. if extending mnt_flag to 64bit is allowed in future, we shall go ahead. and sample implementation is attached -- Motomichi Matsuzaki Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan ----Next_Part(Mon_Jul_10_04:51:26_2000_518)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Description: mount.extension.patch Content-Disposition: attachment; filename="mount.extension.patch" --- sys/isofs/cd9660/cd9660_vfsops.c.original Thu Jun 29 12:06:16 2000 +++ sys/isofs/cd9660/cd9660_vfsops.c Mon Jul 10 03:45:36 2000 @@ -469,6 +469,7 @@ if (high_sierra) { /* this effectively ignores all the mount flags */ - log(LOG_INFO, "cd9660: High Sierra Format\n"); isomp->iso_ftype = ISO_FTYPE_HIGH_SIERRA; } else switch (isomp->im_flags&(ISOFSMNT_NORRIP|ISOFSMNT_GENS)) { @@ -479,7 +480,7 @@ isomp->iso_ftype = ISO_FTYPE_9660; break; case 0: - log(LOG_INFO, "cd9660: RockRidge Extension\n"); + mp->mnt_flag |= MNT_ROCKRIDGE; isomp->iso_ftype = ISO_FTYPE_RRIP; break; } @@ -487,7 +488,7 @@ /* Decide whether to use the Joliet descriptor */ if (isomp->iso_ftype != ISO_FTYPE_RRIP && joliet_level) { - log(LOG_INFO, "cd9660: Joliet Extension\n"); + mp->mnt_flag |= MNT_JOLIET; rootp = (struct iso_directory_record *) sup->root_directory_record; bcopy (rootp, isomp->root, sizeof isomp->root); --- sys/sys/mount.h.original Wed Jul 5 06:02:16 2000 +++ sys/sys/mount.h Mon Jul 10 03:52:07 2000 @@ -152,6 +152,12 @@ #define MNT_EXPUBLIC 0x20000000 /* public export (WebNFS) */ /* + * cd9660 related flags. + */ +#define MNT_ROCKRIDGE 0x01000000 +#define MNT_JOLIET 0x02000000 + +/* * Flags set by internal operations, * but visible to the user. * XXX some of these are not quite right.. (I've never seen the root flag set) @@ -171,6 +177,7 @@ MNT_NOSUID | MNT_NODEV | MNT_UNION | \ MNT_ASYNC | MNT_EXRDONLY | MNT_EXPORTED | \ MNT_DEFEXPORTED | MNT_EXPORTANON| MNT_EXKERB | \ + MNT_ROCKRIDGE | MNT_JOLIET | \ MNT_LOCAL | MNT_USER | MNT_QUOTA | \ MNT_ROOTFS | MNT_NOATIME | MNT_NOCLUSTERR| \ MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ --- sbin/mount/mount.c.original Sat Jan 15 23:28:13 2000 +++ sbin/mount/mount.c Mon Jul 10 04:45:30 2000 @@ -92,6 +92,8 @@ const char *o_name; } optnames[] = { { MNT_ASYNC, "asynchronous" }, + { MNT_ROCKRIDGE, "RockRidge extension" }, + { MNT_JOLIET, "Joliet extension" }, { MNT_EXPORTED, "NFS exported" }, { MNT_LOCAL, "local" }, { MNT_NOATIME, "noatime" }, ----Next_Part(Mon_Jul_10_04:51:26_2000_518)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message