Skip to contentSkip to conversation

2.4.1 can't mount ext2 CD-ROM

PROBLEM [email protected] 2 participants 2 messages Feb 18, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

A value of hardsect_size[] means: this is the smallest size the hardware can work with. It is therefore a serious mistake just to come with "a good guess". This value is used only

You are defeating the entire purpose of having a hardware sector size independently from the software block size. And 2kB is a valid guess, apart from the drives that do 512 byte transfers too 2kB is really the smallest transfer we can do.

: And 2kB is a valid guess

Strange. The twelve or so CD readers I have here are all able to read 512-byte sectors. I am quite willing to believe that hardware exists that is unable to, but it is a bad idea to refuse to mount filesystems just because of some "good guess" that was not so good at all.

Quoted 2 lines

to reject impossible sizes, and everywhere the kernel accepts 0 meaning "don't know".

[Minor correction to my previous note:

	hardsect_size[MAJOR_NR] = NULL;

is fine, putting 512 is fine as well, but putting 0 does not work because of the get_hardsect_size() that doesnt check for 0.]

So put 0 and sure anyone can submit I/O on the size that they want. Now the driver has to support padding reads, or gathering data to do a complete block write. This is silly. Sr should support 512b transfers just fine, but only because I added the necessary _hacks_ to support it. sd doesn't right now for instance.

Please calm down. Removing this sr_hardsizes nonsense is a good idea today. No padding reads involved.
If you disagree, please go slowly and state very explicitly why you think I should be unable to mount ext2 filesystems with a block size smaller than 2048 on my SCSI CD drive.

Andries

#1 lore raw
Quoted 9 lines · On Sun, Feb 18 2001, [email protected] wrote:
Quoted 3 lines

A value of hardsect_size[] means: this is the smallest size the hardware can work with. It is therefore a serious mistake just to come with "a good guess". This value is used only

You are defeating the entire purpose of having a hardware sector size independently from the software block size. And 2kB is a valid guess, apart from the drives that do 512 byte transfers too 2kB is really the smallest transfer we can do.

Quoted 4 lines

: And 2kB is a valid guess

Strange. The twelve or so CD readers I have here are all able to read 512-byte sectors. I am quite willing to believe

I think most Plextor and Yamaha do, but it's not guaranteed to be supported. And it definitely won't for ATAPI with ide-scsi. Did you verify that changing block size works? Just curious.

Quoted 3 lines

that hardware exists that is unable to, but it is a bad idea to refuse to mount filesystems just because of some "good guess" that was not so good at all.

By far most media used will be 2kB based, so it is a good guess. Of course we change it if we switch the block size.

Quoted 7 lines

So put 0 and sure anyone can submit I/O on the size that they want. Now the driver has to support padding reads, or gathering data to do a complete block write. This is silly. Sr should support 512b transfers just fine, but only because I added the necessary _hacks_ to support it. sd doesn't right now for instance.

Please calm down. Removing this sr_hardsizes nonsense

I'm perfectly calm.

Quoted 4 lines

is a good idea today. No padding reads involved.
If you disagree, please go slowly and state very explicitly why you think I should be unable to mount ext2 filesystems with a block size smaller than 2048 on my SCSI CD drive.

I don't think you should be unable to, of course we would want to support 1kB ext2 and other file systems that want to change the block size. We are just disagreeing on how to do it. I don't think counting on being able to change the block size of a device at will always be reliable.

Signature · 1 line
Jens Axboe