* [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA
@ 2018-07-24 16:55 Chao Yu
2018-07-27 10:08 ` Jaegeuk Kim
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2018-07-24 16:55 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
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..bb40f08d2861 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;
}
+ if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
+ ext4_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)) {
--
2.16.2.17.g38e79b1fd
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA
2018-07-24 16:55 [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA Chao Yu
@ 2018-07-27 10:08 ` Jaegeuk Kim
2018-07-27 10:12 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2018-07-27 10:08 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
On 07/25, 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..bb40f08d2861 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;
> }
> + if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
> + ext4_msg(sb, KERN_ERR,
What is this?
> + "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)) {
> --
> 2.16.2.17.g38e79b1fd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA
2018-07-27 10:08 ` Jaegeuk Kim
@ 2018-07-27 10:12 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-07-27 10:12 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-kernel
On 2018/7/27 18:08, Jaegeuk Kim wrote:
> On 07/25, 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..bb40f08d2861 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;
>> }
>> + if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
>> + ext4_msg(sb, KERN_ERR,
>
> What is this?
Sorry, I just porting ext4's code here, but forget to change the function,
strangely, it pass my module compiling... :(, I have resend one patch.
Thanks,
>
>> + "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)) {
>> --
>> 2.16.2.17.g38e79b1fd
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA
@ 2018-07-27 10:12 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-07-27 10:12 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-kernel
On 2018/7/27 18:08, Jaegeuk Kim wrote:
> On 07/25, 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..bb40f08d2861 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;
>> }
>> + if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
>> + ext4_msg(sb, KERN_ERR,
>
> What is this?
Sorry, I just porting ext4's code here, but forget to change the function,
strangely, it pass my module compiling... :(, I have resend one patch.
Thanks,
>
>> + "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)) {
>> --
>> 2.16.2.17.g38e79b1fd
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-27 10:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 16:55 [PATCH] f2fs: fix to restrict mount condition when without CONFIG_QUOTA Chao Yu
2018-07-27 10:08 ` Jaegeuk Kim
2018-07-27 10:12 ` Chao Yu
2018-07-27 10:12 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.