linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: wipe other FS magics given -f
Date: Wed, 22 Sep 2021 23:25:52 +0800	[thread overview]
Message-ID: <e66e2d57-957b-d3ca-6038-39ebd7395660@kernel.org> (raw)
In-Reply-To: <YUkYpkKOvtBCgOCs@google.com>

On 2021/9/21 7:26, Jaegeuk Kim wrote:
> This patch fixes the below stale magic info.
> 
> $ mkfs.btrfs -f test.img
> btrfs-progs v5.10.1
> See http://btrfs.wiki.kernel.org for more information.
> 
> Label:              (null)
> UUID:               941d2db7-3ece-4090-8b22-c4ea548b5dae
> Node size:          16384
> Sector size:        4096
> Filesystem size:    1.00GiB
> Block group profiles:
>    Data:             single            8.00MiB
>    Metadata:         DUP              51.19MiB
>    System:           DUP               8.00MiB
> SSD detected:       no
> Incompat features:  extref, skinny-metadata
> Runtime features:
> Checksum:           crc32c
> Number of devices:  1
> Devices:
>     ID        SIZE  PATH
>      1     1.00GiB  test.img
> 
> $ hexdump -s 0x10000 -n 128 -C test.img
> 00010000  81 29 94 0a 00 00 00 00  00 00 00 00 00 00 00 00  |.)..............|
> 00010010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00010020  94 1d 2d b7 3e ce 40 90  8b 22 c4 ea 54 8b 5d ae  |..-.>.@.."..T.].|
> 00010030  00 00 01 00 00 00 00 00  01 00 00 00 00 00 00 00  |................|
> 00010040  5f 42 48 52 66 53 5f 4d  05 00 00 00 00 00 00 00  |_BHRfS_M........|
> 00010050  00 40 d2 01 00 00 00 00  00 40 50 01 00 00 00 00  |.@.......@P.....|
> 00010060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00010070  00 00 00 40 00 00 00 00  00 00 02 00 00 00 00 00  |...@............|
> 00010080
> 
> $ mkfs.f2fs -t 0 -f test.img
> 
> 	F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2020-12-28)
> 
> Info: Disable heap-based policy
> Info: Debug level = 0
> Info: Trim is disabled
> Info: Segments per section = 1
> Info: Sections per zone = 1
> Info: sector size = 512
> Info: total sectors = 2097152 (1024 MB)
> Info: zone aligned segment0 blkaddr: 512
> Info: format version with
>    "Linux version 5.10.46-4rodete1-amd64 (glinux-team@google.com) (gcc-10 (Debian 10.2.1-6+build2) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.46-4rodete1 (2021-08-20)"
> Info: Overprovision ratio = 6.360%
> Info: Overprovision segments = 68 (GC reserved = 39)
> Info: format successful
> 
> $hexdump -s 0x10000 -n 128 -C test.img
> 00010000  c2 8a c8 26 00 00 00 00  00 00 00 00 00 00 00 00  |...&............|
> 00010010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00010020  92 ab 3f c6 b7 82 49 5e  93 23 e8 c9 e9 45 7d ac  |..?...I^.#...E}.|
> 00010030  00 00 01 00 00 00 00 00  01 00 00 00 00 00 00 00  |................|
> 00010040  5f 42 48 52 66 53 5f 4d  05 00 00 00 00 00 00 00  |_BHRfS_M........|
> 00010050  00 40 d2 01 00 00 00 00  00 40 50 01 00 00 00 00  |.@.......@P.....|
> 00010060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00010070  00 00 00 40 00 00 00 00  00 00 02 00 00 00 00 00  |...@............|
> 00010080
> 
> --- After this patch ---
> $ mkfs.f2fs -t 0 -f test.img
> 
> 	F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2020-12-28)
> 
> Info: Disable heap-based policy
> Info: Debug level = 0
> Info: Trim is disabled
> 	test.img appears to contain an existing filesystem (btrfs).
> Info: Segments per section = 1
> Info: Sections per zone = 1
> Info: sector size = 512
> Info: total sectors = 2097152 (1024 MB)
> Info: zone aligned segment0 blkaddr: 512
> Info: format version with
>    "Linux version 5.10.46-4rodete1-amd64 (glinux-team@google.com) (gcc-10 (Debian 10.2.1-6+build2) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.46-4rodete1 (2021-08-20)"
> Info: Overprovision ratio = 6.360%
> Info: Overprovision segments = 68 (GC reserved = 39)
> Info: format successful
> 
> $ hexdump -s 0x10000 -n 128 -C test.img
> 00010000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> *
> 00010080
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


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

      reply	other threads:[~2021-09-22 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 22:56 [f2fs-dev] [PATCH] mkfs.f2fs: wipe other FS magics given -f Jaegeuk Kim
2021-09-15  5:45 ` Shinichiro Kawasaki
2021-09-20 23:26   ` Jaegeuk Kim
2021-09-21  1:31     ` Shinichiro Kawasaki
2021-09-16 10:59 ` Chao Yu
2021-09-20 23:26 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2021-09-22 15:25   ` 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=e66e2d57-957b-d3ca-6038-39ebd7395660@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).