From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] dio_read: fix infinite loop when readsize >= filesize
Date: Tue, 24 Mar 2026 09:20:47 +0100 [thread overview]
Message-ID: <20260324082047.GA36627@pevik> (raw)
In-Reply-To: <20260324-fix_dio_read-v1-1-cf5dfa13e46a@suse.com>
Hi Andrea,
> The do_direct_reads() function had exit conditions inside the inner
> for loop. When readsize >= filesize, the for loop condition is never
> true, causing the while(1) loop to spin infinitely without checking
> if writers completed or runtime expired.
> Move the exit condition checks outside the for loop to ensure they
> are evaluated on every iteration, regardless of readsize/filesize
> parameters.
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> There's a sporadic failure in DOR000 that causes test to loop
> indefinetly under s390x. This patch tries to fix the issue by ensuring
> test will check runtime and if children completed.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
As a fix for indefinite loop LGTM. But why it happen readsize >= filesize? These
are related to -r and -s values, but we always use -r 512k -w 512k -s 32M.
I wonder why this happen only on s390x? (I'd expect ppc64le which has different
page size.
Also that means that pread() is skipped when this happen.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-03-24 8:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 8:08 [LTP] [PATCH] dio_read: fix infinite loop when readsize >= filesize Andrea Cervesato
2026-03-24 8:20 ` Petr Vorel [this message]
2026-03-24 9:08 ` Andrea Cervesato via ltp
2026-03-24 13:09 ` Andrea Cervesato via ltp
2026-03-24 13:21 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260324082047.GA36627@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox