Re: [PATCH 3/4] Adds project quota support for ext4

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

 



On Thu, Sep 25, 2014 at 1:31 AM, Jan Kara <jack@xxxxxxx> 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux