The mapping->invalidate_lock, copy-offload and cifs

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

 



Hi Jann,

I'm looking at trying to fix cifs_file_copychunk_range().  Currently, it
invalidates the destination range, apart from a partial folio at either end
which will be flushed, and then tries the copy.  But if the copy fails or can
only be partially completed (eg. ENOSPC), we lose any data in the destination
region, so I think it needs to be flushed and invalidated rather than just
being invalidated.

Now, we have filemap_invalidate_inode() which I can use to flush back and
invalidate the folios under the invalidate_lock (thereby avoiding the need for
launder_folio).  However, that doesn't prevent mmap from reinstating the
destination folios with modifications whilst the copy is ongoing the moment
the invalidate_lock is dropped.

Question is: would it be reasonable to do the copy offload whilst holding the
invalidate_lock for the duration?

Thanks,
David





[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