Re: [PATCH][SMB3] fix temporary data corruption in collapse range

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

 



If it is moved earlier it will have the effect of throwing away these
pages even if the copychunk fails (and thus if the collapse range
fails we end up still discarding).

Any thoughts?

On Sat, Aug 20, 2022 at 10:23 AM David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Steve French <smfrench@xxxxxxxxx> wrote:
>
> > +     truncate_pagecache_range(inode, off, old_eof);
>
> Upon further consideration, I think this should perhaps be before:
>
> >       rc = smb2_copychunk_range(xid, cfile, cfile, off + len,
>
> so that any outstanding shared-writable mmap can be made to wait.
>
> Also the invalidation in smb3_zero_range() only covers the hole, so
> smb3_insert_range() also needs to invalidate from the bottom of the hole to
> the EOF - and, again, I think it needs to do this before making changes to the
> file contents.
>
> David
>


-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux