Re: [PATCH 17/43] xfs: don't allow growfs of the data device with internal RT device

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

 



On Wed, Dec 11, 2024 at 09:54:42AM +0100, Christoph Hellwig wrote:
> Because the RT blocks follow right after.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Aha, I was wondering about that.  Does this belong in the previous
patch?

Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_fsops.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> index bb2e31e338b8..3c04fee284e2 100644
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -307,6 +307,10 @@ xfs_growfs_data(
>  	if (!mutex_trylock(&mp->m_growlock))
>  		return -EWOULDBLOCK;
>  
> +	/* we can't grow the data section when an internal RT section exists */
> +	if (in->newblocks != mp->m_sb.sb_dblocks && mp->m_sb.sb_rtstart)
> +		return -EINVAL;
> +
>  	/* update imaxpct separately to the physical grow of the filesystem */
>  	if (in->imaxpct != mp->m_sb.sb_imax_pct) {
>  		error = xfs_growfs_imaxpct(mp, in->imaxpct);
> -- 
> 2.45.2
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux