public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, zzed@cyberdude.com
Cc: alan@lxorguk.ukuu.org.uk
Subject: Re: [PROBLEM] 2.4.1 can't mount ext2 CD-ROM
Date: Sun, 18 Feb 2001 18:49:26 +0100 (MET)	[thread overview]
Message-ID: <UTC200102181749.SAA171185.aeb@vlet.cwi.nl> (raw)

    From: Jon Forsberg <zzed@cyberdude.com>

    I have two ext2 CD-ROMs. One of them I can mount the normal way,
    the other I can't. Both are ok according to debugfs and e2fsck
    and if I do
	'mount -t ext2 -o loop /dev/cdrom /cdrom'
    instead, both work.

    The one that doesn't work have a blocksize of 1024 according to debugfs:
      Block size = 1024, fragment size = 1024
    And the other:
      Block size = 4096, fragment size = 4096

    What happens:

    # mount -t ext2 /dev/cdrom /cdrom        
    mount: block device /dev/cdrom is write-protected, mounting read-only
    mount: wrong fs type, bad option, bad superblock on /dev/cdrom,
           or too many mounted file systems

    kern.log:
    Feb 18 14:54:34 pc1 kernel: VFS: Unsupported blocksize on dev sr(11,0).

    I'm pretty sure both worked with 2.2.17.

You are being bitten by two bugs. By some coincidence I sent a
patch for the first one to Linus and Alan yesterday.
(That was fs/ext2/super.c - the same bug occurs in both 2.2 and 2.4.)
However, the second one will then still prevent you from mounting,
and it occurs only in 2.4.

Someone has added
        /*
         * These are good guesses for the time being.
         */
        for (i = 0; i < sr_template.dev_max; i++) {
                sr_blocksizes[i] = 2048;
                sr_hardsizes[i] = 2048;
        }
        blksize_size[MAJOR_NR] = sr_blocksizes;
        hardsect_size[MAJOR_NR] = sr_hardsizes;
setting of hardsect_size to drivers/scsi/sr.c.

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
to reject impossible sizes, and everywhere the kernel accepts 0
meaning "don't know".

So, probably all will work fine if you change the second
2048 here to say 512 or 0. Or, if you, more drastically,
remove all references to sr_hardsizes[] from sr.c.

Andries

             reply	other threads:[~2001-02-18 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-18 17:49 Andries.Brouwer [this message]
2001-02-18 19:16 ` [PROBLEM] 2.4.1 can't mount ext2 CD-ROM Jens Axboe
2001-02-19  1:40   ` Alan Cox
2001-02-19  1:47     ` Jens Axboe
2001-02-19  2:02       ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2001-02-18 21:11 Andries.Brouwer
2001-02-19  1:43 ` Jens Axboe
2001-02-18 19:34 Andries.Brouwer
2001-02-18 20:49 ` Jens Axboe
2001-02-18 14:26 Jon Forsberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=UTC200102181749.SAA171185.aeb@vlet.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zzed@cyberdude.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox