lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180529080422.r3yo6e6vpfxc5huu@quack2.suse.cz>
Date:   Tue, 29 May 2018 10:04:22 +0200
From:   Jan Kara <jack@...e.cz>
To:     Liu Bo <obuil.liubo@...il.com>
Cc:     "Theodore Y. Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: generic quota vs xfs quota

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@....edu> 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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ