[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/kernel/linux-2.6: inode.c pvfs2-mod.c super.c

CVS commit program cvs at parl.clemson.edu
Wed Jan 27 15:46:28 EST 2010


Update of /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6
In directory parlweb1:/tmp/cvs-serv21660/src/kernel/linux-2.6

Modified Files:
	inode.c pvfs2-mod.c super.c 
Log Message:
fixes for 2.6.32:
- configure test for backing_dev_info.name field
- configure test for bdi_init()  (first appeared several versions ago)
- trust kernel to handle dirty inode list automatically on unmount


Index: inode.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/inode.c,v
diff -p -u -r1.88 -r1.89
--- inode.c	30 Jun 2009 16:25:38 -0000	1.88
+++ inode.c	27 Jan 2010 20:46:28 -0000	1.89
@@ -133,6 +133,9 @@ static int pvfs2_releasepage(struct page
 
 struct backing_dev_info pvfs2_backing_dev_info =
 {
+#ifdef HAVE_BACKING_DEV_INFO_NAME
+    .name = "pvfs2",
+#endif
     .ra_pages = 0,
 #ifdef HAVE_BDI_MEMORY_BACKED
     /* old interface, up through 2.6.11 */

Index: pvfs2-mod.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/pvfs2-mod.c,v
diff -p -u -r1.38 -r1.39
--- pvfs2-mod.c	20 Mar 2008 03:21:26 -0000	1.38
+++ pvfs2-mod.c	27 Jan 2010 20:46:28 -0000	1.39
@@ -100,6 +100,12 @@ static int __init pvfs2_init(void)
     int ret = -1;
     gossip_debug(GOSSIP_INIT_DEBUG, "pvfs2: pvfs2_init called with debug mask 0x%x\n", gossip_debug_mask);
 
+#ifdef HAVE_BDI_INIT
+    ret = bdi_init(&pvfs2_backing_dev_info);
+    if(ret)
+        return(ret);
+#endif
+
     if(op_timeout_secs < 0)
     {
         op_timeout_secs = 0;
@@ -170,6 +176,9 @@ cleanup_req:
 cleanup_op:
     op_cache_finalize();
 err:
+#ifdef HAVE_BDI_INIT
+    bdi_destroy(&pvfs2_backing_dev_info);
+#endif
     return ret;
 }
 
@@ -218,6 +227,10 @@ static void __exit pvfs2_exit(void)
 
     qhash_finalize(htable_ops_in_progress);
     
+#ifdef HAVE_BDI_INIT
+    bdi_destroy(&pvfs2_backing_dev_info);
+#endif
+
     printk("pvfs2: module version %s unloaded\n", PVFS2_VERSION);
 }
 

Index: super.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/super.c,v
diff -p -u -r1.115 -r1.116
--- super.c	26 Jan 2010 01:23:40 -0000	1.115
+++ super.c	27 Jan 2010 20:46:28 -0000	1.116
@@ -1450,20 +1450,14 @@ static void pvfs2_flush_sb(
 {
 #ifdef HAVE_SB_DIRTY_LIST
     if (!list_empty(&sb->s_dirty))
-#else
-    if (!list_empty(&sb->s_bdi->wb.b_dirty))
-#endif
     {
         struct inode *inode = NULL;
-#ifdef HAVE_SB_DIRTY_LIST
         list_for_each_entry (inode, &sb->s_dirty, i_list)
-#else
-        list_for_each_entry (inode, &sb->s_bdi->wb.b_dirty, i_list)
-#endif
         {
             pvfs2_flush_inode(inode);
         }
     }
+#endif
     return;
 }
 



More information about the Pvfs2-cvs mailing list