Jiri Kosina 7b7b68bba5 floppy: bail out in open() if drive is not responding to block0 read
In case reading of block 0 during open() fails, it is not the right thing
to let open() succeed.

Fix this by introducing FD_OPEN_SHOULD_FAIL_BIT flag, and setting it in
case the bio callback encounters an error while trying to read block 0.

As a bonus, this works around certain broken userspace (blkid), which is
not able to properly handle read()s returning IO errors. Hence be nice to
those, and bail out during open() already; if block 0 is not readable,
read()s are not going to provide any meaningful data anyway.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-01-17 11:12:06 +01:00
..
2013-11-23 22:33:52 -08:00
2013-11-23 22:33:49 -08:00
2013-04-09 14:13:19 -04:00
2011-08-08 11:40:15 +02:00
2013-04-09 14:13:32 -04:00
2012-03-28 18:30:03 +01:00
2013-06-29 12:46:45 +04:00
2013-11-23 22:33:49 -08:00
2013-11-23 22:33:57 -08:00
2014-01-03 10:05:34 +01:00
2013-11-23 22:33:54 -08:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00