Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2000 04:51:32 +0900
From:      Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
To:        FreeBSD-hackers@FreeBSD.ORG
Subject:   Re: why the RockRidge message?
Message-ID:  <20000710045132W.mzaki@tkc.att.ne.jp>
In-Reply-To: In your message of "Sun, 9 Jul 2000 20:04:16 %2B0200" <20000709200416.B760@freebie.wbnet>
References:  <20000708200629.A2570@freebie.wbnet> <396871AD.B41ADFAB@newsguy.com> <863dljweu5.wl@tkc.att.ne.jp> <20000709200416.B760@freebie.wbnet>

next in thread | previous in thread | raw e-mail | index | archive | help
----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 <wkb@chello.nl> 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 <sys/mount.h>

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 <mzaki@e-mail.ne.jp> 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000710045132W.mzaki>