Alexander Viro wrote:
> >
> > I think it's a Bad Thing (tm) that file write operations are single
> > threaded [generic_file_write() calls down(&i_sem)], and I'd like to
> > change that.
>
> Danger: clashing patches ahead.
I assumed that. If you want help, just send me your patches: I could
review them, or I could implement missing parts.
> In particular, any stuff related to
> areas, NFS atomicity, etc. would better live on address_space level.
Are you sure? I thought that the address_space was added to clean up
the page cache [to get rid of the dummy inode for the swapper].
NFS atomicity has nothing to do with the page cache, I'd implement
it either within "struct inode" or with a third structure.
[ie struct inode, contains struct atomic_access,
contains struct address_space]
Btw, do you know if the file pointer must be atomically updated?
Eg you have a file with fixed size, unordered records. You could open
the file, start 10 worker threads, and all of them just executed:
for(;;){
read(fd,&data,sizeof(data));
if(EOF)
break;
process_data(&data);
}
Do you know if we have to ensure that no record is returned twice, no
record is missed? I just checked the POSIX standard, but I found no clear
answer. Neither 2.2.13 nor 2.3.29 enforce that.
Cheers,
Manfred