From: Roman V. S. <rv...@su...> - 2009-01-07 01:56:30
|
On Tue, 2009-01-06 at 15:26 +0100, Miklos Szeredi wrote: > > Would this be possible? Are there any better suggestions for > > handling O_APPEND? > > The best way to handle this is to use the O_APPEND flag in open(). That's not a problem -- O_APPEND is being set in the open() and I get it as part of FUSE_OPEN message. The fact that O_APPEND is set also makes generic_write_checks() adjust the pos argument based on ->i_size: http://lxr.linux.no/linux+v2.6.28/mm/filemap.c#L1961 but it doesn't make it revalidate ->i_size! And that's why I would like to tell FUSE: "please don't forget to revalidate ->i_size before you call generic_write_checks() for any file opened as O_APPEND". Exactly like nfs_file_write() does it: http://lxr.linux.no/linux+v2.6.28/fs/nfs/file.c#L524 Would something like this be possible? If not right away, may be in the future versions of FUSE? Thanks, Roman. |