From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: [bug or by design ?] btrfs defrag compression does not persist
Date: Thu, 22 Dec 2016 10:26:43 +0000 (UTC) [thread overview]
Message-ID: <pan$aa20d$b26e35f6$8028e3f5$5aebde82@cox.net> (raw)
In-Reply-To: 16053303-2857-9729-a94f-d697004f019d@oracle.com
Anand Jain posted on Thu, 22 Dec 2016 10:28:28 +0800 as excerpted:
> A quick design specific question.
>
> The following command converts file-data-extents to the specified
> encoder (lzo).
>
> $ btrfs filesystem defrag -v -r -f -clzo dir/
>
> However the lzo property does not persist through the file modify.
> As the above operation does not update the btrfs.compression property.
>
> Question:
> I wonder if this should be a bug or if its by design ? What could be
> the main use case to _associate compression at the time of defrag_ ?
> The no-conflict fix will be to add another option to make it
> persistent.
I'd say it's a feature (whether deliberately designed that way or not).
Presumably, if you want real-time compression, you're using the
appropriate mount option or already setting the property on the file(s)
in question. Which leaves defrag-with-compression runs for one-time
compression of cold data that's unlikely to change further, or for
periodic compression runs during slow periods or the like, when you know
it's not going to be an issue, even if it would be an issue if done in
real-time production, thus the reason you're not running with the option
already.
A practical example would be someone using the compress=lzo mount option
for real-time work, then using defrag-and-compress to compress to zlib
level either during slow periods, or when files have been rotated out of
active use and are no longer being actively rewritten/appended. They
don't /want/ further modifications compressed to the same level in real-
time.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2016-12-22 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 2:28 [bug or by design ?] btrfs defrag compression does not persist Anand Jain
2016-12-22 10:26 ` Duncan [this message]
2016-12-22 12:22 ` Austin S. Hemmelgarn
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='pan$aa20d$b26e35f6$8028e3f5$5aebde82@cox.net' \
--to=1i5t5.duncan@cox.net \
--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