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

CVS commit program cvs at parl.clemson.edu
Mon Dec 8 10:54:56 EST 2008


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

Modified Files:
	dir.c file.c super.c 
Log Message:
patch from David Metheny to keep 2.4 build working


Index: dir.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/dir.c,v
diff -p -u -r1.57 -r1.58
--- dir.c	22 Sep 2008 19:22:04 -0000	1.57
+++ dir.c	8 Dec 2008 15:54:56 -0000	1.58
@@ -910,7 +910,6 @@ struct file_operations pvfs2_dir_operati
     readdir : pvfs2_readdir,
     open : pvfs2_file_open,
     release : pvfs2_file_release,
-    llseek : pvfs2_dir_llseek
 #else
     .read = generic_read_dir,
     .readdir = pvfs2_readdir,

Index: file.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/file.c,v
diff -p -u -r1.150 -r1.151
--- file.c	22 Oct 2008 21:39:00 -0000	1.150
+++ file.c	8 Dec 2008 15:54:56 -0000	1.151
@@ -295,6 +295,8 @@ static int postcopy_buffers(int buffer_i
     return ret;
 }
 
+#ifndef PVFS2_LINUX_KERNEL_2_4
+
 /* Copy from page-cache to application address space 
  * @rw - operation context, contains information about the I/O operation
  *       and holds the pointers to the page-cache page array from which
@@ -420,6 +422,8 @@ static int copy_from_pagecache(struct rw
     return 0;
 }
 
+#endif //#ifndef PVFS2_LINUX_KERNEL_2_4
+
 /*
  * Post and wait for the I/O upcall to finish
  * @rw - contains state information to initiate the I/O operation
@@ -701,11 +705,14 @@ static long bound_max_iovecs(const struc
     return max_nr_iovecs;
 }
 
+#ifndef PVFS2_LINUX_KERNEL_2_4
+
 #ifdef HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE
 #define pg_ref_count(pg) atomic_read(&(pg)->count)
 #else
 #define pg_ref_count(pg) atomic_read(&(pg)->_count)
 #endif
+
 /*
  * Cleaning up pages in the cache involves dropping the reference count
  * while cleaning up pages that were newly allocated involves unlocking
@@ -772,6 +779,7 @@ static int pvfs2_readpages_fill_cb(void 
     return 0;
 }
 
+
 #if defined(HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT)
 #define lock_mapping_tree(mapping) spin_lock(&mapping->page_lock)
 #define unlock_mapping_tree(mapping) spin_unlock(&mapping->page_lock)
@@ -1172,6 +1180,7 @@ cleanup:
     cleanup_cache_pages(rw.dest.pages.nr_pages, &rw, err);
     return err == 0 ? total_actual_io : err;
 }
+#endif //#ifndef PVFS2_LINUX_KERNEL_2_4
 
 /*
  * Common entry point for read/write/readv/writev
@@ -1347,13 +1356,16 @@ static ssize_t do_readv_writev(struct rw
         /* how much to transfer in this loop iteration */
         each_count = (((count - total_count) > pvfs_bufmap_size_query()) ?
                       pvfs_bufmap_size_query() : (count - total_count));
+#ifndef PVFS2_LINUX_KERNEL_2_4
         /* if a file is immutable, stage its I/O 
          * through the cache */
         if (IS_IMMUTABLE(rw->inode)) {
             /* Stage the I/O through the kernel's pagecache */
             ret = wait_for_cached_io(rw, ptr, seg_array[seg], each_count);
         }
-        else {
+        else 
+#endif /* PVFS2_LINUX_KERNEL_2_4 */
+        {
             /* push the I/O directly through to storage */
             ret = wait_for_direct_io(rw, ptr, seg_array[seg], each_count);
         }

Index: super.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/super.c,v
diff -p -u -r1.105 -r1.106
--- super.c	24 Sep 2008 18:12:27 -0000	1.105
+++ super.c	8 Dec 2008 15:54:56 -0000	1.106
@@ -1434,9 +1434,6 @@ void pvfs2_kill_sb(
 
         /* free the pvfs2 superblock private data */
         kfree(PVFS2_SB(sb));
-#else
-        sb->u.generic_sbp = NULL;
-#endif
         {
             int count1, count2;
             count1 = atomic_read(&(PVFS2_SB(sb)->pvfs2_inode_alloc_count));
@@ -1452,6 +1449,9 @@ void pvfs2_kill_sb(
                         count1, count2);
             }
         }
+#else
+        sb->u.generic_sbp = NULL;
+#endif
     }
     else
     {



More information about the Pvfs2-cvs mailing list