Re: BUG in handling of last_sector_bug flag

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

 



Alan Stern wrote:
> On Wed, 13 Aug 2008, Boaz Harrosh wrote:
>
>   
>> One thing I don't like is the now blk_end_request(req, -EIO, bytes=0)
>> inside scsi_end_request(). What's the point of calling that with 0 bytes?
>> Maybe fix that too.
>>     
>
> While testing the patch, I learned what the point is.  :-)
>
> Actually it's very simple; you just have to remember that not all 
> requests are BLOCK_FS type.  Other types of request can indeed have a 
> transfer length of 0, and we want to end those requests normally.
>
> So this version of the patch works better than the earlier one.  In 
> principle there doesn't seem to be any reason not to call 
> blk_end_request with bytes = 0, but I left the test in there.
>
> Alan, you might want to test this version and see how well it works for 
> you.
>   
Yes, that fixes it!

I applied your patch and reduced SD_LAST_BUGGY_SECTORS to 1.  As
expected, when I inserted my USB cardreader the kernel log shows
"uncorrected read errors", as /lib/udev/vol_id triggers the hardware
bug.  But vol_id doesn't hang any more.  udev goes on to create the
device node, I get the KDE popup and can successfully mount the device.

Great work, thanks.

Alan
--
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