2002-09-27 19:20:30

by Andrew Morton

[permalink] [raw]
Subject: Re: [patch] 'virtual => physical page mappingcache',vcache-2.5.38-B8

Alan Cox wrote:
>
> On Fri, 2002-09-27 at 19:35, Andrew Morton wrote:
> > O_DIRECT writes operate under i_sem, which provides exclusion
> > from trucate. Do you know something which I don't??
>
> So it does, hidden away in generic_file_write rather than the lower
> layers.

Well that's sort of the same level at which truncate takes it.
It's a pretty big lock.

> Interesting. So now I have a new question to resolve, which is
> why doing O_DIRECT and truncate together corrupted my disk when I tried
> it trying to break stuff

Interesting indeed. Possibly invalidate_inode_pages2() accidentally
left some dirty buffers detached from the mapping. Hard to see how
it could do that.

What kernel were you testing?


2002-09-27 19:52:02

by Alan

[permalink] [raw]
Subject: Re: [patch] 'virtual => physical page mappingcache',vcache-2.5.38-B8

> > Interesting. So now I have a new question to resolve, which is
> > why doing O_DIRECT and truncate together corrupted my disk when I tried
> > it trying to break stuff
>
> Interesting indeed. Possibly invalidate_inode_pages2() accidentally
> left some dirty buffers detached from the mapping. Hard to see how
> it could do that.
>
> What kernel were you testing?

2.4.20pre5-ac with new IDE. So there are several other candidates 8)