[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPTn0cB8X3DYprX-oKCu8aV5OLLfJJ2rh9YvMY7re69gi1s-LA@mail.gmail.com>
Date: Thu, 25 Sep 2014 09:28:24 +0800
From: Li Xi <pkuelelixi@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>,
Andreas Dilger <adilger@...ger.ca>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"hch@...radead.org" <hch@...radead.org>,
Dmitry Monakhov <dmonakhov@...nvz.org>
Subject: Re: [PATCH 3/4] Adds project quota support for ext4
On Thu, Sep 25, 2014 at 1:31 AM, Jan Kara <jack@...e.cz> wrote:
> On Wed 24-09-14 22:04:29, Li Xi wrote:
>> This patch adds mount options for enabling/disabling project quota
>> accounting and enforcement. A new specific inode is also used for
>> project quota accounting.
> The patch looks mostly fine. A few smaller things below.
>
> ...
>> @@ -1433,6 +1437,8 @@ static const struct mount_opts {
>> MOPT_SET | MOPT_Q},
>> {Opt_grpquota, EXT4_MOUNT_QUOTA | EXT4_MOUNT_GRPQUOTA,
>> MOPT_SET | MOPT_Q},
>> + {Opt_prjquota, EXT4_MOUNT_QUOTA | EXT4_MOUNT_PRJQUOTA,
>> + MOPT_SET | MOPT_Q},
>> {Opt_noquota, (EXT4_MOUNT_QUOTA | EXT4_MOUNT_USRQUOTA |
>> EXT4_MOUNT_GRPQUOTA), MOPT_CLEAR | MOPT_Q},
> I think you missed to add EXT4_MOUNT_PRJQUOTA to Opt_noquota...
>
> ...
>> @@ -2833,6 +2855,13 @@ static int ext4_feature_set_ok(struct super_block *sb, int readonly)
>> "without CONFIG_QUOTA");
>> return 0;
>> }
>> + if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_PROJECT) &&
>> + !readonly) {
>> + ext4_msg(sb, KERN_ERR,
>> + "Filesystem with project quota feature cannot be"
>> + "mounted RDWR without CONFIG_QUOTA");
>> + return 0;
>> + }
> Hum, I don't think this is right. EXT4_FEATURE_RO_COMPAT_PROJECT is about
> maintaining project IDs not about quota. So it seems perfectly OK to have
> EXT4_FEATURE_RO_COMPAT_PROJECT without CONFIG_QUOTA.
Ah, I see. This might be my main misunderstanding. I thought it is
about maintaining
both project IDs and quota. And I misunderstood so that I removed all
EXT4_FEATURE_RO_COMPAT_PROJECT checking when set/get project ID.
If we only use EXT4_FEATURE_RO_COMPAT_PROJECT to protect imcompatibility
of project ID, what about the change of struct ext4_super_block? I am
still confused.
Please advise.
Regards,
Li Xi
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists