From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: Chris Mason <clm@fb.com>
Cc: dsterba@suse.cz, Qu Wenruo <quwenruo@cn.fujitsu.com>,
bo.li.liu@oracle.com, Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [RFC] btrfs: make max inline data can be equal to sectorsize
Date: Sat, 19 Nov 2016 03:27:02 -0500 [thread overview]
Message-ID: <20161119082702.GV21290@hungrycats.org> (raw)
In-Reply-To: <147397a2-0401-82c2-069b-ce21e2d07484@fb.com>
[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]
On Fri, Nov 18, 2016 at 03:58:06PM -0500, Chris Mason wrote:
>
>
> On 11/16/2016 11:10 AM, David Sterba wrote:
> >On Mon, Nov 14, 2016 at 09:55:34AM +0800, Qu Wenruo wrote:
> >>At 11/12/2016 04:22 AM, Liu Bo wrote:
> >>>On Tue, Oct 11, 2016 at 02:47:42PM +0800, Wang Xiaoguang wrote:
> >>>>If we use mount option "-o max_inline=sectorsize", say 4096, indeed
> >>>>even for a fresh fs, say nodesize is 16k, we can not make the first
> >>>>4k data completely inline, I found this conditon causing this issue:
> >>>> !compressed_size && (actual_end & (root->sectorsize - 1)) == 0
> >>>>
> >>>>If it retuns true, we'll not make data inline. For 4k sectorsize,
> >>>>0~4094 dara range, we can make it inline, but 0~4095, it can not.
> >>>>I don't think this limition is useful, so here remove it which will
> >>>>make max inline data can be equal to sectorsize.
> >>>
> >>>It's difficult to tell whether we need this, I'm not a big fan of using
> >>>max_inline size more than the default size 2048, given that most reports
> >>>about ENOSPC is due to metadata and inline may make it worse.
> >>
> >>IMHO if we can use inline data extents to trigger ENOSPC more easily,
> >>then we should allow it to dig the problem further.
> >>
> >>Just ignoring it because it may cause more bug will not solve the real
> >>problem anyway.
> >
> >Not allowing the full 4k value as max_inline looks artificial to me.
> >We've removed other similar limitation in the past so I'd tend to agree
> >to do the same here. There's no significant use for it as far as I can
> >tell, if you want to exhaust metadata, the difference to max_inline=4095
> >would be really tiny in the end. So, I'm okay with merging it. If
> >anybody feels like adding his reviewed-by, please do so.
>
> The check is there because in practice it doesn't make sense to inline an
> extent if it fits perfectly in a data block. You could argue its saving
> seeks, but we're also adding seeks by spreading out the metadata in general.
> So, I'd want to see benchmarks before deciding.
Does that limit kick in before or after compression? A compressed extent
could easily have 4096 bytes of data in 200 bytes. If a filesystem
contained a whole lot of exactly-4096-byte compressible files that extra
byte might be worth something.
> If we're using it for debugging, I'd rather stick with max_inline=4095.
>
> -chris
> --
> 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2016-11-19 8:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 6:47 [RFC] btrfs: make max inline data can be equal to sectorsize Wang Xiaoguang
2016-10-11 15:49 ` Chris Murphy
2016-10-12 3:35 ` Wang Xiaoguang
2016-10-15 22:28 ` Zygo Blaxell
2016-10-26 7:32 ` Wang Xiaoguang
2016-11-11 20:22 ` Liu Bo
2016-11-14 1:55 ` Qu Wenruo
2016-11-16 16:10 ` David Sterba
2016-11-18 20:58 ` Chris Mason
2016-11-19 8:27 ` Zygo Blaxell [this message]
2017-01-02 17:21 ` David Sterba
2016-11-22 7:54 ` 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=20161119082702.GV21290@hungrycats.org \
--to=ce3g8jdj@umail.furryterror.org \
--cc=bo.li.liu@oracle.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
--cc=wangxg.fnst@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).