From: Zhengyuan Liu <liuzhengyuang521@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: viro@zeniv.linux.org.uk,
"Andrew Morton" <akpm@linux-foundation.org>,
tytso@mit.edu, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-ext4@vger.kernel.org, 刘云 <liuyun01@kylinos.cn>,
"Zhengyuan Liu" <liuzhengyuan@kylinos.cn>
Subject: Re: Problem with direct IO
Date: Thu, 28 Oct 2021 23:02:55 +0800 [thread overview]
Message-ID: <CAOOPZo4Chk-Ac8f=gKa3jQZgYjt3CC6x5+Ff=zaAEPLHG==_+g@mail.gmail.com> (raw)
In-Reply-To: <20211025155713.GD12157@quack2.suse.cz>
On Mon, Oct 25, 2021 at 11:57 PM Jan Kara <jack@suse.cz> wrote:
>
> On Sat 23-10-21 10:06:24, Zhengyuan Liu wrote:
> > On Fri, Oct 22, 2021 at 5:31 PM Jan Kara <jack@suse.cz> wrote:
> > > > > > > Can you post output of "dumpe2fs -h <device>" for the filesystem where the
> > > > > > > problem happens? Thanks!
> > > > > >
> > > > > > Sure, the output is:
> > > > > >
> > > > > > # dumpe2fs -h /dev/sda3
> > > > > > dumpe2fs 1.45.3 (14-Jul-2019)
> > > > > > Filesystem volume name: <none>
> > > > > > Last mounted on: /data
> > > > > > Filesystem UUID: 09a51146-b325-48bb-be63-c9df539a90a1
> > > > > > Filesystem magic number: 0xEF53
> > > > > > Filesystem revision #: 1 (dynamic)
> > > > > > Filesystem features: has_journal ext_attr resize_inode dir_index
> > > > > > filetype needs_recovery sparse_super large_file
> > > > >
> > > > > Thanks for the data. OK, a filesystem without extents. Does your test by
> > > > > any chance try to do direct IO to a hole in a file? Because that is not
> > > > > (and never was) supported without extents. Also the fact that you don't see
> > > > > the problem with ext4 (which means extents support) would be pointing in
> > > > > that direction.
> > > >
> > > > I am not sure if it trys to do direct IO to a hole or not, is there any
> > > > way to check? If you have a simple test to reproduce please let me know,
> > > > we are glad to try.
> > >
> > > Can you enable following tracing?
> >
> > Sure, but let's confirm before doing that, it seems Ext4 doesn't
> > support iomap in
> > V4.19 which could also reproduce the problem, so if it is necessary to
> > do the following
> > tracing? or should we modify the tracing if under V4.19?
>
> Well, iomap is just a different generic framework for doing direct IO. The
> fact that you can observe the problem both with iomap and the old direct IO
> framework is one of the reasons why I think the problem is actually that
> the file has holes (unallocated space in the middle).
>
> > > echo 1 >/sys/kernel/debug/tracing/events/ext4/ext4_ind_map_blocks_exit/enable
> > > echo iomap_dio_rw >/sys/kernel/debug/tracing/set_ftrace_filter
> > > echo "function_graph" >/sys/kernel/debug/tracing/current_tracer
>
> If you want to trace a kernel were ext4 direct IO path is not yet
> converted to iomap framework you need to replace tracing of iomap_dio_rw
> with:
>
> echo __blockdev_direct_IO >/sys/kernel/debug/tracing/set_ftrace_filter
Sorry for the late reply, because it is hard to reproduce when enabling ftrace.
I'll post here right after getting useful data.
> > > And then gather output from /sys/kernel/debug/tracing/trace_pipe. Once the
> > > problem reproduces, you can gather the problematic file name from dmesg, find
> > > inode number from "stat <filename>" and provide that all to me? Thanks!
>
next prev parent reply other threads:[~2021-10-28 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 1:46 Problem with direct IO Zhengyuan Liu
2021-10-18 1:09 ` Zhengyuan Liu
2021-10-18 18:43 ` Andrew Morton
2021-10-19 3:39 ` Zhengyuan Liu
2021-10-20 17:37 ` Jan Kara
2021-10-21 2:21 ` Zhengyuan Liu
2021-10-21 8:03 ` Jan Kara
2021-10-21 12:11 ` Zhengyuan Liu
2021-10-22 9:31 ` Jan Kara
2021-10-23 2:06 ` Zhengyuan Liu
2021-10-25 15:57 ` Jan Kara
2021-10-28 15:02 ` Zhengyuan Liu [this message]
[not found] ` <61712B10.2060408@huawei.com>
2021-10-21 12:20 ` Zhengyuan Liu
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='CAOOPZo4Chk-Ac8f=gKa3jQZgYjt3CC6x5+Ff=zaAEPLHG==_+g@mail.gmail.com' \
--to=liuzhengyuang521@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuyun01@kylinos.cn \
--cc=liuzhengyuan@kylinos.cn \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).