Re: [PATCH] fuse: update inode size after extending passthrough write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2024 at 4:25 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Fri, 11 Oct 2024 at 15:53, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> > @@ -20,9 +20,18 @@ static void fuse_file_accessed(struct file *file)
> >
> >  static void fuse_file_modified(struct file *file)
> >  {
> > +       struct fuse_file *ff = file->private_data;
> > +       struct file *backing_file = fuse_file_passthrough(ff);
> >         struct inode *inode = file_inode(file);
> > -
> > -       fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
> > +       loff_t size = i_size_read(file_inode(backing_file));
>
> What about passing iocb and res to ->end_write() instead of just the
> file, so that we don't need to touch the underlying inode?
>

I considered that. It was like this in one of my older versions.

But why do we want to avoid copying attributes from the underlying inode?
If anything, I thought that we would want to get closer to ovl_file_modified()
for backing inodes in some situations like this one.
I understand that brute copy of attributes is a problem, but I don't see the
problem with i_size = max(i_size, i_backing_size)

Can you explain the problem?

Thanks,
Amir.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux