Re: [PATCH 2.5.68 2/2] i_size atomic access

Andrew Morton (akpm@digeo.com)
Fri, 25 Apr 2003 03:57:27 -0700


Andrea Arcangeli <andrea@suse.de> wrote:
>
> On Thu, Apr 24, 2003 at 06:05:03PM -0700, Andrew Morton wrote:
> > And if the race _does_ hit, what is the effect? Assuming stat() was fixed
> > with i_sem, I don't think the race has a very serious effect. We won't
>
> writepage needs it too to avoid returning -EIO and I doubt you want to
> take the i_sem in writepage

Well the -EIO thing is bogus really, but yes. The writepage will not hit
disk *at all*. That's a problem.

We modify i_size in very few places - an alternative might be to maintain a
parallel unsigned long i_size>>PAGE_CACHE_SIZE in the inode and use that in
critical places. Sounds messy though.

Ho hum. ugh.

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