Re: [f2fs-dev] About the superblock and checkpoint

2017-03-18 Thread Kinglong Mee
Please ignore the warning messages, maybe there are some wrong steps when 
testing.
So sorry!

On 3/18/2017 14:49, Kinglong Mee wrote:
> When I make a filesystem on a disk partition (eg. /dev/sdd1), 
> but I mount the filesystem from /dev/sdd by mistake,
> f2fs print the following WARNING. I don't think user want them.
> 
> I have no idea to avoid or fix it?
> Should f2fs check both super block? or both checkpoint? 
> 
> Any comments are welcome.
> 
> [12456.030051] F2FS-fs (sdd): Magic Mismatch, valid(0xf2f52010) - read(0x0)
> [12456.031270] F2FS-fs (sdd): Can't find valid F2FS filesystem in 1th 
> superblock
> [12456.046173] F2FS-fs (sdd): Mount Device [ 0]: /dev/sdd, 
> 1023,0 -7
> [12456.047112] F2FS-fs (sdd): Mount Device [ 1]: /dev/sde, 
> 1024,8 -f
> [12456.048012] F2FS-fs (sdd): Mount Device [ 2]: /dev/sdf, 
> 1024,   10 -   17
> [12456.048856] F2FS-fs (sdd): IO Block Size:4 KB
> [12456.084157] F2FS-fs (sdd): Found nat_bits in checkpoint
> [12456.138799] [ cut here ]
> [12456.139303] WARNING: CPU: 0 PID: 8146 at fs/f2fs/node.c:1162 
> __get_node_page.part.34+0x1e9/0x330 [f2fs]
> [12456.140313] Modules linked in: f2fs(E) tun bridge stp llc fuse ip_set 
> nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event 
> snd_ens1371 gameport coretemp ppdev snd_ac97_codec crct10dif_pclmul ac97_bus 
> crc32_pclmul snd_seq ghash_clmulni_intel intel_rapl_perf snd_pcm vmw_balloon 
> joydev snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc 
> parport acpi_cpufreq tpm_tis tpm_tis_core shpchp tpm i2c_piix4 vmw_vmci nfsd 
> auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper 
> ttm drm crc32c_intel serio_raw e1000 mptspi scsi_transport_spi mptscsih 
> mptbase ata_generic fjes pata_acpi
> [12456.144180] CPU: 0 PID: 8146 Comm: mount Tainted: GW   E   
> 4.10.0-f2fs+ #25
> [12456.144733] Hardware name: VMware, Inc. VMware Virtual Platform/440BX 
> Desktop Reference Platform, BIOS 6.00 07/02/2015
> [12456.145835] Call Trace:
> [12456.146391]  dump_stack+0x63/0x86
> [12456.146929]  __warn+0xcb/0xf0
> [12456.147466]  warn_slowpath_null+0x1d/0x20
> [12456.148013]  __get_node_page.part.34+0x1e9/0x330 [f2fs]
> [12456.148573]  get_node_page.part.35+0x12/0x20 [f2fs]
> [12456.149121]  get_node_page+0x1b/0x20 [f2fs]
> [12456.149677]  f2fs_iget+0x8f/0x7f0 [f2fs]
> [12456.150210]  f2fs_fill_super+0xb27/0x17c0 [f2fs]
> [12456.150744]  ? vsnprintf+0x274/0x500
> [12456.151255]  mount_bdev+0x178/0x1b0
> [12456.151770]  ? f2fs_commit_super+0xf0/0xf0 [f2fs]
> [12456.152267]  f2fs_mount+0x15/0x20 [f2fs]
> [12456.152780]  mount_fs+0x38/0x150
> [12456.153257]  ? __alloc_percpu+0x15/0x20
> [12456.153749]  vfs_kern_mount+0x67/0x130
> [12456.154223]  do_mount+0x1dd/0xc50
> [12456.154701]  ? _copy_from_user+0x4e/0x80
> [12456.155167]  ? memdup_user+0x4f/0x70
> [12456.155633]  SyS_mount+0x83/0xd0
> [12456.156139]  entry_SYSCALL_64_fastpath+0x1a/0xa9
> [12456.156617] RIP: 0033:0x7f01d30856fa
> [12456.157088] RSP: 002b:7ffc63bcf718 EFLAGS: 0246 ORIG_RAX: 
> 00a5
> [12456.157576] RAX: ffda RBX: 55e03b143050 RCX: 
> 7f01d30856fa
> [12456.158055] RDX: 55e03b146730 RSI: 55e03b145f40 RDI: 
> 55e03b143230
> [12456.158535] RBP: 55e03b146050 R08:  R09: 
> 0013
> [12456.158993] R10: c0ed8000 R11: 0246 R12: 
> 55e03b145f80
> [12456.159449] R13:  R14: 7f01d3bf4a2e R15: 
> 
> [12456.159910] ---[ end trace cac510ee4c757c87 ]---
> [12456.160699] F2FS-fs (sdd): Failed to read root inode
> [12456.164960] F2FS-fs (sdd): Magic Mismatch, valid(0xf2f52010) - read(0x0)
> [12456.165389] F2FS-fs (sdd): Can't find valid F2FS filesystem in 1th 
> superblock
> [12456.167452] F2FS-fs (sdd): Mount Device [ 0]: /dev/sdd, 
> 1023,0 -7
> [12456.167855] F2FS-fs (sdd): Mount Device [ 1]: /dev/sde, 
> 1024,8 -f
> [12456.168238] F2FS-fs (sdd): Mount Device [ 2]: /dev/sdf, 
> 1024,   10 -   17
> [12456.168625] F2FS-fs (sdd): IO Block Size:4 KB
> [12456.178226] F2FS-fs (sdd): Found nat_bits in checkpoint
> [12456.193698] [ cut here ]
> [12456.194057] WARNING: CPU: 0 PID: 8146 at fs/f2fs/node.c:1162 
> __get_node_page.part.34+0x1e9/0x330 [f2fs]
> [12456.194758] Modules linked in: f2fs(E) tun bridge stp llc fuse ip_set 
> nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event 
> snd_ens1371 gameport coretemp ppdev snd_ac97_codec crct10dif_pclmul ac97_bus 
> crc32_pclmul snd_seq ghash_clmulni_intel intel_rapl_perf snd_pcm vmw_balloon 
> joydev snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc 
> parport acpi_cpufreq tpm_tis tpm_tis_core shpchp tpm i2c_piix4 vmw_vmci nfsd 
> auth_rpcgss nfs_acl lockd grace 

[f2fs-dev] About the superblock and checkpoint

2017-03-18 Thread Kinglong Mee
When I make a filesystem on a disk partition (eg. /dev/sdd1), 
but I mount the filesystem from /dev/sdd by mistake,
f2fs print the following WARNING. I don't think user want them.

I have no idea to avoid or fix it?
Should f2fs check both super block? or both checkpoint? 

Any comments are welcome.

[12456.030051] F2FS-fs (sdd): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[12456.031270] F2FS-fs (sdd): Can't find valid F2FS filesystem in 1th superblock
[12456.046173] F2FS-fs (sdd): Mount Device [ 0]: /dev/sdd, 
1023,0 -7
[12456.047112] F2FS-fs (sdd): Mount Device [ 1]: /dev/sde, 
1024,8 -f
[12456.048012] F2FS-fs (sdd): Mount Device [ 2]: /dev/sdf, 
1024,   10 -   17
[12456.048856] F2FS-fs (sdd): IO Block Size:4 KB
[12456.084157] F2FS-fs (sdd): Found nat_bits in checkpoint
[12456.138799] [ cut here ]
[12456.139303] WARNING: CPU: 0 PID: 8146 at fs/f2fs/node.c:1162 
__get_node_page.part.34+0x1e9/0x330 [f2fs]
[12456.140313] Modules linked in: f2fs(E) tun bridge stp llc fuse ip_set 
nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event 
snd_ens1371 gameport coretemp ppdev snd_ac97_codec crct10dif_pclmul ac97_bus 
crc32_pclmul snd_seq ghash_clmulni_intel intel_rapl_perf snd_pcm vmw_balloon 
joydev snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc 
parport acpi_cpufreq tpm_tis tpm_tis_core shpchp tpm i2c_piix4 vmw_vmci nfsd 
auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm 
drm crc32c_intel serio_raw e1000 mptspi scsi_transport_spi mptscsih mptbase 
ata_generic fjes pata_acpi
[12456.144180] CPU: 0 PID: 8146 Comm: mount Tainted: GW   E   
4.10.0-f2fs+ #25
[12456.144733] Hardware name: VMware, Inc. VMware Virtual Platform/440BX 
Desktop Reference Platform, BIOS 6.00 07/02/2015
[12456.145835] Call Trace:
[12456.146391]  dump_stack+0x63/0x86
[12456.146929]  __warn+0xcb/0xf0
[12456.147466]  warn_slowpath_null+0x1d/0x20
[12456.148013]  __get_node_page.part.34+0x1e9/0x330 [f2fs]
[12456.148573]  get_node_page.part.35+0x12/0x20 [f2fs]
[12456.149121]  get_node_page+0x1b/0x20 [f2fs]
[12456.149677]  f2fs_iget+0x8f/0x7f0 [f2fs]
[12456.150210]  f2fs_fill_super+0xb27/0x17c0 [f2fs]
[12456.150744]  ? vsnprintf+0x274/0x500
[12456.151255]  mount_bdev+0x178/0x1b0
[12456.151770]  ? f2fs_commit_super+0xf0/0xf0 [f2fs]
[12456.152267]  f2fs_mount+0x15/0x20 [f2fs]
[12456.152780]  mount_fs+0x38/0x150
[12456.153257]  ? __alloc_percpu+0x15/0x20
[12456.153749]  vfs_kern_mount+0x67/0x130
[12456.154223]  do_mount+0x1dd/0xc50
[12456.154701]  ? _copy_from_user+0x4e/0x80
[12456.155167]  ? memdup_user+0x4f/0x70
[12456.155633]  SyS_mount+0x83/0xd0
[12456.156139]  entry_SYSCALL_64_fastpath+0x1a/0xa9
[12456.156617] RIP: 0033:0x7f01d30856fa
[12456.157088] RSP: 002b:7ffc63bcf718 EFLAGS: 0246 ORIG_RAX: 
00a5
[12456.157576] RAX: ffda RBX: 55e03b143050 RCX: 7f01d30856fa
[12456.158055] RDX: 55e03b146730 RSI: 55e03b145f40 RDI: 55e03b143230
[12456.158535] RBP: 55e03b146050 R08:  R09: 0013
[12456.158993] R10: c0ed8000 R11: 0246 R12: 55e03b145f80
[12456.159449] R13:  R14: 7f01d3bf4a2e R15: 
[12456.159910] ---[ end trace cac510ee4c757c87 ]---
[12456.160699] F2FS-fs (sdd): Failed to read root inode
[12456.164960] F2FS-fs (sdd): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[12456.165389] F2FS-fs (sdd): Can't find valid F2FS filesystem in 1th superblock
[12456.167452] F2FS-fs (sdd): Mount Device [ 0]: /dev/sdd, 
1023,0 -7
[12456.167855] F2FS-fs (sdd): Mount Device [ 1]: /dev/sde, 
1024,8 -f
[12456.168238] F2FS-fs (sdd): Mount Device [ 2]: /dev/sdf, 
1024,   10 -   17
[12456.168625] F2FS-fs (sdd): IO Block Size:4 KB
[12456.178226] F2FS-fs (sdd): Found nat_bits in checkpoint
[12456.193698] [ cut here ]
[12456.194057] WARNING: CPU: 0 PID: 8146 at fs/f2fs/node.c:1162 
__get_node_page.part.34+0x1e9/0x330 [f2fs]
[12456.194758] Modules linked in: f2fs(E) tun bridge stp llc fuse ip_set 
nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event 
snd_ens1371 gameport coretemp ppdev snd_ac97_codec crct10dif_pclmul ac97_bus 
crc32_pclmul snd_seq ghash_clmulni_intel intel_rapl_perf snd_pcm vmw_balloon 
joydev snd_rawmidi snd_timer snd_seq_device snd soundcore nfit parport_pc 
parport acpi_cpufreq tpm_tis tpm_tis_core shpchp tpm i2c_piix4 vmw_vmci nfsd 
auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm 
drm crc32c_intel serio_raw e1000 mptspi scsi_transport_spi mptscsih mptbase 
ata_generic fjes pata_acpi
[12456.197471] CPU: 0 PID: 8146 Comm: mount Tainted: GW   E   
4.10.0-f2fs+ #25
[12456.197863] Hardware name: VMware, Inc. VMware Virtual Platform/440BX 
Desktop Reference