From: Anand Jain <anand.jain@oracle.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/4] btrfs: SETFLAGS ioctl: use helper for compression type conversion
Date: Fri, 1 Dec 2017 06:08:53 +0800 [thread overview]
Message-ID: <f2ae8299-098a-3e87-2a04-f1b9558043d8@oracle.com> (raw)
In-Reply-To: <233097e27401c0f3163e7dc7c72442f50309705a.1512058075.git.dsterba@suse.com>
On 12/01/2017 12:09 AM, David Sterba wrote:
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/ioctl.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index e8adebc8c1b0..c41c259d9283 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -307,12 +307,10 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
> ip->flags |= BTRFS_INODE_COMPRESS;
> ip->flags &= ~BTRFS_INODE_NOCOMPRESS;
>
> - if (fs_info->compress_type == BTRFS_COMPRESS_LZO)
> - comp = "lzo";
> - else if (fs_info->compress_type == BTRFS_COMPRESS_ZLIB)
> - comp = "zlib";
> - else
> - comp = "zstd";
Bit deviating from the stuff here. Looks like zstd changed the default
compression algo to zstd (from zlib). I remember seeing your comment
on that too which I thought is fixed, but now I can't locate. Shouldn't
this be a bug ?
Thanks, Anand
> + comp = btrfs_compress_type2str(fs_info->compress_type);
> + if (!comp || comp[0] == 0)
> + comp = btrfs_compress_type2str(BTRFS_COMPRESS_ZLIB);
> +
> ret = btrfs_set_prop(inode, "btrfs.compression",
> comp, strlen(comp), 0);
> if (ret)
>
next prev parent reply other threads:[~2017-11-30 22:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 16:08 [PATCH 0/4] Minor compression cleanups David Sterba
2017-11-30 16:09 ` [PATCH 1/4] btrfs: compression: add helper for type to string conversion David Sterba
2017-11-30 21:55 ` Anand Jain
2017-12-04 14:41 ` David Sterba
2017-11-30 16:09 ` [PATCH 2/4] btrfs: SETFLAGS ioctl: use helper for compression type conversion David Sterba
2017-11-30 22:08 ` Anand Jain [this message]
2017-12-04 14:29 ` David Sterba
2017-11-30 16:09 ` [PATCH 3/4] btrfs: prop: use common helper for type to string conversion David Sterba
2017-11-30 16:09 ` [PATCH 4/4] btrfs: show options: use helper to convert compression type string 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=f2ae8299-098a-3e87-2a04-f1b9558043d8@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.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;
as well as URLs for NNTP newsgroup(s).