Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-12-20 at 11:50 -0800, Linus Torvalds wrote:

> NOTE NOTE NOTE! I _only_ did enough to make things compile for my
> particular configuration. That means that right now the following
> filesystems are broken with this patch (because they use the totally
> broken old crap):
> 
> 	CIFS, FUSE, JFS, ReiserFS, XFS
> 
> and I don't know exactly what they need to be fixed. But most likely their
> usage was insane and pointless anyway (looking at the ReiserFS case, for
> example, that was DEFINITELY the case. I can't even imagine what the heck
> it thinks it is doing).

Here's a patch to get rid of clear_page_dirty() from jfs.  I'm not
convinced it was totally broken, but I'm not convinced it wasn't.
Either way, I don't think that bit of code was particularly beneficial.

Feel free to apply this patch independent of your patch if you really
think that jfs's use of clear_page_dirty is crap, or I can push it
through -mm first.

This patch removes some questionable code that attempted to make a
no-longer-used page easier to reclaim.

Calling metapage_writepage against such a page will not result in any
I/O being performed, so removing this code shouldn't be a big deal.

Signed-off-by: Dave Kleikamp <[email protected]>

diff -Nurp linux-orig/fs/jfs/jfs_metapage.c linux/fs/jfs/jfs_metapage.c
--- linux-orig/fs/jfs/jfs_metapage.c	2006-12-07 17:12:58.000000000 -0600
+++ linux/fs/jfs/jfs_metapage.c	2006-12-20 15:19:48.000000000 -0600
@@ -764,22 +764,9 @@ void release_metapage(struct metapage * 
 	} else if (mp->lsn)	/* discard_metapage doesn't remove it */
 		remove_from_logsync(mp);
 
-#if MPS_PER_PAGE == 1
-	/*
-	 * If we know this is the only thing in the page, we can throw
-	 * the page out of the page cache.  If pages are larger, we
-	 * don't want to do this.
-	 */
-
-	/* Retest mp->count since we may have released page lock */
-	if (test_bit(META_discard, &mp->flag) && !mp->count) {
-		clear_page_dirty(page);
-		ClearPageUptodate(page);
-	}
-#else
 	/* Try to keep metapages from using up too much memory */
 	drop_metapage(page, mp);
-#endif
+
 	unlock_page(page);
 	page_cache_release(page);
 }


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux