Re: [RFC v2 11/14] xfs: expose block size in stat

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

 



> > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> > index a0d77f5f512e..8791a9d80897 100644
> > --- a/fs/xfs/xfs_iops.c
> > +++ b/fs/xfs/xfs_iops.c
> > @@ -515,6 +515,8 @@ xfs_stat_blksize(
> >  	struct xfs_inode	*ip)
> >  {
> >  	struct xfs_mount	*mp = ip->i_mount;
> > +	unsigned long	default_size = max_t(unsigned long, PAGE_SIZE,
> > +					     mp->m_sb.sb_blocksize);
> 
> Nit: wonky indentation, but...
> 
> >  
> >  	/*
> >  	 * If the file blocks are being allocated from a realtime volume, then
> > @@ -543,7 +545,7 @@ xfs_stat_blksize(
> >  			return 1U << mp->m_allocsize_log;
> >  	}
> >  
> > -	return PAGE_SIZE;
> > +	return default_size;
> 
> ...why not return max_t(...) directly here?

Sounds good. I will add this change.
> 
> --D
> 
> >  }
> >  
> >  STATIC int
> > -- 
> > 2.43.0
> > 
> > 




[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