Whamcloud - gitweb
LU-16537 write: fixes to writes at maximal offsets 33/49933/19
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sun, 28 Jul 2024 04:51:48 +0000 (11:51 +0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 16 Aug 2024 23:48:21 +0000 (23:48 +0000)
commitc163e90746ad20c7c382f0d4941a6e1428f21485
tree240643b28a9cb03b5f6fe0646d0be5bb0720247f
parent018c4e8f257ea746cbc2d2c60fe72d4f3f051c14
LU-16537 write: fixes to writes at maximal offsets

There are issues at maximal offsets.
Sanity tests 44[b-e] illustrate the problems.

osd_ldiskfs_map_inode_pages():
  fix osd-ldiskfs to not hinder write of maximum possible block of a
  file at block number 2^32-1.  It was incorrectly preventing this
  last block to be written.
        Fixes 44b and 44c.

lov_io_rw_iter_init():
  cast loff_t to __u64 so that comparison worked correctly for
  overflowed loff_t (as it is signed).
        Fixes 44d which fails for ZFS.

lsme_unpack():
  Limit maximal size of file to take into account that last stripe of
  an object may be incomplete.
        Fixes 44e.

ll_do_tiny_write():
  Do not allow to go over cl_file_maxbytes.
        Fixes 44e for aarch64 client/LDISKFS servers.

HPE-bug-id: LUS-11475
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1c19efda38ab3621fa3b08712308a76330d86cff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49933
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/lov/lov_ea.c
lustre/lov/lov_io.c
lustre/osd-ldiskfs/osd_io.c
lustre/tests/ll_sparseness_write.c
lustre/tests/sanity.sh
lustre/tests/test-framework.sh