linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] Btrfs: Check INCOMPAT flags on remount and add helper function
Date: Mon, 23 Jul 2012 09:15:55 +0800	[thread overview]
Message-ID: <500CA5CB.7070800@huawei.com> (raw)
In-Reply-To: <1342822601-18340-2-git-send-email-mitch.harder@sabayonlinux.org>

> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h

> index a0ee2f8..3a1a700 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3103,6 +3103,19 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
>  			       struct btrfs_root *root, const char *function,
>  			       unsigned int line, int errno);
>  
> +static inline void btrfs_chk_lzo_incompat(struct btrfs_root *root)


Isn't btrfs_set_lzo_incompat() is a better name?

> +{
> +	struct btrfs_super_block *disk_super;
> +	u64 features;
> +
> +	disk_super = root->fs_info->super_copy;
> +	features = btrfs_super_incompat_flags(disk_super);
> +	if (!(features & BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO)) {
> +		features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO;
> +		btrfs_set_super_incompat_flags(disk_super, features);
> +	}
> +}
> +



  reply	other threads:[~2012-07-23  1:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 22:16 [PATCH v3 0/1] LZO INCOMPAT Checking Mitch Harder
2012-07-20 22:16 ` [PATCH v3 1/1] Btrfs: Check INCOMPAT flags on remount and add helper function Mitch Harder
2012-07-23  1:15   ` Li Zefan [this message]
2012-07-24 12:11   ` 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=500CA5CB.7070800@huawei.com \
    --to=lizefan@huawei.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mitch.harder@sabayonlinux.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).