From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: <clm@fb.com>, <jbacik@fb.com>, <dsterba@suse.com>,
<holger@applied-asynchrony.com>, <s.priebe@profihost.ag>
Subject: Re: [PATCH 0/3] introduce type based delalloc metadata reserve to fix some false enospc issues
Date: Tue, 22 Nov 2016 17:46:48 +0800 [thread overview]
Message-ID: <58341408.3010004@cn.fujitsu.com> (raw)
In-Reply-To: <1478853587-28717-1-git-send-email-wangxg.fnst@cn.fujitsu.com>
hello,
Any comments about this patchset?
The first two patches almost don't do any functional change which I think
could be review firstly.
btrfs: improve inode's outstanding_extents computation
btrfs: introduce type based delalloc metadata reserve
Regards,
Xiaoguang Wang
On 11/11/2016 04:39 PM, Wang Xiaoguang wrote:
> When having compression enabled, Stefan Priebe ofen got enospc errors
> though fs still has much free space. Qu Wenruo also has submitted a
> fstests test case which can reproduce this bug steadily, please see
> url: https://patchwork.kernel.org/patch/9420527
>
> First patch[1/3] "btrfs: improve inode's outstanding_extents computation" is to
> fix outstanding_extents and reserved_extents account issues. This issue was revealed
> by modifying BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, When modifying
> BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, fsstress test often gets these warnings from
> btrfs_destroy_inode():
> WARN_ON(BTRFS_I(inode)->outstanding_extents);
> WARN_ON(BTRFS_I(inode)->reserved_extents);
> Please see this patch's commit message for detailed info, and this patch is
> necessary to patch2 and patch3.
>
> For false enospc, the root reasson is that for compression, its max extent size will
> be 128k, not 128MB. If we still use 128MB as max extent size to reserve metadata for
> compression, obviously it's not appropriate. In patch "btrfs: Introduce COMPRESS
> reserve type to fix false enospc for compression" commit message,
> we explain why false enospc error occurs, please see it for detailed info.
>
> To fix this issue, we introduce a new enum type:
> enum btrfs_metadata_reserve_type {
> BTRFS_RESERVE_NORMAL,
> BTRFS_RESERVE_COMPRESS,
> };
> For btrfs_delalloc_[reserve|release]_metadata() and
> btrfs_delalloc_[reserve|release]_space(), we introce a new btrfs_metadata_reserve_type
> argument, then if a path needs to go compression, we pass BTRFS_RESERVE_COMPRESS,
> otherwise pass BTRFS_RESERVE_NORMAL.
>
> With these patchs, Stefan no longer saw such false enospc errors, and Qu Wenruo's
> fstests test case will also pass. I have also run whole fstests multiple times,
> no regression occurs, thanks.
>
> Wang Xiaoguang (3):
> btrfs: improve inode's outstanding_extents computation
> btrfs: introduce type based delalloc metadata reserve
> btrfs: Introduce COMPRESS reserve type to fix false enospc for
> compression
>
> fs/btrfs/ctree.h | 36 +++++--
> fs/btrfs/extent-tree.c | 52 ++++++---
> fs/btrfs/extent_io.c | 61 ++++++++++-
> fs/btrfs/extent_io.h | 5 +
> fs/btrfs/file.c | 25 +++--
> fs/btrfs/free-space-cache.c | 6 +-
> fs/btrfs/inode-map.c | 6 +-
> fs/btrfs/inode.c | 246 ++++++++++++++++++++++++++++++++++---------
> fs/btrfs/ioctl.c | 16 +--
> fs/btrfs/relocation.c | 14 ++-
> fs/btrfs/tests/inode-tests.c | 15 +--
> 11 files changed, 381 insertions(+), 101 deletions(-)
>
next prev parent reply other threads:[~2016-11-22 9:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 8:39 [PATCH 0/3] introduce type based delalloc metadata reserve to fix some false enospc issues Wang Xiaoguang
2016-11-11 8:39 ` [PATCH 1/3] btrfs: improve inode's outstanding_extents computation Wang Xiaoguang
2017-01-03 21:00 ` Liu Bo
2017-01-03 23:36 ` Liu Bo
2017-01-23 6:16 ` Qu Wenruo
2016-11-11 8:39 ` [PATCH 2/3] btrfs: introduce type based delalloc metadata reserve Wang Xiaoguang
2016-11-11 8:39 ` [PATCH 3/3] btrfs: Introduce COMPRESS reserve type to fix false enospc for compression Wang Xiaoguang
2016-11-22 9:46 ` Wang Xiaoguang [this message]
2016-12-31 7:31 ` [PATCH 0/3] introduce type based delalloc metadata reserve to fix some false enospc issues Stefan Priebe - Profihost AG
2017-01-01 9:32 ` Qu Wenruo
2017-01-04 16:13 ` Stefan Priebe - Profihost AG
2017-02-25 8:23 ` Stefan Priebe - Profihost AG
2017-02-27 0:46 ` Qu Wenruo
2017-02-27 7:22 ` Qu Wenruo
2017-02-27 13:43 ` Stefan Priebe - Profihost AG
2017-04-25 19:25 ` Stefan Priebe - Profihost AG
2017-04-26 0:41 ` Qu Wenruo
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=58341408.3010004@cn.fujitsu.com \
--to=wangxg.fnst@cn.fujitsu.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=holger@applied-asynchrony.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=s.priebe@profihost.ag \
/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.