Kernel migration from 3.10 to 4.19 causes JFFS2/MTD/CFI mounting issues

0

I am trying to upgrade the kernel from 3.10 to 4.19 on an Atmel at91sam9260 system, everything otherwise unchanged. The system has 8 partitions on a NOR flash that work fine on 3.10. Booting into an initramfs on 4.19 followed by mounting the unchanged JFFS2 partitions reveals a lot of printouts in the kernel log (see below). They (let us call them A & B) also give the impression of being empty. ls returns nothing. Writing a file called 1 to A’s mount point followed by 2 to B’s mount point renders the following upon a reboot

ls A’s-mountpoint
1 2

ls B’s-mountpoint
2

I can read 2 from A’s mount point. It looks as though the partitions overlap. This confuses me a lot. What could be wrong?

dmesg

[JFFS2 DBG] (1) jffs2_build_filesystem: build FS data structures
[JFFS2 DBG] (1) jffs2_link_node_ref: Last node at c1b82ea8 is (fffffffe,  (null))
[JFFS2 DBG] (1) jffs2_link_node_ref: New ref is c1b82ea8 (fffffffe becomes 00000003,  (null)) len 0xc
[JFFS2 DBG] (1) jffs2_add_ino_cache: add c1b83168 (ino #141)
[JFFS2 DBG] (1) jffs2_link_node_ref: Last node at c1b82ea8 is (00000003,  (null))
[JFFS2 DBG] (1) jffs2_link_node_ref: New ref is c1b82eb0 (fffffffe becomes 0000000c,  (null)) len 0x1fc
[JFFS2 DBG] (1) jffs2_add_ino_cache: add c1b83150 (ino #107)
[JFFS2 DBG] (1) jffs2_link_node_ref: Last node at c1b82eb0 is (0000000c,c1b83168)
[JFFS2 DBG] (1) jffs2_link_node_ref: New ref is c1b82eb8 (fffffffe becomes 0000020a,  (null)) len 0x34
[JFFS2 DBG] (1) jffs2_add_fd_to_list: add dirent "prog.conf", ino #142
--------8<----------------------------8<---------------------------------------    
[JFFS2 DBG] (1) jffs2_link_n(1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x001839b0
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x00182f24
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0018252c
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x00181b50
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x00181160
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0018073c
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0018000c
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0017fda8
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0017f324
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0017e9b4
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0017dfb8
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x0017d56c
--------8<----------------------------8<---------------------------------------    
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: removing ino #298 with nlink == zero.
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: obsoleting node at 0x002cc5ec
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: removing ino #171 with nlink == zero.

[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: removing child "kernel", ino #185
[JFFS2 DBG] (1) jffs2_build_remove_unlinked_inode: inode #185 ("kernel") now has no links; adding to dead_fds list.
--------8<----------------------------8<---------------------------------------
[JFFS2 DBG] (1) jffs2_build_filesystem: pass 2a complete
[JFFS2 DBG] (1) jffs2_build_filesystem: freeing temporary data structures
[JFFS2 DBG] (1) jffs2_build_filesystem: FS build complete
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: trigger levels (size 14592 KiB, block size 128 KiB, 114 blocks)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Blocks required to allow deletion:    2 (256 KiB)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Blocks required to allow writes:      5 (640 KiB)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Blocks required to quiesce GC thread: 6 (768 KiB)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Blocks required to allow GC merges:   3 (384 KiB)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Blocks required to GC bad blocks:     0 (0 KiB)
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Amount of dirty space required to GC: 280494 bytes
[JFFS2 DBG] (1) jffs2_calc_trigger_levels: Very dirty blocks before GC triggered: 60
[JFFS2 DBG] (1) jffs2_do_read_inode: read inode #1
[JFFS2 DBG] (1) jffs2_do_read_inode: creating inocache for root inode
[JFFS2 DBG] (1) jffs2_add_ino_cache: add c1b85c48 (ino #1)
[JFFS2 DBG] (1) jffs2_do_read_inode_internal: ino #1 pino/nlink is 1
[JFFS2 DBG] (1) jffs2_get_inode_nodes: ino #1
[JFFS2 DBG] (1) jffs2_get_inode_nodes: nodes of inode #1 were read, the highest version is 0, latest_mctime 0, mctime_ver 0.
VFS: Mounted root (jffs2 filesystem) on device 31:4.

4.19 boot log

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.19.16 (potato@circus) (gcc version 8.2.1 20181213 (release) [gcc-8-branch revision 267074] (GNU Tools for Arm Embedded Processors 8-2018-q4-major)) #3 PREEMPT Fri Apr 26 13:22:29 CEST 2019
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: Atmel at91sam9260ek
Memory policy: Data cache writeback
random: get_random_bytes called from start_kernel+0x7c/0x3f8 with crng_init=0
Built 1 zonelists, mobility grouping on.  Total pages: 8128
Kernel command line: ramdisk_size=7000 root=/dev/ram rw mtdparts=physmap-flash.0:0x40000@0(),0x20000@0x40000(),0x60000@0x60000(),0x20000@0xC0000(),0xE40000@0xE0000(),0x20000@0xF20000(),0xE40000@0xF40000(),0xA0000@0x1D80000() mem=32M console=ttyS0,115200
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 26328K/32768K available (3169K kernel code, 115K rwdata, 740K rodata, 1780K init, 80K bss, 6440K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0x(ptrval) - 0x(ptrval)   (3171 kB)
      .init : 0x(ptrval) - 0x(ptrval)   (1780 kB)
      .data : 0x(ptrval) - 0x(ptrval)   ( 116 kB)
       .bss : 0x(ptrval) - 0x(ptrval)   (  81 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
    Tasks RCU enabled.
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 10604916284 ns
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Calibrating delay loop... 88.98 BogoMIPS (lpj=444928)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20008400 - 0x20008460
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
gpio-at91 fffff400.gpio: at address (ptrval)
gpio-at91 fffff600.gpio: at address (ptrval)
gpio-at91 fffff800.gpio: at address (ptrval)
pinctrl-at91 ahb:apb:pinctrl@fffff400: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 169678661784 ns
AT91: Detected SoC: at91sam9260, revision 2
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
workingset: timestamp_bits=30 max_order=13 bucket_order=0
jffs2: version 2.2. © 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
brd: module loaded
loop: module loaded
ssc fffbc000.ssc: Atmel SSC device at 0x(ptrval) (irq 31)
atmel_usart_serial.0.auto: ttyS0 at MMIO 0xfffff200 (irq = 16, base_baud = 5632000) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart_serial.1.auto: ttyS1 at MMIO 0xfffb0000 (irq = 26, base_baud = 5632000) is a ATMEL_SERIAL
atmel_usart_serial.2.auto: ttyS2 at MMIO 0xfffb4000 (irq = 27, base_baud = 5632000) is a ATMEL_SERIAL
physmap platform flash device: 02000000 at 10000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.3.
number of CFI chips: 1
8 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 8 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : ""
0x000000040000-0x000000060000 : ""
0x000000060000-0x0000000c0000 : ""
0x0000000c0000-0x0000000e0000 : ""
0x0000000e0000-0x000000f20000 : "A"
0x000000f20000-0x000000f40000 : ""
0x000000f40000-0x000001d80000 : "B"
0x000001d80000-0x000001e20000 : ""
libphy: Fixed MDIO Bus: probed
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci 500000.ohci: USB Host Controller
at91_ohci 500000.ohci: new USB bus registered, assigned bus number 1
at91_ohci 500000.ohci: irq 33, io mem 0x00500000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
udc: at91_udc version 3 May 2006
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
rtc rtc0: invalid alarm value: 1900-1-26 0:0:0
rtc-at91sam9 fffffd20.rtc: rtc core: registered fffffd20.rtc as rtc0
at91sam9_wdt: enabled (heartbeat=15 sec, nowayout=0)
NET: Registered protocol family 17
rtc-at91sam9 fffffd20.rtc: setting system clock to 2019-04-26 14:30:17 UTC (1556289017)
Freeing unused kernel memory: 1780K
This architecture does not have kernel memory protection.
Run /init as init process
random: fast init done
linux
boot
filesystems
embedded-linux
asked on Super User Apr 26, 2019 by Mr.Christer

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0