well really this is fixed in my tree and in some distribution kernels
for half an year, it's true only the major fs are been taken care of,
but definitely somebody had the heart to do something about it 8)
> > A quick grep shows that there are 619 references to ->i_size in the
> > various filesystem subdirs.
>
> Most of these are not inode->i_size. Yes, there are i_size references in
> filesystems, but not many. And the infrastructure is there to mop those up.
>
> If we choose to. I'm still not sure I want to do this :(
There is no other way, some cpu can't even do it atomically (hence the
need of the sequence number approch).
Also note that the atomicity isn't needed everywhere, for example if you
read i_size in the write paths you don't need to use i_size_read, but
you can read with inode->i_size as usual, which is faster and in turn
recommended.
I described the locking rules here:
http://groups.google.com/groups?q=i_size_read&hl=en&lr=&ie=UTF-8&selm=20020717225504.GA994%40dualathlon.random&rnum=2
The rules are: 1) i_size_write must be used for all i_size
updates (at least when there can be potential parallel readers
outside the i_sem), 2) i_size_read must be used for all lockless
reads when an i_size change can happen from under us.
Andrea
-
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/