Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com,
	chris@colorremedies.com
Subject: Re: [RFC][PATCH] btrfs: add an autodefrag property
Date: Sat, 18 Jul 2020 08:03:53 +0800	[thread overview]
Message-ID: <2e3d691a-9596-fb99-8138-dd1b53fda7b4@gmx.com> (raw)
In-Reply-To: <99682fa7-4ba6-48df-60a7-a8eaa453419a@toxicpanda.com>


[-- Attachment #1.1: Type: text/plain, Size: 1649 bytes --]



On 2020/7/18 上午7:58, Josef Bacik wrote:
> On 7/17/20 7:46 PM, Qu Wenruo wrote:
>>
>>
>> On 2020/7/18 上午4:42, Josef Bacik wrote:
>>> Autodefrag is very useful for somethings, like the 9000 sqllite files
>>> that Firefox uses, but is way less useful for virt images.
>>> Unfortunately this is only available currently as a whole mount option.
>>> Fix this by adding an "autodefrag" property, that users can set on a per
>>> file or per directory basis.  Thus allowing them to control where
>>> exactly the extra write activity is going to occur.
>>>
>>> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
>>> ---
>>> - This is an RFC because I want to make sure we're ok with this
>>> before I go and
>>>    add btrfs-progs support for this.  I'm not married to the name or
>>> the value,
>>>    but I think the core goal is valuable.
>>
>> The idea looks pretty good to me.
>>
>> Although it would be much more convincing to bring some real-world micro
>> bench to show the benefit.
>>
> 
> The same benefit as what existed originally for autodefrag, firefox
> isn't unusably slow on spinning rust.
> 
>>
>> However I still have a concern related to defrag.
>> Since it's on-disk flag, thus can be inherited by snapshot, then what
>> would happen if an auto-defrag inode get snapshotted.
>>
>> Would any write to the auto-defrag inode in new snapshot break the space
>> saving?
> Sure but that's the case for all defrag, and this is in fact better than
> mount -o autodefrag because you can limit the damage.  Thanks,

That's right. So no problem at all then.

Thanks,
Qu

> 
> Josef


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-07-18  0:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 20:42 [RFC][PATCH] btrfs: add an autodefrag property Josef Bacik
2020-07-17 23:46 ` Qu Wenruo
2020-07-17 23:58   ` Josef Bacik
2020-07-18  0:03     ` Qu Wenruo [this message]
2020-07-18  7:46 ` Nikolay Borisov
2020-07-19 14:54 ` Igor Raits

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=2e3d691a-9596-fb99-8138-dd1b53fda7b4@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=chris@colorremedies.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox