From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:51094 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752837AbcAKN0I (ORCPT ); Mon, 11 Jan 2016 08:26:08 -0500 Date: Mon, 11 Jan 2016 14:26:17 +0100 From: Jan Kara To: Christoph Hellwig Cc: Eric Sandeen , fsdevel , xfs@oss.sgi.com, Jan Kara Subject: Re: [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2 Message-ID: <20160111132617.GD6262@quack.suse.cz> References: <568FEA2C.6080708@redhat.com> <20160109072600.GA21636@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160109072600.GA21636@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri 08-01-16 23:26:00, Christoph Hellwig wrote: > On Fri, Jan 08, 2016 at 10:56:12AM -0600, Eric Sandeen wrote: > > This adds a new quotactl, Q_XGETQUOTA2. > > > > Q_XGETQUOTA2 is exactly like Q_XGETQUOTA, except that it will > > return quota information for the id equal to or greater than > > the id requested. In other words, if the specified id has > > no quota, the command will return quota information for the > > next higher id which does have a quota set. If no higher id > > has an active quota, -ESRCH is returned. > > Please add a flags argument to Q_XGETQUOTA2, and then make the > new behavior the first flag. Keep Q_XGETQUOTA behavior for the > flag-less case. That way we get future etensibility for free. So this is what I wanted to suggest at first as well. What I somewhat dislike is that 'addr' must now point to something like: struct getquota_args { __u64 flags; struct fs_disk_quota ret; }; which is not as nice as passing pointer to fs_disk_quota directly. But probably still OK. So I agree with the flags idea. Another issue is that OCFS2 and ext4 with quota in hidden inodes would need call with these capabilities as well (they have the same problem as xfs). For reporting VFS quota we use bytes for space (since some filesystems need it) and we don't need RT fields (easy so zero-fill) and warning fields (there zeros may be confusing). So we would need something like struct qc_dqblk (currently only internal) extended with ID and maybe flags field XFS is using to return quota type which can contain all the information and tell which info is actually valid as return structure. Honza -- Jan Kara SUSE Labs, CR