Debugging patch

Show some output as to what is going on.

Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>

---
 fs/ramfs/inode.c |    1 +
 mm/filemap.c     |    8 ++++++++
 2 files changed, 9 insertions(+)

Index: linux-2.6.21-rc7/fs/ramfs/inode.c
===================================================================
--- linux-2.6.21-rc7.orig/fs/ramfs/inode.c      2007-04-19 09:14:35.000000000 
-0700
+++ linux-2.6.21-rc7/fs/ramfs/inode.c   2007-04-19 09:14:42.000000000 -0700
@@ -174,6 +174,7 @@ static int ramfs_fill_super(struct super
        if (options && *options)
                order = simple_strtoul(options, NULL, 10);
 
+       printk(KERN_ERR "ramfs_fill_super: '%s' order=%d\n", options, order);
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        sb->s_blocksize = PAGE_CACHE_SIZE << order;
        sb->s_blocksize_bits = order + PAGE_CACHE_SHIFT;
Index: linux-2.6.21-rc7/mm/filemap.c
===================================================================
--- linux-2.6.21-rc7.orig/mm/filemap.c  2007-04-19 09:14:16.000000000 -0700
+++ linux-2.6.21-rc7/mm/filemap.c       2007-04-19 09:16:45.000000000 -0700
@@ -121,6 +121,10 @@ void __remove_from_page_cache(struct pag
        mapping->nrpages--;
        __mod_zone_page_state(page_zone(page), NR_FILE_PAGES,
                        -(1 << mapping->order));
+
+       if (mapping->order)
+               printk(KERN_ERR "Removing page %p order %d from pagecache\n",
+                               page, mapping->order);
 }
 
 void remove_from_page_cache(struct page *page)
@@ -451,6 +455,10 @@ int add_to_page_cache(struct page *page,
                        mapping->nrpages++;
                        __mod_zone_page_state(page_zone(page), NR_FILE_PAGES,
                                        1 << mappig->order);
+
+                       if (mapping->order)
+                               printk(KERN_ERR "add_to_page_cache page %p 
order=%d\n",
+                                               page, mapping->order);
                }
                write_unlock_irq(&mapping->tree_lock);
                radix_tree_preload_end();
-
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/

Reply via email to