Whamcloud - gitweb
LU-17533 llite: call merge attr on all writes 16/54016/9
authorPatrick Farrell <paf0187@gmail.com>
Wed, 13 Mar 2024 14:45:44 +0000 (10:45 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:47:12 +0000 (19:47 +0000)
commit43afdc0ca2574b77fea8bc94e0dcdeb5afc82e6f
tree4d2ae07343247795ead6d5d0df4c03d81a35723c
parent49730821c4e5116f188c931830ce23b2da2d8a41
LU-17533 llite: call merge attr on all writes

Because DIO writes do not update the inode size during the
write, when a file is closed and the LSOM update is sent,
the file size provided by the client is incorrect.

DIO writes don't cause consistency problems because ls and
other things which check the file size will get the correct
size and update the inode size then, but that just means
this issue isn't fatal - DIO should still update the inode
size.

This is best done by calling ll_merge_attr on all writes at
the end of the write, rather than just for async writes in
vvp_io_write_commit.

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I856b319254ad7093e69e41613120e06b71f656cc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54016
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/vvp_io.c
lustre/mdt/mdt_som.c
lustre/tests/sanity.sh