Re: generic quota vs xfs quota

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

 



On Fri 27-04-18 11:20:38, Liu Bo wrote:
> On Fri, Apr 27, 2018 at 1:22 AM, Theodore Y. Ts'o <tytso@xxxxxxx> wrote:
> > On Thu, Apr 26, 2018 at 04:16:08PM +0800, Liu Bo wrote:
> >>
> >> and ext4 ->statfs() only displays dqb_curspace while xfs ->statfs()
> >> displays both,
> >
> > I'm not sure what you are asking.  statfs(2) has nothing to do with
> > quota support.
> >
> > As far as reserved delayed allocation blocks is concerned, ext4
> > deducts the space from the available space in the file system and from
> > the user's quota when the user writes to a file and when the space is
> > reserved for delayed allocation.  My understanding is that xfs does
> > the same thing.
> >
> > Also, the linux native quota predates XFS's quota system (which came
> > from Irix), so there are some subtle differences between them,
> > although we do try keep things as consistent as possible.  For
> > example, only recently we added support for project quota to ext4,
> > which is something that used to be XFS only.  However, there is a lot
> > of complexity in terms of the low-level system interfaces for quota.
> > Most of this is hidden in the quota-tools userspace package.
> >
> > Does this help?
> >
> 
> Thanks a lot for the reply.
> 
> Yes, it's about pjquota, I should have mentioned in the question.
> 
> Regarding pjquota, what confuses me is that ext4_statfs() somehow
> ignores dq_dqb.dqb_rsvspace
> 
> ext4_statfs()
> #ifdef CONFIG_QUOTA
>     ext4_statfs_project()
>         ...
>         if (limit && buf->f_blocks > limit) {
>               curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits;
>               buf->f_blocks = limit;
>               buf->f_bfree = buf->f_bavail =
>                          (buf->f_blocks > curblock) ?
>                          (buf->f_blocks - curblock) : 0;
>        }
>        ...
> #endif

Yes, that's a bug. Thanks for reporting it. Actually Konstantin Khlebnikov
noticed as well and a patch for this is queued in Ted's tree.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[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