On Fri, Jul 22, 2011 at 12:35 AM, Jörn Engel <joern@xxxxxxxxx> wrote: > On Tue, 19 July 2011 14:53:08 +0530, srimugunthan dhandapani wrote: >> >> Is the hardware the "Drais card" that you described in the following link >> www.linux-kongress.org/2010/slides/logfs-engel.pdf > > Yes. > >> Since the driver exposes an mtd device, do you mount the ext4,btrfs >> filesystem over any FTL? > > That was last year. In the mean time I've added an FTL to the driver, > so the card behaves like a regular ssd. Well, mostly. > >> Is it possible to have logfs over the PCIe-SSD card? > > YeaaaNo! Not anymore. Could be lack of error correction in the > current driver or could be bitrot. Logfs over loopback seems to work > just fine, so if it is bitrot, it is limited to the mtd interface. > >> Pardon me for asking the following in this thread. >> I have been trying to mount logfs and i face seg fault during unmount >> . I have tested it in 2.6.34 and 2.39.1. I have asked about the >> problem here. >> http://comments.gmane.org/gmane.linux.file-systems/55008 >> >> Two other people have also faced umount problem in logfs >> >> 1. http://comments.gmane.org/gmane.linux.file-systems/46630 >> 2. http://eeek.borgchat.net/lists/linux-embedded/msg02970.html >> >> My apologies again for asking it here. Since the logfs@xxxxxxxxx >> mailing list(and the wiki) doesnt work any more , i am asking the >> question here. I am thankful for your reply. > > Yes, ever since that machine died I have basically been the > non-maintainer of logfs. In a different century I would have been > hanged, drawn and quartered for it. Give me some time to test the mtd > side and see what's up. > > Jörn hi , With the latest kernel logfs unmount produces kernel BUG at fs/logfs/segment.c:858[2]. The problem is in the invalidatepage implementation of the device_mapping inode. It is assumed in the code that invalidatepage of the mapping_inode shouldnt be invoked. The present invalidatepage implementation just calls BUG(). I don't know why it is assumed like that. But i modified the invalidatepage to clear the page private and update flag as shown in patch [1]. With that, i tested with nandsim and i am able to do a clean unmount. I am curious to know what is correct solution. [1] Signed-off-by: srimugunthan <srimugunthan.dhandapani@xxxxxxxxx> --- fs/logfs/segment.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c index 9d51873..d83b778 100644 --- a/fs/logfs/segment.c +++ b/fs/logfs/segment.c @@ -855,7 +855,10 @@ static struct logfs_area *alloc_area(struct super_block *sb) static void map_invalidatepage(struct page *page, unsigned long l) { - BUG(); + ClearPagePrivate(page); + page->private = 0; + + ClearPageUptodate(page); } static int map_releasepage(struct page *page, gfp_t g) -- 1.7.0.4 ---[2] Aug 5 00:14:12 mll kernel: [ 203.611029] LogFS: Start unmounting Aug 5 00:14:12 mll kernel: [ 203.612079] nand_erase_nand: start = 0x000000080000, len = 262144 Aug 5 00:14:12 mll kernel: [ 203.612082] nand_isbad_bbt(): bbt info for offs 0x00080000: (block 2) 0x00 Aug 5 00:14:12 mll kernel: [ 203.612833] nand_sync: called Aug 5 00:14:12 mll kernel: [ 203.612864] nand_sync: called Aug 5 00:14:12 mll kernel: [ 203.613000] LogFS: Now in shutdown Aug 5 00:14:12 mll kernel: [ 203.613668] ------------[ cut here ]------------ Aug 5 00:14:12 mll kernel: [ 203.613683] kernel BUG at fs/logfs/segment.c:858! Aug 5 00:14:12 mll kernel: [ 203.613689] invalid opcode: 0000 [#1] SMP Aug 5 00:14:12 mll kernel: [ 203.613696] CPU 2 Aug 5 00:14:12 mll kernel: [ 203.613699] Modules linked in: mtdchar nandsim nand nand_ids nand_ecc mtdblock mtd_blkdevs logfs zlib_deflate binfmt_misc ppdev nfsd exportfs kvm_intel kvm nfs lockd auth_rpcgss nfs_acl sunrpc adt7475 hwmon_vid nouveau fbcon tileblit font bitblit snd_hda_codec_realtek softcursor snd_hda_intel ttm bridge snd_hda_codec snd_hwdep drm_kms_helper snd_pcm_oss drm snd_mixer_oss snd_pcm stp snd_seq_dummy lp snd_seq_oss snd_seq_midi parport snd_rawmidi snd_seq_midi_event intel_agp hp_wmi i2c_algo_bit sparse_keymap intel_gtt snd_seq mxm_wmi snd_timer snd_seq_device snd psmouse serio_raw video soundcore snd_page_alloc usbhid hid ahci e1000e libahci Aug 5 00:14:12 mll kernel: [ 203.613828] Aug 5 00:14:12 mll kernel: [ 203.613832] Pid: 2058, comm: umount Tainted: G W 3.0.0+ #2 Hewlett-Packard HP Z200 Workstation/0B40h Aug 5 00:14:12 mll kernel: [ 203.613843] RIP: 0010:[<ffffffffa034dd09>] [<ffffffffa034dd09>] map_invalidatepage+0x9/0x10 [logfs] Aug 5 00:14:12 mll kernel: [ 203.613856] RSP: 0018:ffff8800c79e9c28 EFLAGS: 00010286 Aug 5 00:14:12 mll kernel: [ 203.613860] RAX: ffffffffa034dd00 RBX: ffffea00030d03c0 RCX: 0000000000000009 Aug 5 00:14:12 mll kernel: [ 203.613866] RDX: ffffffff81197860 RSI: 0000000000000000 RDI: ffffea00030d03c0 Aug 5 00:14:12 mll kernel: [ 203.613872] RBP: ffff8800c79e9c28 R08: ffff8800c79e9cf8 R09: b400000000000000 Aug 5 00:14:12 mll kernel: [ 203.613877] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8800c4fb0200 Aug 5 00:14:12 mll kernel: [ 203.613882] R13: ffff8800c4fb0200 R14: ffff8800c79e9c98 R15: 0000000000000000 Aug 5 00:14:12 mll kernel: [ 203.613888] FS: 00007f8a551e8740(0000) GS:ffff880112c00000(0000) knlGS:0000000000000000 Aug 5 00:14:12 mll kernel: [ 203.613894] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b Aug 5 00:14:12 mll kernel: [ 203.613900] CR2: 00007f8a54886355 CR3: 00000000c7963000 CR4: 00000000000006e0 Aug 5 00:14:12 mll kernel: [ 203.613906] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Aug 5 00:14:12 mll kernel: [ 203.613911] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Aug 5 00:14:12 mll kernel: [ 203.613917] Process umount (pid: 2058, threadinfo ffff8800c79e8000, task ffff8800d7bd8000) Aug 5 00:14:12 mll kernel: [ 203.613923] Stack: Aug 5 00:14:12 mll kernel: [ 203.613925] ffff8800c79e9c38 ffffffff81119378 ffff8800c79e9c58 ffffffff81119692 Aug 5 00:14:12 mll kernel: [ 203.613936] 0000000000000080 ffffffffffffffff ffff8800c79e9d48 ffffffff81119a47 Aug 5 00:14:12 mll kernel: [ 203.613947] ffffea00030d03c0 0000000000000009 ffff8800c79e9cf8 0000000000000002 Aug 5 00:14:12 mll kernel: [ 203.613957] Call Trace: Aug 5 00:14:12 mll kernel: [ 203.613964] [<ffffffff81119378>] do_invalidatepage+0x28/0x30 Aug 5 00:14:12 mll kernel: [ 203.613969] [<ffffffff81119692>] truncate_inode_page+0x92/0xb0 Aug 5 00:14:12 mll kernel: [ 203.613975] [<ffffffff81119a47>] truncate_inode_pages_range+0x177/0x4f0 Aug 5 00:14:12 mll kernel: [ 203.613982] [<ffffffff81119dd5>] truncate_inode_pages+0x15/0x20 Aug 5 00:14:12 mll kernel: [ 203.613989] [<ffffffffa034d407>] logfs_evict_inode+0x57/0x1d0 [logfs] Aug 5 00:14:12 mll kernel: [ 203.613996] [<ffffffff812e325e>] ? do_raw_spin_unlock+0x5e/0xb0 Aug 5 00:14:12 mll kernel: [ 203.614004] [<ffffffff81180d49>] evict+0xa9/0x1a0 Aug 5 00:14:12 mll kernel: [ 203.614009] [<ffffffff81180f3d>] iput+0xfd/0x200 Aug 5 00:14:12 mll kernel: [ 203.614015] [<ffffffffa0347f00>] logfs_put_super+0x30/0x40 [logfs] Aug 5 00:14:12 mll kernel: [ 203.614022] [<ffffffff81168882>] generic_shutdown_super+0x62/0xe0 Aug 5 00:14:12 mll kernel: [ 203.614029] [<ffffffffa034f8cf>] logfs_kill_sb+0x4f/0xe0 [logfs] Aug 5 00:14:12 mll kernel: [ 203.614035] [<ffffffff81169415>] deactivate_locked_super+0x45/0x70 Aug 5 00:14:12 mll kernel: [ 203.614041] [<ffffffff8116a1aa>] deactivate_super+0x4a/0x70 Aug 5 00:14:12 mll kernel: [ 203.614047] [<ffffffff8118544d>] mntput_no_expire+0xed/0x140 Aug 5 00:14:12 mll kernel: [ 203.614054] [<ffffffff81185978>] sys_umount+0x78/0x3b0 Aug 5 00:14:12 mll kernel: [ 203.614063] [<ffffffff815c44c2>] system_call_fastpath+0x16/0x1b Aug 5 00:14:12 mll kernel: [ 203.614068] Code: 8b 41 10 48 8b 91 38 02 00 00 8b 89 40 02 00 00 48 d3 e6 44 89 c1 ff 50 28 c9 c3 0f 1f 80 00 00 00 00 55 48 89 e5 66 66 66 66 90 <0f> 0b eb fe 0f 1f 00 55 48 89 e5 66 66 66 66 90 31 c0 c9 c3 0f Aug 5 00:14:12 mll kernel: [ 203.614161] RIP [<ffffffffa034dd09>] map_invalidatepage+0x9/0x10 [logfs] Aug 5 00:14:12 mll kernel: [ 203.614169] RSP <ffff8800c79e9c28> Aug 5 00:14:12 mll kernel: [ 203.617500] ---[ end trace 0b263dd4c3729069 ]--- -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html