[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZXlSR8CTXjkeKxwk@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com>
Date: Wed, 13 Dec 2023 12:12:15 +0530
From: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To: John Garry <john.g.garry@...cle.com>
Cc: linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
Ritesh Harjani <ritesh.list@...il.com>,
linux-kernel@...r.kernel.org,
"Darrick J . Wong" <djwong@...nel.org>,
linux-block@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, dchinner@...hat.com
Subject: Re: [RFC 0/7] ext4: Allocator changes for atomic write support with
DIO
On Mon, Dec 11, 2023 at 04:24:14PM +0530, Ojaswin Mujoo wrote:
> > > > looks ok so far, then write 4KB at offset 0:
> > > >
> > > > # /test-pwritev2 -a -d -p 0 -l 4096 /root/mnt/file
> > > > file=/root/mnt/file write_size=4096 offset=0 o_flags=0x4002 wr_flags=0x24
> >
> > ...
> >
> > > > Please note that I tested on my own dev branch, which contains changes over
> > > > [1], but I expect it would not make a difference for this test.
> > > Hmm this should not ideally happen, can you please share your test
> > > script with me if possible?
> >
> > It's doing nothing special, just RWF_ATOMIC flag is set for DIO write:
> >
> > https://github.com/johnpgarry/linux/blob/236870d48ecb19c1cf89dc439e188182a0524cd4/samples/vfs/test-pwritev2.c
>
> Thanks for the script, will try to replicate this today and get back to
> you.
>
Hi John,
So I don't seem to be able to hit the warn on:
$ touch mnt/testfile
$ ./test-pwritev2 -a -d -p 0 -l 4096 mnt/testfile
file=mnt/testfile write_size=4096 offset=0 o_flags=0x4002 wr_flags=0x24
main wrote 4096 bytes at offset 0
$ filefrag -v mnt/testfile
Filesystem type is: ef53
File size of testfile is 4096 (1 block of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 0: 32900.. 32900: 1: last,eof
$ ./test-pwritev2 -a -d -p 8192 -l 8192 mnt/testfile
file=mnt/testfile write_size=8192 offset=8192 o_flags=0x4002 wr_flags=0x24
main wrote 8192 bytes at offset 8192
$ filefrag -v mnt/testfile
Filesystem type is: ef53
File size of mnt/testfile is 16384 (4 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 0: 32900.. 32900: 1:
1: 2.. 3: 33288.. 33289: 2: 32902: last,eof
mnt/testfile: 2 extents found
Not sure why you are hitting the WARN_ON. The tree I used is:
Latest ted/dev + your atomic patchset v1 + this patchset
Regards,
ojaswin
Powered by blists - more mailing lists