linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super()
@ 2024-04-16  7:21 Chao Yu
  2024-04-16  7:21 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs() Chao Yu
  2024-04-23 17:40 ` [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() patchwork-bot+f2fs
  0 siblings, 2 replies; 6+ messages in thread
From: Chao Yu @ 2024-04-16  7:21 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

Commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size") missed to
adjust comment in sanity_check_raw_super(), fix it.

Signed-off-by: Chao Yu <chao@kernel.org>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 0a34c8746782..6d1e4fc629e2 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3456,7 +3456,7 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
 		}
 	}
 
-	/* Currently, support only 4KB block size */
+	/* only support block_size equals to PAGE_SIZE */
 	if (le32_to_cpu(raw_super->log_blocksize) != F2FS_BLKSIZE_BITS) {
 		f2fs_info(sbi, "Invalid log_blocksize (%u), supports only %u",
 			  le32_to_cpu(raw_super->log_blocksize),
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs()
  2024-04-16  7:21 [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() Chao Yu
@ 2024-04-16  7:21 ` Chao Yu
  2024-04-16 11:12   ` Zhiguo Niu
  2024-04-23 17:40 ` [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() patchwork-bot+f2fs
  1 sibling, 1 reply; 6+ messages in thread
From: Chao Yu @ 2024-04-16  7:21 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition.

Signed-off-by: Chao Yu <chao@kernel.org>
---
 fs/f2fs/super.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 6d1e4fc629e2..32aa6d6fa871 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4933,12 +4933,6 @@ static int __init init_f2fs_fs(void)
 {
 	int err;
 
-	if (PAGE_SIZE != F2FS_BLKSIZE) {
-		printk("F2FS not supported on PAGE_SIZE(%lu) != BLOCK_SIZE(%lu)\n",
-				PAGE_SIZE, F2FS_BLKSIZE);
-		return -EINVAL;
-	}
-
 	err = init_inodecache();
 	if (err)
 		goto fail;
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs()
  2024-04-16  7:21 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs() Chao Yu
@ 2024-04-16 11:12   ` Zhiguo Niu
  2024-04-26  9:37     ` Chao Yu
  0 siblings, 1 reply; 6+ messages in thread
From: Zhiguo Niu @ 2024-04-16 11:12 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On Tue, Apr 16, 2024 at 3:22 PM Chao Yu <chao@kernel.org> wrote:
>
> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
> F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition.
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
>  fs/f2fs/super.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 6d1e4fc629e2..32aa6d6fa871 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -4933,12 +4933,6 @@ static int __init init_f2fs_fs(void)
>  {
>         int err;
>
> -       if (PAGE_SIZE != F2FS_BLKSIZE) {
> -               printk("F2FS not supported on PAGE_SIZE(%lu) != BLOCK_SIZE(%lu)\n",
> -                               PAGE_SIZE, F2FS_BLKSIZE);
> -               return -EINVAL;
> -       }
> -
>         err = init_inodecache();
>         if (err)
>                 goto fail;
Dear Chao,

Can you help modify the following  comment msg together with this patch?
They are also related to commit d7e9a9037de2 ("f2fs: Support Block
Size == Page Size").
If you think there is a more suitable description, please help modify
it directly.
thanks!

diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index a357287..241e7b18 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -394,7 +394,8 @@ struct f2fs_nat_block {

 /*
  * F2FS uses 4 bytes to represent block address. As a result, supported size of
- * disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
+ * disk is 16 TB for a 4K page size and 64 TB for a 16K page size and it equals
+ * to 16 * 1024 * 1024 / 2 segments.
  */
 #define F2FS_MAX_SEGMENT       ((16 * 1024 * 1024) / 2)

@@ -424,8 +425,10 @@ struct f2fs_sit_block {
 /*
  * For segment summary
  *
- * One summary block contains exactly 512 summary entries, which represents
- * exactly one segment by default. Not allow to change the basic units.
+ * One summary block with 4KB size contains exactly 512 summary entries, which
+ * represents exactly one segment with 2MB size.
+ * Similarly, in the case of 16k block size, it represents one
segment with 8MB size.
+ * Not allow to change the basic units.
  *
  * NOTE: For initializing fields, you must use set_summary
  *
@@ -556,6 +559,7 @@ struct f2fs_summary_block {

 /*
  * space utilization of regular dentry and inline dentry (w/o extra
reservation)
+ * when block size is 4KB.



> --
> 2.40.1
>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super()
  2024-04-16  7:21 [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() Chao Yu
  2024-04-16  7:21 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs() Chao Yu
@ 2024-04-23 17:40 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+f2fs @ 2024-04-23 17:40 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Tue, 16 Apr 2024 15:21:07 +0800 you wrote:
> Commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size") missed to
> adjust comment in sanity_check_raw_super(), fix it.
> 
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
>  fs/f2fs/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [f2fs-dev,1/2] f2fs: fix comment in sanity_check_raw_super()
    https://git.kernel.org/jaegeuk/f2fs/c/5bf624c01229
  - [f2fs-dev,2/2] f2fs: remove unnecessary block size check in init_f2fs_fs()
    https://git.kernel.org/jaegeuk/f2fs/c/06b206d9e2b4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs()
  2024-04-16 11:12   ` Zhiguo Niu
@ 2024-04-26  9:37     ` Chao Yu
  2024-04-26 11:25       ` Zhiguo Niu
  0 siblings, 1 reply; 6+ messages in thread
From: Chao Yu @ 2024-04-26  9:37 UTC (permalink / raw)
  To: Zhiguo Niu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On 2024/4/16 19:12, Zhiguo Niu wrote:
> On Tue, Apr 16, 2024 at 3:22 PM Chao Yu <chao@kernel.org> wrote:
>>
>> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
>> F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition.
>>
>> Signed-off-by: Chao Yu <chao@kernel.org>
>> ---
>>   fs/f2fs/super.c | 6 ------
>>   1 file changed, 6 deletions(-)
>>
>> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
>> index 6d1e4fc629e2..32aa6d6fa871 100644
>> --- a/fs/f2fs/super.c
>> +++ b/fs/f2fs/super.c
>> @@ -4933,12 +4933,6 @@ static int __init init_f2fs_fs(void)
>>   {
>>          int err;
>>
>> -       if (PAGE_SIZE != F2FS_BLKSIZE) {
>> -               printk("F2FS not supported on PAGE_SIZE(%lu) != BLOCK_SIZE(%lu)\n",
>> -                               PAGE_SIZE, F2FS_BLKSIZE);
>> -               return -EINVAL;
>> -       }
>> -
>>          err = init_inodecache();
>>          if (err)
>>                  goto fail;
> Dear Chao,
> 
> Can you help modify the following  comment msg together with this patch?
> They are also related to commit d7e9a9037de2 ("f2fs: Support Block
> Size == Page Size").
> If you think there is a more suitable description, please help modify
> it directly.

Zhiguo,

I missed to reply this, I guess you can update
"f2fs: fix some ambiguous comments".

> thanks!
> 
> diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
> index a357287..241e7b18 100644
> --- a/include/linux/f2fs_fs.h
> +++ b/include/linux/f2fs_fs.h
> @@ -394,7 +394,8 @@ struct f2fs_nat_block {
> 
>   /*
>    * F2FS uses 4 bytes to represent block address. As a result, supported size of
> - * disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
> + * disk is 16 TB for a 4K page size and 64 TB for a 16K page size and it equals

disk is 16 TB for 4K size block and 64 TB for 16K size block and it equals
to (1 << 32) / 512 segments.

#define F2FS_MAX_SEGMENT       		((1 << 32) / 512)

Thanks,

> + * to 16 * 1024 * 1024 / 2 segments.
>    */
>   #define F2FS_MAX_SEGMENT       ((16 * 1024 * 1024) / 2)
> 
> @@ -424,8 +425,10 @@ struct f2fs_sit_block {
>   /*
>    * For segment summary
>    *
> - * One summary block contains exactly 512 summary entries, which represents
> - * exactly one segment by default. Not allow to change the basic units.
> + * One summary block with 4KB size contains exactly 512 summary entries, which
> + * represents exactly one segment with 2MB size.
> + * Similarly, in the case of 16k block size, it represents one
> segment with 8MB size.
> + * Not allow to change the basic units.
>    *
>    * NOTE: For initializing fields, you must use set_summary
>    *
> @@ -556,6 +559,7 @@ struct f2fs_summary_block {
> 
>   /*
>    * space utilization of regular dentry and inline dentry (w/o extra
> reservation)
> + * when block size is 4KB.
> 
> 
> 
>> --
>> 2.40.1
>>
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs()
  2024-04-26  9:37     ` Chao Yu
@ 2024-04-26 11:25       ` Zhiguo Niu
  0 siblings, 0 replies; 6+ messages in thread
From: Zhiguo Niu @ 2024-04-26 11:25 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Fixed!

On Fri, Apr 26, 2024 at 5:37 PM Chao Yu <chao@kernel.org> wrote:
>
> On 2024/4/16 19:12, Zhiguo Niu wrote:
> > On Tue, Apr 16, 2024 at 3:22 PM Chao Yu <chao@kernel.org> wrote:
> >>
> >> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
> >> F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition.
> >>
> >> Signed-off-by: Chao Yu <chao@kernel.org>
> >> ---
> >>   fs/f2fs/super.c | 6 ------
> >>   1 file changed, 6 deletions(-)
> >>
> >> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> >> index 6d1e4fc629e2..32aa6d6fa871 100644
> >> --- a/fs/f2fs/super.c
> >> +++ b/fs/f2fs/super.c
> >> @@ -4933,12 +4933,6 @@ static int __init init_f2fs_fs(void)
> >>   {
> >>          int err;
> >>
> >> -       if (PAGE_SIZE != F2FS_BLKSIZE) {
> >> -               printk("F2FS not supported on PAGE_SIZE(%lu) != BLOCK_SIZE(%lu)\n",
> >> -                               PAGE_SIZE, F2FS_BLKSIZE);
> >> -               return -EINVAL;
> >> -       }
> >> -
> >>          err = init_inodecache();
> >>          if (err)
> >>                  goto fail;
> > Dear Chao,
> >
> > Can you help modify the following  comment msg together with this patch?
> > They are also related to commit d7e9a9037de2 ("f2fs: Support Block
> > Size == Page Size").
> > If you think there is a more suitable description, please help modify
> > it directly.
>
> Zhiguo,
>
> I missed to reply this, I guess you can update
> "f2fs: fix some ambiguous comments".
Dear Chao,
OK, I got it.
thanks!
>
> > thanks!
> >
> > diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
> > index a357287..241e7b18 100644
> > --- a/include/linux/f2fs_fs.h
> > +++ b/include/linux/f2fs_fs.h
> > @@ -394,7 +394,8 @@ struct f2fs_nat_block {
> >
> >   /*
> >    * F2FS uses 4 bytes to represent block address. As a result, supported size of
> > - * disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
> > + * disk is 16 TB for a 4K page size and 64 TB for a 16K page size and it equals
>
> disk is 16 TB for 4K size block and 64 TB for 16K size block and it equals
> to (1 << 32) / 512 segments.
>
> #define F2FS_MAX_SEGMENT                ((1 << 32) / 512)
>
> Thanks,
>
> > + * to 16 * 1024 * 1024 / 2 segments.
> >    */
> >   #define F2FS_MAX_SEGMENT       ((16 * 1024 * 1024) / 2)
> >
> > @@ -424,8 +425,10 @@ struct f2fs_sit_block {
> >   /*
> >    * For segment summary
> >    *
> > - * One summary block contains exactly 512 summary entries, which represents
> > - * exactly one segment by default. Not allow to change the basic units.
> > + * One summary block with 4KB size contains exactly 512 summary entries, which
> > + * represents exactly one segment with 2MB size.
> > + * Similarly, in the case of 16k block size, it represents one
> > segment with 8MB size.
> > + * Not allow to change the basic units.
> >    *
> >    * NOTE: For initializing fields, you must use set_summary
> >    *
> > @@ -556,6 +559,7 @@ struct f2fs_summary_block {
> >
> >   /*
> >    * space utilization of regular dentry and inline dentry (w/o extra
> > reservation)
> > + * when block size is 4KB.
> >
> >
> >
> >> --
> >> 2.40.1
> >>
> >>
> >>
> >> _______________________________________________
> >> Linux-f2fs-devel mailing list
> >> Linux-f2fs-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-26 11:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16  7:21 [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() Chao Yu
2024-04-16  7:21 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs() Chao Yu
2024-04-16 11:12   ` Zhiguo Niu
2024-04-26  9:37     ` Chao Yu
2024-04-26 11:25       ` Zhiguo Niu
2024-04-23 17:40 ` [f2fs-dev] [PATCH 1/2] f2fs: fix comment in sanity_check_raw_super() patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).