Re: [PATCH 04/13] btrfs: convert count_max_extents() to use fs_info->max_extent_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
> +}





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux