Whamcloud - gitweb
LU-14433 llite: do fallocate() size checks under lock 68/41668/9
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 15 Feb 2021 12:25:38 +0000 (15:25 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Apr 2021 03:14:53 +0000 (03:14 +0000)
commitf23ac22c4c79750fed6b05ddbe460bfc9b0f0ea5
tree880d3fa9ca5ddb4e91e5a15eed8e620ef1faae49
parentbb6edb7b8eeec65f46f8eaeb135e5dde13bf7ad8
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

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I8c1d295464be24d6638005bc9d46cff50656cf11
Reviewed-on: https://review.whamcloud.com/41668
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/vvp_io.c
lustre/lov/lov_io.c