diff options
author | Matthias Koenig | 2008-06-09 16:38:25 +0200 |
---|---|---|
committer | Karel Zak | 2008-07-30 13:21:14 +0200 |
commit | d50c5917f07a0674e4e48a19d6902d17fb43e5bc (patch) | |
tree | a6d574006c48e6ceeafd47552e26e7636b6badc9 /include/Makefile.am | |
parent | mount: add shortoptions for bind, move and rbind (diff) | |
download | kernel-qcow2-util-linux-d50c5917f07a0674e4e48a19d6902d17fb43e5bc.tar.gz kernel-qcow2-util-linux-d50c5917f07a0674e4e48a19d6902d17fb43e5bc.tar.xz kernel-qcow2-util-linux-d50c5917f07a0674e4e48a19d6902d17fb43e5bc.zip |
mount: retry on ENOMEDIUM
Due to a change in kernel behaviour when opening CDROM devices,
we need to retry the open/mount call when ENOMEDIUM is returned.
Explanation from Tejun Heo:
Okay, the difference is from the addition of cdrom_get_media_event()
call to both sr_drive_status() and ide_cdrom_drive_status().
Previously, the cdrom driver can't differentiate between tray closed
w/ no media and tray open and always returned tray open, which
triggers close and retry in the open logic which probably have delayed
things enough to get the media recognized.
Now the cdrom driver can discern between tray closed w/o media and
device not ready for other reasons and returns -ENOMEDIUM on the
former. This is all good and dandy but the problem seems that some
drives report no media right after the tray is closed but it hasn't
properly detected the media yet.
It seems the only way to work around the problem is via sensible
retries (e.g. try three times 5 secs apart) and I don't think we can
add that type of retry logic into cdrom open path. Please note that
the previous logic wasn't water proof. Some drives can take longer to
recognize the media is there and could have failed the in-kernel retry
too. Also, reading the media can take quite some time and during that
period the drive reports media present but device not ready. The
driver will retry the command (e.g. READ TOC for open) five times but
all of them can fail w/ EMEDIUMTYPE.
[kzak@redhat.com: - add CRDOM_NOMEDIUM_RETRIES to blkdev.h
- add verbose message to mount.c]
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/Makefile.am')
0 files changed, 0 insertions, 0 deletions