lkml.org 
[lkml]   [2000]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectHFS-formatted CDROMs (was: Re: Linux 2.4 Status)
Hello all,

bad news concerning HFS-formatted CD-ROMs:
Support seems to depend on the CD-ROM-drive (!!!).

Takashi Oe wrote:

> The current HFS code doesn't work with HFS-formatted CD-ROM with 2k block
> size. I do not really know if it's HFS fs' fault or not, though.

The following is HFS' fault, and it can't be fixed quickly.
In fs/hfs/hfs.h, you're plainly told:

/* various FIXED size parameters */
#define HFS_SECTOR_SIZE 512 /* size of an HFS sector */
#define HFS_SECTOR_SIZE_BITS 9 /* log_2(HFS_SECTOR_SIZE) */

In fs/hfs/super.c, the CD-ROM would be mounted:

/*
* hfs_read_super()
*
* This is the function that is responsible for mounting an HFS
* filesystem.
[...]
*/
struct super_block *hfs_read_super(struct super_block *s, void *data,
int silent)
{
[...]
/* set the device driver to 512-byte blocks */
set_blocksize(dev, HFS_SECTOR_SIZE);

Trying to change the blocksize of the CD-ROM device ends up in function
sr_set_blocklength() (for an SCSI CD-ROM drive at least), and this sits
in
file drivers/scsi/sr_vendor.c, which name already tells everything.
Changing the blocksize to 512 can succeed, but it doesn't have to.
I wouldn't know about the prevalence of 512b-sectors-capable CD-ROM
drives
in the field...

So HFS formatted CD-ROMs can only be mounted in SOME CD-ROM drives.

This can't satisfy, but the fixed sector size assumption is woven too
deeply
into the guts of the HFS driver to be fixable easily.

On the other hand, this is the status of HFS as it has been all the time
through v2.2. It's not a new v2.4-bug.

Please correct me if I'm, well, not correct ;-)

- Bernd
--
Bernd Kischnick - tel +49-(0)511-18375 - email kisch@mindless.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.188 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site