diff mbox

btrfs: add missing BTRFS_SUPER_FLAG define

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

Commit Message

Anand Jain Jan. 5, 2018, 9:24 a.m. UTC
btrfs-progs uses additional two super flag bits. So just define
that so that we know its been used.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
The btrfs-progs commits (very old) introduced them,

 commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
    btrfs-progs: Add CHANGING_FSID super flag

 commit 797a937e5dd8db0092add633a80f3cd698e182df
    Btrfs-progs: Introduce metadump_v2

Appears that we need bit of support from the kernel side like
failing to mount if CHANGING_FSID is set. And device mounted
with metadump_v2 flag is kind of broken on the kernel side
as of now, this patch does not fix those.

 include/uapi/linux/btrfs_tree.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Sterba Jan. 5, 2018, 2:26 p.m. UTC | #1
On Fri, Jan 05, 2018 at 05:24:22PM +0800, Anand Jain wrote:
> btrfs-progs uses additional two super flag bits. So just define
> that so that we know its been used.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> The btrfs-progs commits (very old) introduced them,
> 
>  commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
>     btrfs-progs: Add CHANGING_FSID super flag
> 
>  commit 797a937e5dd8db0092add633a80f3cd698e182df
>     Btrfs-progs: Introduce metadump_v2
> 
> Appears that we need bit of support from the kernel side like
> failing to mount if CHANGING_FSID is set. And device mounted
> with metadump_v2 flag is kind of broken on the kernel side
> as of now, this patch does not fix those.

Please add the code that uses the flags, at least the for the pending
uuid change.
--
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
Anand Jain Jan. 8, 2018, 3:17 a.m. UTC | #2
On 01/05/2018 10:26 PM, David Sterba wrote:
> On Fri, Jan 05, 2018 at 05:24:22PM +0800, Anand Jain wrote:
>> btrfs-progs uses additional two super flag bits. So just define
>> that so that we know its been used.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>> The btrfs-progs commits (very old) introduced them,
>>
>>   commit 7cc792872a133cabc3467e6ccaf5a2c8ea9e5218
>>      btrfs-progs: Add CHANGING_FSID super flag
>>
>>   commit 797a937e5dd8db0092add633a80f3cd698e182df
>>      Btrfs-progs: Introduce metadump_v2
>>
>> Appears that we need bit of support from the kernel side like
>> failing to mount if CHANGING_FSID is set. And device mounted
>> with metadump_v2 flag is kind of broken on the kernel side
>> as of now, this patch does not fix those.
> 
> Please add the code that uses the flags, at least the for the pending
> uuid change.

  OK. I have sent them as a set.
   [PATCH 1/2] btrfs: add missing BTRFS_SUPER_FLAG define
   [PATCH 2/2] btrfs: add support for SUPER_FLAG_CHANGING_FSID in btrfs.ko


Thanks, Anand
--
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..aff1356c2bb8 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -456,6 +456,8 @@  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)
+#define BTRFS_SUPER_FLAG_CHANGING_FSID	(1ULL << 35)
 
 
 /*