Re: [PATCH 14/29] xfs: create a per-mount shrinker for verity inodes merkle tree blocks

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

 



On Fri, Mar 29, 2024 at 05:39:43PM -0700, Darrick J. Wong wrote:
> +/* Count the merkle tree blocks that we might be able to reclaim. */
> +static unsigned long
> +xfs_fsverity_shrinker_count(
> +	struct shrinker		*shrink,
> +	struct shrink_control	*sc)
> +{
> +	struct xfs_mount	*mp = shrink->private_data;
> +	s64			count;
> +
> +	if (!xfs_has_verity(mp))
> +		return SHRINK_EMPTY;
> +
> +	count = percpu_counter_sum_positive(&mp->m_verity_blocks);
> +
> +	trace_xfs_fsverity_shrinker_count(mp, count, _RET_IP_);
> +	return min_t(s64, ULONG_MAX, count);

On 64-bit systems this always returns ULONG_MAX.

- Eric




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux