mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Sheng Yong <shengyong1@huawei.com>, 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:53:26 +0800	[thread overview]
Message-ID: <0b69dfb2-098d-c986-9cdf-f6eac08cba76@huawei.com> (raw)
In-Reply-To: <4b46f8b3-2858-a528-de53-c2de333c3314@huawei.com>

On 2018/7/26 9:41, Sheng Yong wrote:
> 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" :)

I wrote this patch based on yours, so I think the code actually locates in the
right place. Please check serials on below link:

https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=f2fs-dev

> 
> 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:53 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 ` [f2fs-dev] " Sheng Yong
2018-07-26  1:53   ` Chao Yu [this message]

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=0b69dfb2-098d-c986-9cdf-f6eac08cba76@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shengyong1@huawei.com \
    /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®