From: Daniel Gomez <da.gomez@kernel.org>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
djwong@kernel.org, john.g.garry@oracle.com, willy@infradead.org,
hch@lst.de, ritesh.list@gmail.com, jack@suse.cz,
Luis Chamberlain <mcgrof@kernel.org>,
dgc@kernel.org, tytso@mit.edu, p.raghav@samsung.com,
andres@anarazel.de, brauner@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
pankaj.raghav@linux.dev, Daniel Gomez <da.gomez@samsung.com>
Subject: Re: [RFC PATCH v2 0/5] Add buffered write-through support to iomap & xfs
Date: Tue, 16 Jun 2026 15:57:21 +0200 [thread overview]
Message-ID: <bdfdbd6b-81e0-49e3-a02f-2dc75727a71b@kernel.org> (raw)
In-Reply-To: <ah24DlQobLjjDTGt@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com>
On 01/06/2026 18.49, Ojaswin Mujoo wrote:
> On Wed, May 13, 2026 at 11:14:21AM +0530, Ojaswin Mujoo wrote:
>> On Mon, May 04, 2026 at 09:54:49AM +0200, Daniel Gomez wrote:
>>> On 08/04/2026 20.45, Ojaswin Mujoo wrote:
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index 720bca83..1c76634b 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -2077,16 +2077,34 @@ test_dontcache_io(void)
> return 1;
> }
>
> +/*
> + * Use a temporary file to test RWF_WRITETHROUGH so as to not modify the
> + * original. This is so that fsx expected contents and the actual contents
> + * of the original file don't go out of sync
> + */
> int
> test_writethrough_io(void)
> {
> char buf[4096];
> + char tmpname[PATH_MAX];
> + int tmp_fd;
> struct iovec iov = { .iov_base = buf, .iov_len = sizeof(buf) };
> int ret, e;
>
> + snprintf(tmpname, sizeof(tmpname), "%s.fsx.XXXXXX", fname);
> +
> + tmp_fd = mkstemp(tmpname);
> + if (fd < 0) {
> + perror("test_writethrough_io: mkstemp() failed\n");
> + exit(132);
> + }
> +
> memset(buf, '\0', sizeof(buf));
> - ret = pwritev2(fd, &iov, 1, 0, RWF_WRITETHROUGH);
> + ret = pwritev2(tmp_fd, &iov, 1, 0, RWF_WRITETHROUGH);
> e = ret < 0 ? errno : 0;
> +
> + close(tmp_fd);
> +
> if (e == EOPNOTSUPP) {
> if (!quiet)
> fprintf(stderr,
>
I think this is missing:
@@ -2158,12 +2175,6 @@ test_writethrough_io(void)
return 0;
}
- if (ftruncate(fd, file_size) != 0) {
- perror("test_writethrough_io: failed to ftruncate to 0\n");
- exit(132);
- }
-
-
The fix works for me after a stress loop test on generic/457.
>
> Im unable to replicate the 415 failure, but this one is strange because it
> doesn't involve any writethrough IO. In you previous runs have you seen
> this be flaky?
I couldn't confirm back then, so I think we can ignore it. Also, unrelated.
>
> Admittedly, I've not yet started thorough testing since this is in early
> RFC and the design is still getting finalized but I appriciate the help
> in testing this.
No problem. IMHO, testing makes a design more robust, once the path is
agreed on. That said, do you think the path needs changing? Reading LWN
and the patch series threads, I don't see any blocker. You can cc me for
the next iteration and I'll follow up with more testing.
next prev parent reply other threads:[~2026-06-16 13:57 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 18:45 Ojaswin Mujoo
2026-04-08 18:45 ` [RFC PATCH v2 1/5] mm: Refactor folio_clear_dirty_for_io() Ojaswin Mujoo
2026-04-15 6:14 ` Christoph Hellwig
2026-04-23 10:12 ` Ojaswin Mujoo
2026-04-08 18:45 ` [RFC PATCH v2 2/5] iomap: Add initial support for buffered RWF_WRITETHROUGH Ojaswin Mujoo
2026-04-16 12:05 ` Jan Kara
2026-04-16 12:34 ` Jan Kara
2026-04-17 19:42 ` Ojaswin Mujoo
2026-04-20 11:28 ` Jan Kara
2026-04-21 18:07 ` Ojaswin Mujoo
2026-04-22 10:00 ` Jan Kara
2026-04-23 10:08 ` Ojaswin Mujoo
2026-04-17 4:13 ` Pankaj Raghav (Samsung)
2026-04-18 7:33 ` Ojaswin Mujoo
2026-04-20 11:56 ` Pankaj Raghav (Samsung)
2026-04-21 18:15 ` Ojaswin Mujoo
2026-04-22 6:19 ` Pankaj Raghav
2026-04-22 6:40 ` Ritesh Harjani
2026-04-08 18:45 ` [RFC PATCH v2 3/5] xfs: Add RWF_WRITETHROUGH support to xfs Ojaswin Mujoo
2026-04-08 18:45 ` [RFC PATCH v2 4/5] iomap: Add aio support to RWF_WRITETHROUGH Ojaswin Mujoo
2026-04-08 18:45 ` [RFC PATCH v2 5/5] iomap: Add DSYNC support to writethrough Ojaswin Mujoo
2026-04-17 3:54 ` [RFC PATCH v2 0/5] Add buffered write-through support to iomap & xfs Pankaj Raghav (Samsung)
2026-04-18 7:26 ` Ojaswin Mujoo
2026-04-23 12:25 ` Pankaj Raghav (Samsung)
2026-04-23 23:53 ` Ojaswin Mujoo
2026-04-24 0:17 ` Ritesh Harjani
2026-04-24 10:44 ` Pankaj Raghav
2026-04-24 0:09 ` Ritesh Harjani
2026-05-04 7:54 ` Daniel Gomez
2026-05-13 5:44 ` Ojaswin Mujoo
2026-06-01 16:49 ` Ojaswin Mujoo
2026-06-02 5:47 ` Christoph Hellwig
2026-06-02 6:54 ` Ojaswin Mujoo
2026-06-16 13:57 ` Daniel Gomez [this message]
2026-06-17 7:09 ` Ojaswin Mujoo
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=bdfdbd6b-81e0-49e3-a02f-2dc75727a71b@kernel.org \
--to=da.gomez@kernel.org \
--cc=andres@anarazel.de \
--cc=brauner@kernel.org \
--cc=da.gomez@samsung.com \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=john.g.garry@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=p.raghav@samsung.com \
--cc=pankaj.raghav@linux.dev \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=willy@infradead.org \
/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
Powered by JetHome