From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 201461] ext4 journal stalls write system call
Date: Thu, 18 Oct 2018 13:04:59 +0000 [thread overview]
Message-ID: <bug-201461-13602-dmbBdCpMXA@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-201461-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=201461
--- Comment #4 from zhenbianshu@foxmail.com ---
(In reply to Theodore Tso from comment #3)
> The writeback code will end up calling ext4_writepages(), which will do
> block allocations via ext4_map_blocks() with the flag
> EXT4_GET_BLOCKS_CREATE(), and this will take a write lock on i_data_sem.
>
> I'll let you trace through the call chain that starts in the writeback
> thread, through the call to ext4_writepages(), proceeds to
> mpage_map_one_extent(), and from there to ext4_map_blocks() which actually
> holds the write block.
>
> Note that this is distinct from the data=ordered forced writeblock which
> starts in fs/jbd2's journal_submit_inode_data_buffer() calling
> generic_writepages(). The difference is that generic_writepages() will
> only call writepage() function. For ext4 that's ext4_writepage(), which
> will never do block allocation.
>
> But the writeback threads call the address space operation's, writepages()
> function, and ext4_writepages() *will* do block allocation for delayed
> allocation writes.
>
> This is a subtle point; ext4_writepage() and ext4_writepages() do very
> different things. The first is used by the commit kernel thread; the
> second is used by the writeback kernel thread.
I did not find ext4_writepages() or mpage_map_one_extent() in linux 3.10.0
source code, what I found is ext4_da_writepages().
And the call chain:
journal_submit_data_buffers()
journal_submit_inode_data_buffers()
generic_writepages()
ext4_da_writepages()
write_cache_page_da()
mpage_da_map_and_submit()
ext4_map_blocks()
will take the write lock of i_data_sem.
Will generic_writepages() call ext4_da_writepages() in jbd2 ?
--
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2018-10-18 21:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 12:56 [Bug 201461] New: ext4 journal stalls write system call bugzilla-daemon
2018-10-17 12:57 ` [Bug 201461] " bugzilla-daemon
2018-10-17 15:39 ` bugzilla-daemon
2018-10-18 2:02 ` bugzilla-daemon
2018-10-18 2:35 ` bugzilla-daemon
2018-10-18 13:04 ` bugzilla-daemon [this message]
2018-10-18 14:12 ` bugzilla-daemon
2018-10-18 14:22 ` bugzilla-daemon
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=bug-201461-13602-dmbBdCpMXA@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).