fuse: copy_file_range should truncate cache
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 May 2020 09:39:35 +0000 (11:39 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 May 2020 09:39:35 +0000 (11:39 +0200)
commit9b46418c40fe910e6537618f9932a8be78a3dd6c
tree649d02d1880d0a51a97399c9a2b5e58c842cb53a
parent2c4656dfd994538176db30ce09c02cc0dfc361ae
fuse: copy_file_range should truncate cache

After the copy operation completes the cache is not up-to-date.  Truncate
all pages in the interval that has successfully been copied.

Truncating completely copied dirty pages is okay, since the data has been
overwritten anyway.  Truncating partially copied dirty pages is not okay;
add a comment for now.

Fixes: 88bc7d5097a1 ("fuse: add support for copy_file_range()")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c