Re: [PATCH v2] xfs: Check for deallayed allocations before setting extsize

From: Ojaswin Mujoo
Date: Thu Oct 10 2024 - 04:59:27 EST


On Thu, Oct 10, 2024 at 08:50:21AM +0200, Christoph Hellwig wrote:
> s/deallayed/delayed/

Hi Christoph, sorry I missed this, will fix it.
>
> >
> > +static inline bool xfs_inode_has_data(struct xfs_inode *ip)
> > +{
> > + return (ip->i_df.if_nextents > 0 || ip->i_delayed_blks > 0);
>
> Nit: no need for the braces.
>
> > + if (S_ISREG(VFS_I(ip)->i_mode) &&
> > + xfs_inode_has_data(ip) &&
>
> This can now be condensed to:
>
> if (S_ISREG(VFS_I(ip)->i_mode) && xfs_inode_has_data(ip) &&
>
> Otherwise this still looks good to me.
>

Got it, I'll make the changes and send v3 by end of day.

Regards,
ojaswin