PROBLEM: 2.6.25: sr0 cdrom does not change medium size on medium change - Kernel

This is a discussion on PROBLEM: 2.6.25: sr0 cdrom does not change medium size on medium change - Kernel ; Moin In 2.6.25 when I change the CD or DVD medium, the size of it in /sys/block/sr0/size remains the same. It is set upon mounting one medium after boot. This lead to "access beyond end of device" error if the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: PROBLEM: 2.6.25: sr0 cdrom does not change medium size on medium change

  1. PROBLEM: 2.6.25: sr0 cdrom does not change medium size on medium change

    Moin

    In 2.6.25 when I change the CD or DVD medium, the size of it in
    /sys/block/sr0/size remains the same. It is set upon mounting one medium
    after boot. This lead to "access beyond end of device" error if the
    current medium is bigger than the first mounted. I found I can reset the
    behaviour with "wodim -reset dev=/dev/sr0" when no medium is inserted.
    This bug also occurs with 2.6.25.2.

    I have an Intel ICH4 chipset and am using the ata_piix driver vom
    libata, so my cdrom is available as /dev/sr0. The drive is a combo drive
    from TEAC (DW-224E), which can read DVD and read/write CD.

    Attached are .config, dmesg from boot and /proc/scsi/scsi.

    Ingo
    --
    „Wir wollen keinen gläsernen Menschen. Wir wollen einen gläsernen Verbrecher.“
    -- Siegfried Kauder, CDU

    Wir haben jetzt den gläsernen Deutschen, wo bleibt der Verbrecher?

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFIIuIk4XrXtQkN2NURAgtcAKCV8xxxCDmpXj29Gb8FBX EOO7YpIgCffBWf
    of2HKdGK+zTCAuQAURkMp4A=
    =hiU3
    -----END PGP SIGNATURE-----


  2. Re: PROBLEM: 2.6.25: sr0 cdrom does not change medium size on medium change

    I did some git bisecting during which I found it does matte wether you
    let the drive settle before mounting or not during the 2.6.25 devcycle.
    So after being struck at some random position I redid the bisection.

    This commit applies to: changing the medium (cd/dvd), waiting until the
    drive settles and mounting it. The kernel no longer changes the size of
    the medium in /sys/block/sr0/size, giving read errors for bigger mediae.

    -----8<-----8<-----
    210ba1d1724f5c4ed87a2ab1a21ca861a915f734 is first bad commit
    commit 210ba1d1724f5c4ed87a2ab1a21ca861a915f734
    Author: James Bottomley
    Date: Sat Jan 5 10:39:51 2008 -0600

    [SCSI] sr: update to follow tray status correctly

    Based on an original patch from: David Martin

    When trying to get the drive status via ioctl CDROM_DRIVE_STATUS, with
    no disk it gives CDS_TRAY_OPEN even if the tray is closed.

    ioctl works as expected with ide-cd driver.

    Gentoo bug report: http://bugs.gentoo.org/show_bug.cgi?id=196879

    Cc: Maarten Bressers
    Signed-off-by: James Bottomley

    :040000 040000 704d23cdc9b3e5d596d879b4705586966b76e74d 9f1f71802ee45e734758d2c89d0b90102b549bdb M drivers
    ----->8----->8-----

    I'm forwarding this to the linux-scsi list, too.

    Ingo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFIKKnO4XrXtQkN2NURAuE8AJ9VFuMjXXq37zk8RHnhiY favNXq1QCgpYe+
    jiJz5S3sBk+D0KJ4F4WsLFs=
    =Nkum
    -----END PGP SIGNATURE-----


+ Reply to Thread