Whamcloud - gitweb
LU-14433 llite: do fallocate() size checks under lock
authorMikhail Pershin <mpershin@whamcloud.com>
Thu, 20 Jan 2022 02:53:48 +0000 (18:53 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 21 Jan 2022 23:26:15 +0000 (23:26 +0000)
commitf942bb09716247f4d3599e0e68fc06a81ffae0a4
tree44b54dd6ecf474c62ee0ad42399b4137a3c25be8
parent266a66d35b416e98d0b754259209d0441fac4b04
LU-14433 llite: do fallocate() size checks under lock

Check about fallocate() range vs file size in vvp_io_setattr_start()
instead of ll_fallocate() so inode size cannot be changed by pending
write or truncate. This implies that IO is initialized already and
requires changes in LOV to update sub-IOs with proper inode size and
valid size attribute values

Fix also vvp_io_setattr_lock() to don't include fallocate_end in
lock range

Lustre-change: https://review.whamcloud.com/41668
Lustre-commit: f23ac22c4c79750fed6b05ddbe460bfc9b0f0ea5

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I8c1d295464be24d6638005bc9d46cff50656cf11
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46220
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/file.c
lustre/llite/vvp_io.c
lustre/lov/lov_io.c