Whamcloud - gitweb
at least get 2.6 building, more testing happens right after gdb stops 2.6 uml
authorzab <zab>
Mon, 8 Sep 2003 22:41:02 +0000 (22:41 +0000)
committerzab <zab>
Mon, 8 Sep 2003 22:41:02 +0000 (22:41 +0000)
from booting.  2.4 still builds and works.

- 2.4/2.6 compat macro cleaning
- add a ll wrapper for dev_t so mknod can take int in 2.4 and dev_t in 2.6
- 2.6 has to call clear_page_dirty to keep the page dirty counts accurate,
  we introduce a helper for 2.4
- tee hee, put lli_vfs_inode back.  its important, and stuff.
- add a removepage patch for 2.6
- move readpage into rw.c as both ports now use it
- llite_internal spring cleaning
- update 2.6 writepage to use the Writeback bits
- minor filter_io_26 cleanups, more to be done
- move osc_lock_contains into the right obd_ops initializer

lustre/kernel_patches/patches/removepage-2.6.0.patch [new file with mode: 0644]
lustre/kernel_patches/pc/removepage-2.6.0.pc [new file with mode: 0644]
lustre/kernel_patches/series/uml_2.6.0_test3
lustre/obdfilter/filter_io_26.c

diff --git a/lustre/kernel_patches/patches/removepage-2.6.0.patch b/lustre/kernel_patches/patches/removepage-2.6.0.patch
new file mode 100644 (file)
index 0000000..268ca97
--- /dev/null
@@ -0,0 +1,28 @@
+ include/linux/fs.h |    1 +
+ mm/filemap.c       |    3 +++
+ 2 files changed, 4 insertions(+)
+
+--- linux-2.6.0-test3-l25/include/linux/fs.h~removepage-2.6.0  2003-09-05 15:31:52.000000000 -0700
++++ linux-2.6.0-test3-l25-zab/include/linux/fs.h       2003-09-08 10:47:30.000000000 -0700
+@@ -311,6 +311,7 @@ struct address_space_operations {
+       int (*releasepage) (struct page *, int);
+       int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
+                       loff_t offset, unsigned long nr_segs);
++      void (*removepage)(struct page *); /* called when page gets removed from the inode */
+ };
+ struct backing_dev_info;
+--- linux-2.6.0-test3-l25/mm/filemap.c~removepage-2.6.0        2003-08-08 21:34:39.000000000 -0700
++++ linux-2.6.0-test3-l25-zab/mm/filemap.c     2003-09-08 10:48:10.000000000 -0700
+@@ -81,6 +81,9 @@ void __remove_from_page_cache(struct pag
+ {
+       struct address_space *mapping = page->mapping;
++      if (mapping->a_ops->removepage)
++              mapping->a_ops->removepage(page);
++
+       radix_tree_delete(&mapping->page_tree, page->index);
+       list_del(&page->list);
+       page->mapping = NULL;
+
+_
diff --git a/lustre/kernel_patches/pc/removepage-2.6.0.pc b/lustre/kernel_patches/pc/removepage-2.6.0.pc
new file mode 100644 (file)
index 0000000..c659e15
--- /dev/null
@@ -0,0 +1,2 @@
+include/linux/fs.h
+mm/filemap.c
index 7d59f3a..7b89a36 100644 (file)
@@ -11,3 +11,4 @@ export-truncate-2.5.63.patch
 qla2xxx-v8.00.00b1-2.5.73.patch
 uml-2.6.0-fix.patch
 ext3-map_inode_page-2.6.0.patch
+removepage-2.6.0.patch
index 696a9d0..ec9957a 100644 (file)
@@ -29,8 +29,6 @@
 #include <linux/pagemap.h> // XXX kill me soon
 #include <linux/version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-
 #define DEBUG_SUBSYSTEM S_FILTER
 
 #include <linux/obd_class.h>
 int ext3_map_inode_page(struct inode *inode, struct page *page,
                         unsigned long *blocks, int *created, int create);
 
+/* 512byte block min */
+#define MAX_BLOCKS_PER_PAGE (PAGE_SIZE / 512)
 struct dio_request {
         atomic_t numreqs;       /* number of reqs being processed */
         struct bio *bio_list;   /* list of completed bios */
         wait_queue_head_t wait;
-       int created[16]; /* 8KB pages man , 512bytes block min */
-       unsigned long blocks[16]; /* -- */
+       int created[MAX_BLOCKS_PER_PAGE];
+       unsigned long blocks[MAX_BLOCKS_PER_PAGE];
         spinlock_t lock;
 };
 
@@ -97,7 +97,7 @@ int filter_commitrw_write(struct obd_export *exp, int objcount,
         LASSERT(current->journal_info == NULL);
 
         blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
-       LASSERT(blocks_per_page <= 16);
+       LASSERT(blocks_per_page <= MAX_BLOCKS_PER_PAGE);
 
         OBD_ALLOC(dreq, sizeof(*dreq));
         if (dreq == NULL)
@@ -226,7 +226,3 @@ cleanup:
 
         RETURN(rc);
 }
-
-
-#endif
-