All of lore.kernel.org
 help / color / mirror / Atom feed
* wbuf flush or remount ro
@ 2004-05-07 13:42 Simon Haynes
  0 siblings, 0 replies; only message in thread
From: Simon Haynes @ 2004-05-07 13:42 UTC (permalink / raw)
  To: linux-mtd; +Cc: David Woodhouse

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

David,

Just to recap 

It seems that the latest jffs2 CVS code does not flush wbuf when the 
filesystem is remounted read only. This can cause a gc operation to be 
abnormally terminated an error messages are generated on remount.

A while ago you suggested I do something like this. See attached 

I don't really know how to create a patch file so here is a diff and a patch.
If the patch is not correct would you please enlighten me.

[-- Attachment #2: fs.patch --]
[-- Type: text/x-diff, Size: 818 bytes --]

--- fs.cvs	Fri May  7 14:29:45 2004
+++ fs.c	Fri May  7 14:08:40 2004
@@ -355,6 +355,13 @@
 
 	if (!(*flags & MS_RDONLY))
 		jffs2_start_garbage_collect_thread(c);
+	/* MHB hack */
+	else {
+		down(&c->alloc_sem);
+	        jffs2_flush_wbuf_pad(c);
+	        up(&c->alloc_sem);
+	}
+
 	
 	sb->s_flags = (sb->s_flags & ~MS_RDONLY)|(*flags & MS_RDONLY);
 
@@ -463,7 +470,12 @@
 	}
 
 	if (c->sector_size != c->mtd->erasesize)
+/* MHB */
+/*
 		printk(KERN_INFO "jffs2: Erase block size too small (%dKiB). Using virtual blocks size (%dKiB) instead\n", 
+			c->mtd->erasesize / 1024, c->sector_size / 1024);
+*/
+		printk(KERN_DEBUG "jffs2: Erase block size too small (%dKiB). Using virtual blocks size (%dKiB) instead\n", 
 			c->mtd->erasesize / 1024, c->sector_size / 1024);
 
 	if (c->flash_size < 5*c->sector_size) {

[-- Attachment #3: fs.diff --]
[-- Type: text/x-diff, Size: 901 bytes --]

*** fs.cvs	Fri May  7 14:29:45 2004
--- fs.c	Fri May  7 14:08:40 2004
***************
*** 355,360 ****
--- 355,367 ----
  
  	if (!(*flags & MS_RDONLY))
  		jffs2_start_garbage_collect_thread(c);
+ 	/* MHB hack */
+ 	else {
+ 		down(&c->alloc_sem);
+ 	        jffs2_flush_wbuf_pad(c);
+ 	        up(&c->alloc_sem);
+ 	}
+ 
  	
  	sb->s_flags = (sb->s_flags & ~MS_RDONLY)|(*flags & MS_RDONLY);
  
***************
*** 463,469 ****
--- 470,481 ----
  	}
  
  	if (c->sector_size != c->mtd->erasesize)
+ /* MHB */
+ /*
  		printk(KERN_INFO "jffs2: Erase block size too small (%dKiB). Using virtual blocks size (%dKiB) instead\n", 
+ 			c->mtd->erasesize / 1024, c->sector_size / 1024);
+ */
+ 		printk(KERN_DEBUG "jffs2: Erase block size too small (%dKiB). Using virtual blocks size (%dKiB) instead\n", 
  			c->mtd->erasesize / 1024, c->sector_size / 1024);
  
  	if (c->flash_size < 5*c->sector_size) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-07 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-07 13:42 wbuf flush or remount ro Simon Haynes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.