mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong1@huawei.com>
To: Chao Yu <chao@kernel.org>, <jaegeuk@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: fix to restrict mount condition when without CONFIG_QUOTA
Date: Thu, 26 Jul 2018 09:41:55 +0800	[thread overview]
Message-ID: <4b46f8b3-2858-a528-de53-c2de333c3314@huawei.com> (raw)
In-Reply-To: <20180725231948.18075-1-chao@kernel.org>

Hi, Chao

On 2018/7/26 7:19, Chao Yu wrote:
> From: Chao Yu <yuchao0@huawei.com>
> 
> Like quota_ino feature, we need to reject mounting RDWR with image
> which enables project_quota feature when there is no CONFIG_QUOTA
> be set in kernel.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>   fs/f2fs/super.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index dbc1cb53581f..bc7c14a055bb 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -775,6 +775,12 @@ static int parse_options(struct super_block *sb, char *options)
>   			 "without CONFIG_QUOTA");
>   		return -EINVAL;
>   	}

I think the following should be checked within !CONFIG_QUOTA, like patch "f2fs: quota: do
not mount as RDWR without QUOTA if quota feature enabled" :)

thanks

> +	if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
> +		f2fs_msg(sb, KERN_ERR,
> +			"Filesystem with project quota feature cannot be "
> +			"mounted RDWR without CONFIG_QUOTA");
> +		return -EINVAL;
> +	}
>   #endif
>   
>   	if (F2FS_IO_SIZE_BITS(sbi) && !test_opt(sbi, LFS)) {
> 


  reply	other threads:[~2018-07-26  1:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 23:19 Chao Yu
2018-07-26  1:41 ` Sheng Yong [this message]
2018-07-26  1:53   ` [f2fs-dev] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b46f8b3-2858-a528-de53-c2de333c3314@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®