Re: st: Fixup -ENOMEDIUM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kai Makisara wrote:
On Thu, 5 Oct 2006, Hannes Reinecke wrote:

Hi all,

currently the tape driver doesn't believe in ENOMEDIUM. Even if the sense code
from TUR indicates that no tape is present the command will be retried; maybe
the user is fast enough to slip a medium in in the meantime ...
And even if not, it will return 'EIO' in any case.

The driver implements (up to a point) the Single Unix Specification: if O_NONBLOCK is clear, open() shall wait until the device is ready or available. It does not wait indefinitely but implements a timeout. This is the behaviour I found experimentally in some other Unices.

Ah. Ok; you're the maintainer, you get to decide.

This patch fixes the ENOMEDIUM handling: TUR will _not_ be retried if no
medium is present and the correct error number ENOMEDIUM will be set on exit.

It is true that st_open() does not currently return ENOMEDIUM and your fix for this is correct.

Please apply.

I don't think that the first and second parts should be applied. The third part fixes a bug and it should be applied. I include at the end a diff containing only that part.

Right. Thanks.

-----------8<--------------------

Fix st_open() to return -ENOMEDIUM instead of -EIO if no medium is found.

Signed-off-by: Kai Makisara <kai.makisara@xxxxxxxxxxx>

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke			hare@xxxxxxx
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux