libbtrfsutils: add python-devel detection
[platform/upstream/btrfs-progs.git] / convert / common.c
index d87d75e..3860f3b 100644 (file)
@@ -64,7 +64,7 @@ static inline int write_temp_super(int fd, struct btrfs_super_block *sb,
        u32 crc = ~(u32)0;
        int ret;
 
-       crc = btrfs_csum_data(NULL, (char *)sb + BTRFS_CSUM_SIZE, crc,
+       crc = btrfs_csum_data((char *)sb + BTRFS_CSUM_SIZE, crc,
                              BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
        btrfs_csum_final(crc, &sb->csum[0]);
        ret = pwrite(fd, sb, BTRFS_SUPER_INFO_SIZE, sb_bytenr);
@@ -128,7 +128,7 @@ static int setup_temp_super(int fd, struct btrfs_mkfs_config *cfg,
         */
        btrfs_set_super_bytes_used(super, 6 * cfg->nodesize);
        btrfs_set_super_sectorsize(super, cfg->sectorsize);
-       btrfs_set_super_leafsize(super, cfg->nodesize);
+       super->__unused_leafsize = cpu_to_le32(cfg->nodesize);
        btrfs_set_super_nodesize(super, cfg->nodesize);
        btrfs_set_super_stripesize(super, cfg->stripesize);
        btrfs_set_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32);
@@ -167,7 +167,7 @@ static int setup_temp_extent_buffer(struct extent_buffer *buf,
        btrfs_set_header_generation(buf, 1);
        btrfs_set_header_backref_rev(buf, BTRFS_MIXED_BACKREF_REV);
        btrfs_set_header_owner(buf, owner);
-       btrfs_set_header_flags(buf, BTRFS_HEADER_FLAG_WRITTEN);
+       btrfs_set_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN);
        write_extent_buffer(buf, chunk_uuid, btrfs_header_chunk_tree_uuid(buf),
                            BTRFS_UUID_SIZE);
        write_extent_buffer(buf, fsid, btrfs_header_fsid(), BTRFS_FSID_SIZE);