From: Chris Mason <clm@fb.com>
To: Zhaolei <zhaolei@cn.fujitsu.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 8/9] btrfs: wait for delayed iputs on no space
Date: Mon, 13 Apr 2015 10:54:57 -0400 [thread overview]
Message-ID: <552BD8C1.3000400@fb.com> (raw)
In-Reply-To: <4a2f9c8918b1386ef6296d52ee4e331b7099b247.1428554023.git.zhaolei@cn.fujitsu.com>
On 04/09/2015 12:34 AM, Zhaolei wrote:
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
>
> btrfs will report no_space when we run following write and delete
> file loop:
> # FILE_SIZE_M=[ 75% of fs space ]
> # DEV=[ some dev ]
> # MNT=[ some dir ]
> #
> # mkfs.btrfs -f "$DEV"
> # mount -o nodatacow "$DEV" "$MNT"
> # for ((i = 0; i < 100; i++)); do dd if=/dev/zero of="$MNT"/file0 bs=1M count="$FILE_SIZE_M"; rm -f "$MNT"/file0; done
> #
>
> Reason:
> iput() and evict() is run after write pages to block device, if
> write pages work is not finished before next write, the "rm"ed space
> is not freed, and caused above bug.
>
> Fix:
> We can add "-o flushoncommit" mount option to avoid above bug, but
> it have performance problem. Actually, we can to wait for on-the-fly
> writes only when no-space happened, it is which this patch do.
Can you please change this so we only do this flush if the first commit
doesn't free up enough space? I think this is going to have a
performance impact as the FS fills up.
-chris
next prev parent reply other threads:[~2015-04-13 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 4:34 [PATCH v2 0/9] btrfs: Fix no_space on dd and rm loop Zhaolei
2015-04-09 4:34 ` [PATCH 1/9] btrfs: fix condition of commit transaction Zhaolei
2015-04-09 4:34 ` [PATCH 2/9] btrfs: Fix tail space processing in find_free_dev_extent() Zhaolei
2015-04-09 4:34 ` [PATCH 3/9] btrfs: Adjust commit-transaction condition to avoid NO_SPACE more Zhaolei
2015-04-09 4:34 ` [PATCH 4/9] btrfs: Set relative data on clear btrfs_block_group_cache->pinned Zhaolei
2015-04-09 4:34 ` [PATCH 5/9] btrfs: add WARN_ON() to check is space_info op current Zhaolei
2015-04-09 4:34 ` [PATCH 6/9] btrfs: Fix NO_SPACE bug caused by delayed-iput Zhaolei
2015-07-07 8:13 ` Liu Bo
2015-07-07 9:16 ` Zhao Lei
2015-07-07 9:26 ` Liu Bo
2015-07-07 9:38 ` Zhao Lei
2015-04-09 4:34 ` [PATCH 7/9] btrfs: Support busy loop of write and delete Zhaolei
2015-04-09 4:34 ` [PATCH 8/9] btrfs: wait for delayed iputs on no space Zhaolei
2015-04-13 14:54 ` Chris Mason [this message]
2015-04-14 4:06 ` Zhao Lei
2015-04-09 4:34 ` [PATCH 9/9] btrfs: cleanup unused alloc_chunk varible Zhaolei
-- strict thread matches above, loose matches on Subject: below --
2015-04-03 12:11 [PATCH 0/9] btrfs: Fix no_space on dd and rm loop Zhaolei
2015-04-03 12:12 ` [PATCH 8/9] btrfs: wait for delayed iputs on no space Zhaolei
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=552BD8C1.3000400@fb.com \
--to=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zhaolei@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 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.