On 09.07.22 01:21, Naohiro Aota wrote: > +/* > + * Count how many fs_info->max_extent_size cover the @size > + */ > +static inline u32 count_max_extents(struct btrfs_fs_info *fs_info, u64 size) > +{ > +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS > + if (!fs_info) > + return div_u64(size + BTRFS_MAX_EXTENT_SIZE - 1, BTRFS_MAX_EXTENT_SIZE); > +#endif if (IS_ENABLED(CONFIG_BTRFS_FS_RUN_SANITY_TESTS) && !fs_info) ? > + > + return div_u64(size + fs_info->max_extent_size - 1, fs_info->max_extent_size); > +}