Whamcloud - gitweb
LU-14326 osc: correctly update size/kms for fallocate 72/41272/2
authorBobi Jam <bobijam@whamcloud.com>
Fri, 15 Jan 2021 05:33:17 +0000 (13:33 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 22 Jan 2021 20:31:38 +0000 (20:31 +0000)
commit43979e4e257e78d3d94ea3f21b65fdebbbdc690f
tree7e57af24cb90039d4d1c7e6b3b2ed824c72c8486
parent2a8ffe262a035dacba38b2ea29776b76a083acb9
LU-14326 osc: correctly update size/kms for fallocate

* fallocate chose oa->o_size for falloc_offset and o->o_blocks for
  falloc_end, but forgot to change attr->cat_size and attr->cat_kms
  to use sa_attr.lvb_size to update osc's lvb and kms if it expands
  the file's size.

  Other setattr IO uses @size (sa_falloc_offset in fallocate case) to
  update the lvb and kms.

* lock request extent for fallocate should be
  [sa_falloc_offset, sa_falloc_end)

* calculate sa_attr.lvb_size correctly for osc objects
  (lov_io_sub_inherit())

Test-Parameters: testlist=sanityn env=ONLY=16,COUNT=50000,ONLY_REPEAT=10
Test-Parameters: testlist=sanity-benchmark env=ONLY=fsx,COUNT=50000,ONLY_REPEAT=10
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Fixes: 48457868a02a ("LU-3606 fallocate: Implement fallocate preallocate operation")
Change-Id: I7dbed3bc6899a3db53284c8aac3cb9476e7958f5
Reviewed-on: https://review.whamcloud.com/41272
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_io.c
lustre/lov/lov_io.c
lustre/osc/osc_cache.c
lustre/osc/osc_io.c
lustre/osc/osc_object.c