All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mitch Harder <mitch.harder@sabayonlinux.org>
To: "Zhong, Xin" <xin.zhong@intel.com>
Cc: "Maria Wikström" <maria@ponstudios.se>,
	"Josef Bacik" <josef@redhat.com>,
	"Johannes Hirte" <johannes.hirte@fem.tu-ilmenau.de>,
	"Chris Mason" <chris.mason@oracle.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs file write debugging patch
Date: Tue, 1 Mar 2011 08:54:24 -0600	[thread overview]
Message-ID: <AANLkTimkhbA8Lq=eS704+RVt=FeQoeFwy1JgdkHPsrxy@mail.gmail.com> (raw)
In-Reply-To: <1865303E0DED764181A9D882DEF65FB68662A5EA7B@shsmsx502.ccr.corp.intel.com>

On Tue, Mar 1, 2011 at 5:56 AM, Zhong, Xin <xin.zhong@intel.com> wrote:
> Hi Mitch,
>
> I suspect there's a lock contention between flush-btrfs (lock_dellall=
oc_pages) and btrfs_file_aio_write. However I can not recreate it local=
ly. Could you please try below patch? Thanks!
>
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 65338a1..b9d0929=
 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1007,17 +1007,16 @@ static ssize_t btrfs_file_aio_write(struct ki=
ocb *iocb,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D btrfs_delalloc_reserve_space(in=
ode,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 num_pages << PAGE_CACHE_SHIFT);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out;
> -
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ret =3D prepare_pages(root, file, page=
s, num_pages,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
pos, first_index, last_index,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
write_bytes);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 btrfs_delalloc_release_=
space(inode,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D btrfs_delalloc_reserve_space(in=
ode,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0num_pages << PAGE_CACHE_SHIFT);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 btrfs_drop_pages(pages,=
 num_pages);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>
>

Thanks.

I've tested this patch, but the build is still failing at the same
point as before.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-03-01 14:54 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09  9:30 [PATCH v2]Btrfs: pwrite blocked when writing from the mmaped buffer of the same page Zhong, Xin
2011-01-27 13:09 ` Johannes Hirte
2011-01-27 22:12   ` Maria Wikström
2011-01-28  1:26     ` Zhong, Xin
2011-01-28  2:54       ` Johannes Hirte
2011-01-28  3:53         ` Zhong, Xin
2011-02-01 23:34           ` Johannes Hirte
2011-02-11  4:39             ` Zhong, Xin
2011-02-18 11:31               ` Maria Wikström
2011-02-21  1:51                 ` Zhong, Xin
2011-02-24 14:51                   ` Maria Wikström
2011-02-24 15:55                     ` Mitch Harder
2011-02-24 16:00                       ` Chris Mason
2011-02-24 16:03                         ` Mitch Harder
2011-02-24 16:19                           ` Chris Mason
2011-02-24 16:32                             ` Mitch Harder
     [not found]                               ` <AANLkTinvyb-bTVVignd1KGojvh-QrYCFmCnwYKBsYC_2@mail.gmail.com>
2011-02-25 17:11                                 ` Mitch Harder
2011-02-25 18:43                                   ` Mitch Harder
2011-02-25 19:19                                     ` Chris Mason
2011-02-28  1:46                                     ` [PATCH] btrfs file write debugging patch Chris Mason
2011-02-28  8:56                                       ` Zhong, Xin
2011-02-28 14:02                                         ` Chris Mason
2011-02-28 10:13                                       ` Johannes Hirte
2011-02-28 14:00                                         ` Chris Mason
2011-02-28 16:10                                         ` Josef Bacik
2011-02-28 16:45                                           ` Maria Wikström
2011-02-28 17:47                                             ` Mitch Harder
2011-02-28 20:20                                               ` Mitch Harder
2011-03-01  5:09                                                 ` Mitch Harder
2011-03-01 10:14                                                 ` Zhong, Xin
2011-03-01 11:56                                                   ` Zhong, Xin
2011-03-01 14:54                                                     ` Mitch Harder [this message]
2011-03-01 14:51                                                   ` Mitch Harder
2011-03-01 21:56                                                 ` Piotr Szymaniak
2011-02-24 23:35                   ` [PATCH v2]Btrfs: pwrite blocked when writing from the mmaped buffer of the same page Piotr Szymaniak
2011-02-22 22:27               ` Johannes Hirte
2011-02-23  7:27                 ` Zhong, Xin
2011-02-23 21:56                   ` Chris Mason
2011-02-23 23:02                     ` Johannes Hirte
2011-02-24 15:23                       ` Chris Mason
2011-01-28 16:47         ` Maria Wikström
2011-01-28 18:27           ` Rui Miguel Silva
2011-01-29 15:38             ` Maria Wikström
2011-03-01 16:36 [PATCH] btrfs file write debugging patch Xin Zhong
2011-03-01 21:09 ` Mitch Harder
2011-03-02 10:58   ` Zhong, Xin
2011-03-02 14:00     ` Xin Zhong
2011-03-04  1:51     ` Chris Mason
2011-03-04  2:32       ` Josef Bacik
2011-03-04  2:42         ` Zhong, Xin
2011-03-04  2:41           ` Josef Bacik
2011-03-04  8:41             ` Zhong, Xin
2011-03-05 16:56             ` Mitch Harder
2011-03-05 17:28               ` Xin Zhong
2011-03-04 12:19       ` Chris Mason
2011-03-04 14:25         ` Xin Zhong
2011-03-04 15:33           ` Mitch Harder
2011-03-04 17:21             ` Mitch Harder
2011-03-05  1:00               ` Xin Zhong
2011-03-05 13:14                 ` Mitch Harder
2011-03-05 16:50                   ` Mitch Harder
2011-03-06 18:00                     ` Chris Mason
2011-03-07  0:58                       ` Chris Mason
2011-03-07  6:07                         ` Mitch Harder
2011-03-07  6:37                           ` Zhong, Xin
2011-03-07 19:56                           ` Maria Wikström
2011-03-07 22:12                             ` Johannes Hirte
2011-03-08  2:51                               ` Zhong, Xin

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='AANLkTimkhbA8Lq=eS704+RVt=FeQoeFwy1JgdkHPsrxy@mail.gmail.com' \
    --to=mitch.harder@sabayonlinux.org \
    --cc=chris.mason@oracle.com \
    --cc=johannes.hirte@fem.tu-ilmenau.de \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=maria@ponstudios.se \
    --cc=xin.zhong@intel.com \
    /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.