ceph: fix updating i_truncate_pagecache_size for fscrypt
authorXiubo Li <xiubli@redhat.com>
Mon, 6 Mar 2023 07:01:15 +0000 (15:01 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 24 Aug 2023 09:24:36 +0000 (11:24 +0200)
commit295fc4aa7de4b72cfd764b75a238f79b9433e3ec
tree7bc969e207ffc01308c1fce86be870acd4b21ea2
parent1464de9f813e35559ff049f1f1f20f1e2a31d6b8
ceph: fix updating i_truncate_pagecache_size for fscrypt

When fscrypt is enabled we will align the truncate size up to the
CEPH_FSCRYPT_BLOCK_SIZE always, so if we truncate the size in the
same block more than once, the latter ones will be skipped being
invalidated from the page caches.

This will force invalidating the page caches by using the smaller
size than the real file size.

At the same time add more debug log and fix the debug log for
truncate code.

Link: https://tracker.ceph.com/issues/58834
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c
fs/ceph/inode.c