Re: [PATCH] ext4: make quota as first class supported feature

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

 



On Thu, Jul 21, 2011 at 12:02 AM, Andreas Dilger <adilger@xxxxxxxxx> wrote:
> Why support V1 quota, when it has known limits on some of the usage, instead
> of using V2 quotas that are added to ext3/4 already?  The Kconfig comment
> for V1 begins:
>     This quota format was (is) used by kernels earlier than 2.4.22.
> It would make much more sense to start with V2 for a new feature like this.
>
QFMT_VFS_V1 is actually the format ID of V2 quota format itself. This
is whats in fs/quota/quota_v2.c:

313 static struct quota_format_type v2r1_quota_format = {
314         .qf_fmt_id      = QFMT_VFS_V1,
315         .qf_ops         = &v2_format_ops,
316         .qf_owner       = THIS_MODULE
317 };

So this patch does support the V2 format.


> static const struct quotactl_ops ext4_qctl_operations = {
> -    .quota_on    = ext4_quota_on,
> +    .quota_on_meta    = ext4_quota_on,
>    .quota_off    = ext4_quota_off,
>    .quota_sync    = dquot_quota_sync,
>    .get_info    = dquot_get_dqinfo,

> @@ -4658,24 +4679,22 @@ static int ext4_quota_on_mount(struct super_block
> *sb, int type)
> /*
>  * Standard function to be called on quota_on
>  */
> -static int ext4_quota_on(struct super_block *sb, int type, int format_id,
> -             struct path *path)
> +static int ext4_quota_on(struct super_block *sb, int type, int format_id)
> {
>    int err;
> +    struct inode *qf_inode;
>
> -    if (!test_opt(sb, QUOTA))
> +    if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) ||
> +        !EXT4_SB(sb)->s_qf_inums[type])
>        return -EINVAL;
>
I also wanted to get input on this change to ext4_quota_on. With this
change, its not possible to use quotas at all without the 'quota'
feature flag set, which might break the current userspace. Do we want
to keep supporting current approach (where quotas can be turned on
with user specified files) as well? This change kinda forces users to
update userspace tools (e2fsprogs & quota-tools) as well.

Thanks,
-Aditya
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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