Whamcloud - gitweb
LU-12503 llite: file write pos mimatch 21/36021/3
authorBobi Jam <bobijam@whamcloud.com>
Wed, 27 Nov 2019 08:48:49 +0000 (16:48 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 14 Dec 2019 05:56:28 +0000 (05:56 +0000)
commit1d2aa1513dc4e65813ad0bea138966a55244dbde
tree6aa853195a6c4f325c81a14d41f4244437c4d00c
parentf51895b8dd26ef32af19723610718a6d41a3666c
LU-12503 llite: file write pos mimatch

In vvp_io_write_start(), after data were successfully written, but
for some reason (e.g. out of quota), the data does not or got
partially commited, so that the file's write position (kiocb->ki_pos)
would be pushed forward falsely, and in the next iteration of write
loop, it fails the assertion

ASSERTION( io->u.ci_rw.rw_iocb.ki_pos == range->cir_pos )

This patch corrects ki_pos if this scenario happens.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib85b1a777da24cc935e5976beab2390052b4cec3
Reviewed-on: https://review.whamcloud.com/36021
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_io.c