From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: property: Set incompat flag of lzo/zstd compression
Date: Tue, 15 May 2018 08:35:57 +0000 (UTC) [thread overview]
Message-ID: <pan$37a76$649690$3701a6f8$971fe67@cox.net> (raw)
In-Reply-To: 88f4d96f-e362-4b09-b436-30b3d1720e8a@cn.fujitsu.com
Su Yue posted on Tue, 15 May 2018 16:05:01 +0800 as excerpted:
>
> On 05/15/2018 03:51 PM, Misono Tomohiro wrote:
>> Incompat flag of lzo/zstd compression should be set at:
>> 1. mount time (-o compress/compress-force)
>> 2. when defrag is done 3. when property is set
>>
>> Currently 3. is missing and this commit adds this.
>>
>>
> If I don't misunderstand, compression property of an inode is only apply
> for *the* inode, not the whole filesystem.
> So the original logical should be okay.
But the inode is on the filesystem, and if it's compressed with lzo/zstd,
the incompat flag should be set to avoid mounting with an earlier kernel
that doesn't understand that compression and would therefore, if we're
lucky, simply fail to read the data compressed in that file/inode. (If
we're unlucky it could blow up with kernel memory corruption like James
Harvey's current case of unexpected, corrupted compressed data in a nocow
file that being nocow, doesn't have csum validation to fail and abort the
decompression, and shouldn't be compressed at all.)
So better to set the incompat flag and refuse to mount at all on kernels
that don't have the required compression support.
--
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:[~2018-05-15 8:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1526370458.git.misono.tomohiro@jp.fujitsu.com>
2018-05-15 7:51 ` [PATCH] btrfs: property: Set incompat flag of lzo/zstd compression Misono Tomohiro
2018-05-15 8:05 ` Su Yue
2018-05-15 8:34 ` Su Yue
2018-05-15 8:35 ` Duncan [this message]
2018-05-15 8:50 ` Su Yue
2018-05-15 8:20 ` Anand Jain
2018-05-15 14:07 ` David Sterba
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$37a76$649690$3701a6f8$971fe67@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;
as well as URLs for NNTP newsgroup(s).