Subject: EFS volume descriptors

From: Mike Shaver <[email-masked]>
Date: Sat, 02 Jan 1999 13:35:08 -0500

On an EFS CDROM, there's a volume descriptor at block 0.  On an EFS
partition, there's a superblock at block 1.  I'd like my all-new code to
handle both cases, so I'm wondering what's at block 0 of an EFS
partition.  Is it something that I can reliably check to see if I'm
mounting a partition or CD?

Mike

-- 
7734.79 7103.32

---

From: "David S. Miller" <[email-masked]>
Date: Sat, 2 Jan 1999 10:50:01 -0800

Have a look at /usr/include/sys/dvh.h on an IRIX system for
enlightenment.

Later,
David S. Miller
[email-masked]

---

From: Mike Shaver <[email-masked]>
Date: Sat, 02 Jan 1999 14:08:12 -0500

> Have a look at /usr/include/sys/dvh.h on an IRIX system for

I took a look there before (and again as well), but it didn't leave me
feeling confident about partitions.  Everything in there seems to talk
about the first block of the device, which I took to be /dev/sda rather
than /dev/sda1 (say).  When people are mounting the CDROM, they'll be
mounting the ``whole'' device, so block 0 is full of voldesc goodness;
what's in block 0 of an EFS partition?  A dummy voldesc?

Mike

-- 
10073.24 9299.81

---

From: [email-masked] (Dave Olson)
Date: Sun, 3 Jan 1999 14:16:31 -0800 (PST)

Mike Shaver wrote: 
|  On an EFS CDROM, there's a volume descriptor at block 0.  On an EFS
|  partition, there's a superblock at block 1.  I'd like my all-new code to
|  handle both cases, so I'm wondering what's at block 0 of an EFS
|  partition.  Is it something that I can reliably check to see if I'm
|  mounting a partition or CD?

Nothing is at block 0 of the filesystem.  Historically, back to v6
unix, there were things like badblock tables there, so many filesystems
for unix have simply not used block 0.  efs does not use it.

Dave Olson, Silicon Graphics
http://reality.sgi.com/olson   [email-masked]

---

From: Mike Shaver <[email-masked]>
Date: Sun, 03 Jan 1999 17:20:48 -0500

> for unix have simply not used block 0.  efs does not use it.

Drat.  So do I need the user to tell me if it's an EFS CD vs. an EFS
partition, so that I know to use the voldesc or not?  I guess I could
register a second fstype ("efscd" or some such) and make the user use
that.

Mike

-- 
108334.35 92988.48

---

From: [email-masked] (Dave Olson)
Date: Sun, 3 Jan 1999 14:22:55 -0800 (PST)

Mike Shaver wrote: 
|  Dave Olson wrote:
|  > Nothing is at block 0 of the filesystem.  Historically, back to v6
|  > unix, there were things like badblock tables there, so many filesystems
|  > for unix have simply not used block 0.  efs does not use it.
|  
|  Drat.  So do I need the user to tell me if it's an EFS CD vs. an EFS
|  partition, so that I know to use the voldesc or not?  I guess I could
|  register a second fstype ("efscd" or some such) and make the user use
|  that.

Look at block 0 on the disk ("absolute" block 0), and use the magic 
number to see if it's an sgi volume.  If it is, for each partition
other than 8 and 10, check to see if block 1 is an EFS superblock.
That's the only possible way.  For almost all (but not all!) efs
CD's, there will only be partition 7,8,10, so you can just check
partition 7, if you want to be lazy.

And of course, it's possible to have hybrid iso9660 and sgi/efs CD's
as well, so you might still want to check for iso9660.

---

From: Mike Shaver <[email-masked]>
Date: Sun, 03 Jan 1999 17:29:36 -0500

> partition 7, if you want to be lazy.

Excellent!  Thanks.

Mike

-- 
108908.71 93516.45