Re: Read O_DIRECT regression in 3.7-rc8 (bisected)

From: Milan Broz
Date: Sat Dec 08 2012 - 03:54:16 EST


On 12/08/2012 01:57 AM, Linus Torvalds wrote:
>
> On Fri, 7 Dec 2012, Linus Torvalds wrote:
>>
>> This (TOTALLY UNTESTED) patch adds it the same iov_shorten() logic that
>> the write side has. It does it differently (in fs/block_dev.c rather than
>> in mm/filemap.c), but I actually suspect this is a nicer way to do it, and
>> maybe we should do the write side truncation this way too.
>
> Ok, rebooted and tested with your test-case, and it seems to work fine.
> But I presume that you actually found the problem some other way, so you'd
> want to verify that it fixes whatever original bigger issue you hit.

Yes, initially it crashed regression test for cryptsetup reencrypt tool
(direct-io is optional there) and that device reencryption case never finished.
(Which means in fact lost of access to the encrypted device for user
without some manual tweaking, so quite serious problem.)

Anyway, it works now with your patch, so

Reported-and-tested-by: Milan Broz <mbroz@xxxxxxxxxx>

Thanks,
Milan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/