From: Chris Mason <chris.mason@oracle.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: Josef Bacik <josef@redhat.com>,
Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH V2] btrfs: fix possible deadlock by clearing __GFP_FS flag
Date: Sun, 27 Mar 2011 10:02:34 -0400 [thread overview]
Message-ID: <1301234502-sup-4509@think> (raw)
In-Reply-To: <4D8F2D32.3000601@cn.fujitsu.com>
Excerpts from Miao Xie's message of 2011-03-27 08:27:30 -0400:
> Changelog V1 -> V2:
> - modify the explanation of the deadlock.
> - clear __GFP_FS flag in the free space's page cache.
>
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index a039065..57df380 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -88,6 +88,8 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root,
> }
> spin_unlock(&block_group->lock);
>
> + inode->i_mapping->flags &= ~__GFP_FS;
> +
> return inode;
> }
>
I did this part slightly differently, in btrfs_read_locked_inode. That
way we know the mask isn't changing while page allocations are taking
place.
-chris
next prev parent reply other threads:[~2011-03-27 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 8:07 [PATCH] btrfs: fix possible deadlock by clearing __GFP_FS flag Miao Xie
2011-03-27 12:27 ` [PATCH V2] " Miao Xie
2011-03-27 14:02 ` Chris Mason [this message]
2011-03-29 5:48 ` Itaru Kitayama
2011-03-29 6:16 ` Miao Xie
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=1301234502-sup-4509@think \
--to=chris.mason@oracle.com \
--cc=josef@redhat.com \
--cc=kitayama@cl.bb4u.ne.jp \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaox@cn.fujitsu.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 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).