From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz, jbacik@fb.com, holger@applied-asynchrony.com
Subject: [PATCH 0/4] update bytes_may_use timely to avoid false ENOSPC issue
Date: Wed, 20 Jul 2016 13:56:33 +0800 [thread overview]
Message-ID: <20160720055637.7275-1-wangxg.fnst@cn.fujitsu.com> (raw)
Currently in btrfs, for data space reservation, it does not update
bytes_may_use in btrfs_update_reserved_bytes() and the decrease operation
will be delayed to be done in extent_clear_unlock_delalloc(), for
fallocate(2), decrease operation is even delayed to be done in end
of btrfs_fallocate(), which is too late. Obviously such delay will
cause unnecessary pressure to enospc system, in [PATCH 4/4], there is
a simpel test script that can reveal such false ENOSPC bug.
So in this patch set, it will remove RESERVE_FREE, RESERVE_ALLOC and
RESERVE_ALLOC_NO_ACCOUNT, and we always update bytes_may_use timely.
I'll also commit a fstests test case for this issue.
Wang Xiaoguang (4):
btrfs: use correct offset for reloc_inode in
prealloc_file_extent_cluster()
btrfs: divide btrfs_update_reserved_bytes() into two functions
btrfs: introduce new EXTENT_CLEAR_DATA_RESV flag
btrfs: update btrfs_space_info's bytes_may_use timely
fs/btrfs/ctree.h | 2 +-
fs/btrfs/extent-tree.c | 131 ++++++++++++++++++++++++-------------------------
fs/btrfs/extent_io.h | 1 +
fs/btrfs/file.c | 26 +++++-----
fs/btrfs/inode-map.c | 3 +-
fs/btrfs/inode.c | 37 ++++++++++----
fs/btrfs/relocation.c | 17 +++++--
7 files changed, 123 insertions(+), 94 deletions(-)
--
2.9.0
next reply other threads:[~2016-07-20 5:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 5:56 Wang Xiaoguang [this message]
2016-07-20 5:56 ` [PATCH 1/4] btrfs: use correct offset for reloc_inode in prealloc_file_extent_cluster() Wang Xiaoguang
2016-07-20 13:18 ` Josef Bacik
2016-07-21 1:49 ` Wang Xiaoguang
2016-07-21 13:05 ` Josef Bacik
2016-07-20 5:56 ` [PATCH 2/4] btrfs: divide btrfs_update_reserved_bytes() into two functions Wang Xiaoguang
2016-07-20 13:21 ` Josef Bacik
2016-07-20 5:56 ` [PATCH 3/4] btrfs: introduce new EXTENT_CLEAR_DATA_RESV flag Wang Xiaoguang
2016-07-20 13:22 ` Josef Bacik
2016-07-21 1:15 ` Wang Xiaoguang
2016-07-20 5:56 ` [PATCH 4/4] btrfs: update btrfs_space_info's bytes_may_use timely Wang Xiaoguang
2016-07-20 13:35 ` Josef Bacik
2016-07-21 1:18 ` Wang Xiaoguang
2016-07-20 8:46 ` [PATCH 0/4] update bytes_may_use timely to avoid false ENOSPC issue Holger Hoffstätte
2016-07-21 1:51 ` Wang Xiaoguang
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=20160720055637.7275-1-wangxg.fnst@cn.fujitsu.com \
--to=wangxg.fnst@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=holger@applied-asynchrony.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@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.