Re: [PATCH v11 02/16] xfs: only call xfs_setsize_buftarg once per buffer target

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

 



On Sun, May 04, 2025 at 08:59:09AM +0000, John Garry wrote:
> +static inline int xfs_buftarg_sync(struct xfs_buftarg *btp)
> +{
> +	return sync_blockdev(btp->bt_bdev);
> +}

What is the point in having this wrapper?

> +/*
> + * Flush and invalidate all devices' pagecaches before reading any metadata
> + * because XFS doesn't use the bdev pagecache.
> + */
> +STATIC int
> +xfs_preflush_devices(
> +	struct xfs_mount	*mp)
> +{
> +	int			error;
> +
> +	error = xfs_buftarg_sync(mp->m_ddev_targp);
> +	if (error)
> +		return error;
> +
> +	if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) {
> +		error = xfs_buftarg_sync(mp->m_ddev_targp);
> +		if (error)
> +			return error;
> +	}

Why does this duplicate all the logic instead of being folded into
xfs_open_devices?





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux