[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAGr1F2GVuVMcf1Sv4AwBrB5MgXLp8vQmBKXQ=KZyk_GCJcMjdA@mail.gmail.com>
Date: Thu, 21 Jul 2011 10:24:12 -0700
From: Aditya Kali <adityakali@...gle.com>
To: Andreas Dilger <adilger@...ger.ca>
Cc: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
Johann Lombardi <johann@...mcloud.com>
Subject: Re: [PATCH] ext4: make quota as first class supported feature
On Thu, Jul 21, 2011 at 12:02 AM, Andreas Dilger <adilger@...ger.ca> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists