Whamcloud - gitweb
LU-12275 sec: restrict fallocate on encrypted files 20/39220/6
authorSebastien Buisson <sbuisson@ddn.com>
Tue, 30 Jun 2020 13:42:58 +0000 (13:42 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Sep 2020 18:07:44 +0000 (18:07 +0000)
commita7870fb9568bf753d50eeead71a59dfe07db1d20
treef8d22f9a73d633be42386ccc527ca65766cf4801
parent728036f25635a9b14310eded1761cf6cd0bacb1a
LU-12275 sec: restrict fallocate on encrypted files

For now, ll_fallocate only supports standard preallocation.
Anyway, encrypted inodes can't handle collapse range or zero range or
insert range since we would need to re-encrypt blocks with a different
IV or XTS tweak (which are based on the logical block number).
So make sure we return -EOPNOTSUPP in this case, like what ext4 does.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ia34cd04df9f297ac54109ed385b037fe282954d7
Reviewed-on: https://review.whamcloud.com/39220
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_compat.h
lustre/llite/file.c