diff mbox

[2/3] btrfs: define SUPER_FLAG_METADUMP_V2

Message ID 20180108080421.17668-3-anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anand Jain Jan. 8, 2018, 8:04 a.m. UTC
btrfs-progs uses super flag bit BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34).
So just define that in kernel so that we know its been used. This patch
does not add it to BTRFS_SUPER_FLAG_SUPP yet.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Qu Wenruo Jan. 8, 2018, 8:20 a.m. UTC | #1
On 2018年01月08日 16:04, Anand Jain wrote:
> btrfs-progs uses super flag bit BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34).
> So just define that in kernel so that we know its been used. This patch
> does not add it to BTRFS_SUPER_FLAG_SUPP yet.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  include/uapi/linux/btrfs_tree.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
> index 6d6e5da51527..38ab0e06259a 100644
> --- a/include/uapi/linux/btrfs_tree.h
> +++ b/include/uapi/linux/btrfs_tree.h
> @@ -456,6 +456,7 @@ struct btrfs_free_space_header {
>  
>  #define BTRFS_SUPER_FLAG_SEEDING	(1ULL << 32)
>  #define BTRFS_SUPER_FLAG_METADUMP	(1ULL << 33)
> +#define BTRFS_SUPER_FLAG_METADUMP_V2	(1ULL << 34)

Please also include this to BTRFS_SUPER_FLAG_SUPP.

It's quite common developers (at least myself) may try to mount a
recovered btrfs image.

(That's also the reason why the patch should be put before the
BTRFS_SUPER_FLAG_SUPP check patch)

Thanks,
Qu
>  
>  
>  /*
>
David Sterba Jan. 8, 2018, 7:51 p.m. UTC | #2
On Mon, Jan 08, 2018 at 04:20:58PM +0800, Qu Wenruo wrote:
> 
> 
> On 2018年01月08日 16:04, Anand Jain wrote:
> > btrfs-progs uses super flag bit BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34).
> > So just define that in kernel so that we know its been used. This patch
> > does not add it to BTRFS_SUPER_FLAG_SUPP yet.
> > 
> > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> > ---
> >  include/uapi/linux/btrfs_tree.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
> > index 6d6e5da51527..38ab0e06259a 100644
> > --- a/include/uapi/linux/btrfs_tree.h
> > +++ b/include/uapi/linux/btrfs_tree.h
> > @@ -456,6 +456,7 @@ struct btrfs_free_space_header {
> >  
> >  #define BTRFS_SUPER_FLAG_SEEDING	(1ULL << 32)
> >  #define BTRFS_SUPER_FLAG_METADUMP	(1ULL << 33)
> > +#define BTRFS_SUPER_FLAG_METADUMP_V2	(1ULL << 34)
> 
> Please also include this to BTRFS_SUPER_FLAG_SUPP.
> 
> It's quite common developers (at least myself) may try to mount a
> recovered btrfs image.
> 
> (That's also the reason why the patch should be put before the
> BTRFS_SUPER_FLAG_SUPP check patch)

Agreed.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index 6d6e5da51527..38ab0e06259a 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -456,6 +456,7 @@  struct btrfs_free_space_header {
 
 #define BTRFS_SUPER_FLAG_SEEDING	(1ULL << 32)
 #define BTRFS_SUPER_FLAG_METADUMP	(1ULL << 33)
+#define BTRFS_SUPER_FLAG_METADUMP_V2	(1ULL << 34)
 
 
 /*