Re: [RFC PATCH v2 0/5] Add buffered write-through support to iomap & xfs
From: Pankaj Raghav
Date: Fri Apr 24 2026 - 06:45:37 EST
> Ohk, just noticed your reply, after sending a response...
>
> Thinking it again, I agree we should just always ftruncate it back to
> the original file_size. Because we might have changed to file size while
> testing the writethrough support.
>
> Thanks for fixing it! This fix looks right to me.
>
> ~# git diff
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index c9901f65..720bca83 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -2095,7 +2095,7 @@ test_writethrough_io(void)
> return 0;
> }
>
> - if (ftruncate(fd, 0) != 0) {
> + if (ftruncate(fd, file_size) != 0) {
> perror("test_writethrough_io: failed to ftruncate to 0\n");
> exit(132);
> }
>
Yes, this fixes it. I knew it was some issue with fsx itself.
--
Pankaj