]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/btrfs/space-info.h
Merge branch 'for-6.0/dax' into libnvdimm-fixes
[people/ms/linux.git] / fs / btrfs / space-info.h
index c096695598c1290a228e38c8845d21ec6cad05e3..12fd6147f92d60461bc42418d5fb883f7ab6d221 100644 (file)
@@ -19,12 +19,16 @@ struct btrfs_space_info {
        u64 bytes_may_use;      /* number of bytes that may be used for
                                   delalloc/allocations */
        u64 bytes_readonly;     /* total bytes that are read only */
+       /* Total bytes in the space, but only accounts active block groups. */
+       u64 active_total_bytes;
        u64 bytes_zone_unusable;        /* total bytes that are unusable until
                                           resetting the device zone */
 
        u64 max_extent_size;    /* This will hold the maximum extent size of
                                   the space info if we had an ENOSPC in the
                                   allocator. */
+       /* Chunk size in bytes */
+       u64 chunk_size;
 
        /*
         * Once a block group drops below this threshold (percents) we'll
@@ -122,7 +126,9 @@ int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
 void btrfs_update_space_info(struct btrfs_fs_info *info, u64 flags,
                             u64 total_bytes, u64 bytes_used,
                             u64 bytes_readonly, u64 bytes_zone_unusable,
-                            struct btrfs_space_info **space_info);
+                            bool active, struct btrfs_space_info **space_info);
+void btrfs_update_space_info_chunk_size(struct btrfs_space_info *space_info,
+                                       u64 chunk_size);
 struct btrfs_space_info *btrfs_find_space_info(struct btrfs_fs_info *info,
                                               u64 flags);
 u64 __pure btrfs_space_info_used(struct btrfs_space_info *s_info,