Whamcloud - gitweb
LU-12275 sec: deal with encrypted object size 46/36146/28
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 11 Oct 2019 08:40:37 +0000 (08:40 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 16 Jun 2020 03:53:52 +0000 (03:53 +0000)
commit83d660436a164758fd4a29c1433d11c0f4591196
tree935596338fb95c5335fc9fb9876940f87403d8a5
parenteecf86131d099242d2e8c1f5d6be241ec1416c9a
LU-12275 sec: deal with encrypted object size

Problem with size of encrypted file comes from the fact that
an encrypted page will always contain PAGE_SIZE bytes of data,
even if clear text page is only a few bytes. And server infers
object size from content of encrypted page.

The way to address this is the following. Upon writing, when the
client encrypts the page representing the end of the file, it puts
into o_size info of the request's body, the size of the clear text
version of the file. On server side, this information is used to
adjust isize of the object, but still storing the complete pages
on disk.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ia83424123da26920ba0e0dfb354f54b1fa0ccfbb
Reviewed-on: https://review.whamcloud.com/36146
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/dt_object.h
lustre/mdt/mdt_io.c
lustre/ofd/ofd_io.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_io.c