Whamcloud - gitweb
LU-12503 llite: file write pos mimatch 34/37034/2
authorBobi Jam <bobijam@whamcloud.com>
Wed, 27 Nov 2019 08:48:49 +0000 (16:48 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Dec 2019 06:44:41 +0000 (06:44 +0000)
commit322cd140132e821c63b41b7da9ddb9f519b52194
treef013134516d4f10f1fd926cd44fbb638bf3ba1ce
parent0d79ba70e44f44d0334253f8c39725ba3d3f36e7
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.

Lustre-change: https://review.whamcloud.com/36021
Lustre-commit: 1d2aa1513dc4e65813ad0bea138966a55244dbde

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