On Tue, 27 Jan 2004 17:40:45 +0100, you wrote in linux.kernel:
> I'm surprised the sense messages don't show that it's a write to a write
> protected disc (xx/27/zz, where xx == 0x07 or 0x05).
Yep, I wasn't precise, that shows up before the error=0x70 line.
> However, it's even
> more annoying to _not_ be able to write to a media because the kernel
> thinks it knows better. In your fsck case you sort of get what you ask
> for, by shooting yourself in the foot :)
Agreed. It just bit me extra hard because I was thinking my sector
size patches were screwing things up. ;)
>> It's fine with me either way. Do you want me to resend with the
>> default fallback changed?
> Yes please.
Ok, I'll do that.
>> + unsigned short sectors_per_frame = drive->queue->hardsect_size >> 9;
>
> Nitpick: sectors_per_frame = queue_hardsect_size(q) >> 9;
Yes, I agree, better to use the existing abstraction. I'll split it
then and initialize it as the first line of the function(s), otherwise
it doesn't fit into 80 columns.
> That's about, the rest looks fine.
I'll make that change everywhere and then send an updated version.
--
Ciao,
Pascal
On Tue, Jan 27 2004, Pascal Schmidt wrote:
> On Tue, 27 Jan 2004 17:40:45 +0100, you wrote in linux.kernel:
>
> > I'm surprised the sense messages don't show that it's a write to a write
> > protected disc (xx/27/zz, where xx == 0x07 or 0x05).
>
> Yep, I wasn't precise, that shows up before the error=0x70 line.
Good, so it's catchable easily even for your drive. So mark the disc
write protected when you see this error on write, and print a message
saying so.
--
Jens Axboe