From: liubo <liubo2009@cn.fujitsu.com>
To: Josef Bacik <josef@redhat.com>
Cc: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] Btrfs: do aio_write instead of write
Date: Thu, 27 May 2010 11:06:54 +0800 [thread overview]
Message-ID: <4BFDE1CE.4030100@cn.fujitsu.com> (raw)
In-Reply-To: <1274461422-18433-6-git-send-email-josef@redhat.com>
On 05/22/2010 01:03 AM, Josef Bacik wrote:
> In order for AIO to work, we need to implement aio_write. This patch converts
> our btrfs_file_write to btrfs_aio_write. I've tested this with xfstests and
> nothing broke, and the AIO stuff magically started working. Thanks,
>
> Signed-off-by: Josef Bacik <josef@redhat.com>
>
Hi, Josef,
I've tested your patch(May 22) with my tools, and one case triggered a bug
which made writev operation hang up, more information is followed.
- Steps to trigger it:
# mount /dev/sda8 /home/btrfsdisk -o nodatacow
# gcc direct-io.c -o direct-io
# ./direct-io O_DIRECT writev /home/btrfsdisk/testrw 4M
then on another tty, after "dmesg"...
[snip]
device fsid f44b0879c75c0e99-1d4b28f2d5c503ae devid 1 transid 11177
/dev/sda8
btrfs: setting nodatacow
INFO: task direct-io:1399 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
direct-io D 0000000000000003 0 1399 1341 0x00000000
ffff880137c379c8 0000000000000082 ffff880137c379d8 ffffffff00000000
ffff880137c37fd8 ffff880139730000 0000000000015440 ffff880137c37fd8
0000000000015440 0000000000015440 0000000000015440 0000000000015440
Call Trace:
[<ffffffffa0119d4a>] wait_extent_bit+0xe3/0x163 [btrfs]
[<ffffffff8106651f>] ? autoremove_wake_function+0x0/0x39
[<ffffffffa0119e47>] lock_extent_bits+0x7d/0xa8 [btrfs]
[<ffffffffa0119e88>] lock_extent+0x16/0x18 [btrfs]
[<ffffffffa01025ce>] btrfs_direct_IO+0x8e/0x1be [btrfs]
[<ffffffff810c7301>] generic_file_direct_write+0xed/0x16d
[<ffffffffa010bb91>] btrfs_file_aio_write+0x2af/0x8d2 [btrfs]
[<ffffffff81100eae>] ? try_get_mem_cgroup_from_mm+0x39/0x49
[<ffffffffa010b8e2>] ? btrfs_file_aio_write+0x0/0x8d2 [btrfs]
[<ffffffff811063ed>] do_sync_readv_writev+0xc1/0x100
[<ffffffff81106120>] ? might_fault+0x21/0x23
[<ffffffff81106151>] ? copy_from_user+0x2f/0x31
[<ffffffff811c90ab>] ? security_file_permission+0x16/0x18
[<ffffffff81107145>] do_readv_writev+0xa7/0x127
[<ffffffff81107208>] vfs_writev+0x43/0x4e
[<ffffffff811072f8>] sys_writev+0x4a/0x93
[<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
So, can you figure out if anything in your patch leads to the bug?
next prev parent reply other threads:[~2010-05-27 3:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 17:03 [PATCH 1/6] fs: allow short direct-io reads to be completed via buffered IO Josef Bacik
2010-05-21 17:03 ` [PATCH 2/6] direct-io: add a hook for the fs to provide its own submit_bio function Josef Bacik
2010-05-21 17:03 ` [PATCH 3/6] direct-io: do not merge logically non-contiguous requests Josef Bacik
2010-05-22 1:47 ` Mike Fedyk
2010-05-22 1:47 ` Mike Fedyk
2010-05-22 1:47 ` Mike Fedyk
2010-05-22 14:02 ` Josef Bacik
2010-05-22 14:02 ` Josef Bacik
2010-05-22 14:02 ` Josef Bacik
2010-05-21 17:03 ` [PATCH 4/6] fs: kill blockdev_direct_IO_no_locking Josef Bacik
2010-05-21 17:03 ` [PATCH 5/6] Btrfs: add basic DIO read/write support Josef Bacik
2010-05-21 17:03 ` [PATCH 6/6] Btrfs: do aio_write instead of write Josef Bacik
2010-05-23 8:31 ` Shi Weihua
2010-05-23 23:59 ` Josef Bacik
2010-05-27 3:06 ` liubo [this message]
2010-05-27 3:13 ` liubo
2010-05-27 12:59 ` Chris Mason
2010-05-28 1:42 ` liubo
2010-05-30 9:33 ` Dmitri Nikulin
2010-06-01 13:19 ` Chris Mason
2010-06-01 23:20 ` Dmitri Nikulin
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=4BFDE1CE.4030100@cn.fujitsu.com \
--to=liubo2009@cn.fujitsu.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.