public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* make offline logfs image and some BUG()
@ 2012-11-19 19:31 Tristan Lelong
  2012-11-22 10:53 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Tristan Lelong @ 2012-11-19 19:31 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Hi,

I am trying to use logfs for a project I am currently working on. The 
kernel version I used is 2.6.37 with some patch from TI DM8168.

I search on the internet for an offline way to create a logfs image from 
a directory (like mkfs.jffs2), and the only way seems to be using the 
block2mtd kernel module. Does anybody confirm that?

Also I encountered two BUG():
- The first is already documented on some mailing lists: it is the one 
that it appears when doing umount -> call to map_invalidatepage.
I was able to apply the attached patch1 to fix this, but I still see 
call to this function. I guess I might miss something.

- The other one is when mounting a filesystem that detects a previous 
incomplete write: it BUG() because it cannot find any free segment. 
Trying to understand what is happening, I realized that during the 
mount, the function that adds segment to the free list is called after 
the function that check the filesystem. I modified this like in the 
following patch2 and it seems to work fine.

Does anybody have any thoughts about that?

Thanks a lo

---
618FE3EF


[-- Attachment #2: patch1 --]
[-- Type: text/plain, Size: 1551 bytes --]

Index: super.c
===================================================================
--- super.c	(revision 24035)
+++ super.c	(working copy)
@@ -511,6 +510,7 @@
 	/* Alias entries slow down mount, so evict as many as possible */
 	sync_filesystem(sb);
 	logfs_write_anchor(sb);
+	free_areas(sb);
 
 	/*
 	 * From this point on alias entries are simply dropped - and any
Index: segment.c
===================================================================
--- segment.c	(revision 24035)
+++ segment.c	(working copy)
@@ -841,6 +841,16 @@
 	kfree(area);
 }
 
+void free_areas(struct super_block *sb)
+{
+	struct logfs_super *super = logfs_super(sb);
+	int i;
+
+	for_each_area(i)
+		free_area(super->s_area[i]);
+	free_area(super->s_journal_area);
+}
+
 static struct logfs_area *alloc_area(struct super_block *sb)
 {
 	struct logfs_area *area;
@@ -923,10 +933,6 @@
 void logfs_cleanup_areas(struct super_block *sb)
 {
 	struct logfs_super *super = logfs_super(sb);
-	int i;
 
 	btree_grim_visitor128(&super->s_object_alias_tree, 0, kill_alias);
-	for_each_area(i)
-		free_area(super->s_area[i]);
-	free_area(super->s_journal_area);
 }
Index: logfs.h
===================================================================
--- logfs.h	(revision 24035)
+++ logfs.h	(working copy)
@@ -594,6 +594,7 @@
 void logfs_sync_area(struct logfs_area *area);
 void logfs_sync_segments(struct super_block *sb);
 void freeseg(struct super_block *sb, u32 segno);
+void free_areas(struct super_block *sb);
 
 /* area handling */
 int logfs_init_areas(struct super_block *sb);

[-- Attachment #3: patch2 --]
[-- Type: text/plain, Size: 578 bytes --]

Index: super.c
===================================================================
--- super.c	(revision 24035)
+++ super.c	(working copy)
@@ -308,14 +308,13 @@
 	if (err)
 		return err;
 
+	/* Do one GC pass before any data gets dirtied */
+	logfs_gc_pass(sb);
+
 	/* Check areas for trailing unaccounted data */
 	err = logfs_check_areas(sb);
 	if (err)
 		return err;
-
-	/* Do one GC pass before any data gets dirtied */
-	logfs_gc_pass(sb);
-
 	/* after all initializations are done, replay the journal
 	 * for rw-mounts, if necessary */
 	err = logfs_replay_journal(sb);

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

* Re: make offline logfs image and some BUG()
  2012-11-19 19:31 make offline logfs image and some BUG() Tristan Lelong
@ 2012-11-22 10:53 ` Artem Bityutskiy
  2012-11-22 16:56   ` prasad
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2012-11-22 10:53 UTC (permalink / raw)
  To: tristan.lelong, linux-fsdevel, Joern Engel, Prasad Joshi; +Cc: linux-mtd, logfs

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

On Mon, 2012-11-19 at 14:31 -0500, Tristan Lelong wrote:
> Hi,
> 
> I am trying to use logfs for a project I am currently working on. The 
> kernel version I used is 2.6.37 with some patch from TI DM8168.

I wonder if logfs is maintained?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: make offline logfs image and some BUG()
  2012-11-22 10:53 ` Artem Bityutskiy
@ 2012-11-22 16:56   ` prasad
  2012-11-22 16:59     ` prasad
  0 siblings, 1 reply; 4+ messages in thread
From: prasad @ 2012-11-22 16:56 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: tristan.lelong, Joern Engel, logfs, linux-mtd, linux-fsdevel,
	Prasad Joshi

On Thu, Nov 22, 2012 at 12:53:58PM +0200, Artem Bityutskiy wrote:
> On Mon, 2012-11-19 at 14:31 -0500, Tristan Lelong wrote:
> > Hi,
> > 
> > I am trying to use logfs for a project I am currently working on. The 
> > kernel version I used is 2.6.37 with some patch from TI DM8168.
> 
> I wonder if logfs is maintained?

It is being maintained however, for last few months I have not been able to work on it much.

> 
> -- 
> Best Regards,
> Artem Bityutskiy

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

* Re: make offline logfs image and some BUG()
  2012-11-22 16:56   ` prasad
@ 2012-11-22 16:59     ` prasad
  0 siblings, 0 replies; 4+ messages in thread
From: prasad @ 2012-11-22 16:59 UTC (permalink / raw)
  To: prasad
  Cc: tristan.lelong, Artem Bityutskiy, Joern Engel, logfs, linux-mtd,
	linux-fsdevel

On Thu, Nov 22, 2012 at 10:26:53PM +0530, prasad wrote:
> On Thu, Nov 22, 2012 at 12:53:58PM +0200, Artem Bityutskiy wrote:
> > On Mon, 2012-11-19 at 14:31 -0500, Tristan Lelong wrote:
> > > Hi,
> > > 
> > > I am trying to use logfs for a project I am currently working on. The 
> > > kernel version I used is 2.6.37 with some patch from TI DM8168.
> > 
> > I wonder if logfs is maintained?
> 
> It is being maintained however, for last few months I have not been able to work on it much.

BTW,
The latest repository is here https://github.com/prasad-joshi/logfs_upstream

> 
> > 
> > -- 
> > Best Regards,
> > Artem Bityutskiy
> 
> 

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

end of thread, other threads:[~2012-11-22 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 19:31 make offline logfs image and some BUG() Tristan Lelong
2012-11-22 10:53 ` Artem Bityutskiy
2012-11-22 16:56   ` prasad
2012-11-22 16:59     ` prasad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox