From 8e3d0bdfedbca92a12f6abd54703262121b620aa Mon Sep 17 00:00:00 2001 From: braam Date: Sat, 9 Feb 2002 05:12:51 +0000 Subject: [PATCH] Minor fixes to - setup scripts to do Elan stuff - a few changes to page cache stuff for 2.4.9 (we finally know how to #if it) - the usual battle the ext2obd patch - removed aclocal.m4 (enhances immunity from automake versions) --- lustre/include/linux/lustre_net.h | 2 +- lustre/llite/rw.c | 33 ++++++++++++++++++++++++++++----- lustre/ptlrpc/rpc.c | 6 ++---- lustre/tests/llmount-client.sh | 8 +++++--- lustre/tests/llmount-server.sh | 10 +++++++--- 5 files changed, 43 insertions(+), 16 deletions(-) diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index 1af56f1..686fcca 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -101,7 +101,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer); int rpc_register_service(struct ptlrpc_service *service, char *uuid); /* FIXME */ -#if 1 +#if 0 # define LUSTRE_NAL "ksocknal" #else # define LUSTRE_NAL "kqswnal" diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 0cb0eab..f5b262b 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -32,6 +32,29 @@ #include #include +/* + * Add a page to the dirty page list. + */ +void __set_page_dirty(struct page *page) +{ + struct address_space *mapping; + spinlock_t *pg_lock; + + pg_lock = PAGECACHE_LOCK(page); + spin_lock(pg_lock); + + mapping = page->mapping; + spin_lock(&mapping->page_lock); + + list_del(&page->list); + list_add(&page->list, &mapping->dirty_pages); + + spin_unlock(&mapping->page_lock); + spin_unlock(pg_lock); + + if (mapping->host) + mark_inode_dirty_pages(mapping->host); +} static void inline ll_oa_from_inode(struct obdo *oa, struct inode *inode) { @@ -82,22 +105,24 @@ static void inline ll_oa_from_inode(struct obdo *oa, struct inode *inode) /* * Add a page to the dirty page list. */ +#if 0 void set_page_dirty(struct page *page) { if (!test_and_set_bit(PG_dirty, &page->flags)) { struct address_space *mapping = page->mapping; if (mapping) { - spin_lock(&pagecache_lock); list_del(&page->list); list_add(&page->list, &mapping->dirty_pages); - spin_unlock(&pagecache_lock); if (mapping->host) mark_inode_dirty_pages(mapping->host); } } } +#endif + + /* * Remove page from dirty list @@ -110,7 +135,6 @@ void __set_page_clean(struct page *page) if (!mapping) return; - spin_lock(&pagecache_lock); list_del(&page->list); list_add(&page->list, &mapping->clean_pages); @@ -119,7 +143,6 @@ void __set_page_clean(struct page *page) CDEBUG(D_INODE, "inode clean\n"); inode->i_state &= ~I_DIRTY_PAGES; } - spin_unlock(&pagecache_lock); EXIT; } @@ -284,7 +307,7 @@ int ll_dir_readpage(struct file *file, struct page *page) SetPageUptodate(page); readpage_out: - unlock_page(page); + obd_unlock_page(page); EXIT; return rc; } /* ll_dir_readpage */ diff --git a/lustre/ptlrpc/rpc.c b/lustre/ptlrpc/rpc.c index 4969603..9a19265 100644 --- a/lustre/ptlrpc/rpc.c +++ b/lustre/ptlrpc/rpc.c @@ -301,12 +301,12 @@ static int req_init_portals(void) return rc; } -static int __init req_init(void) +static int init_module(void) { return req_init_portals(); } -static void __exit req_exit(void) +static void cleanup_module(void) { PtlEQFree(req_eq); @@ -319,5 +319,3 @@ MODULE_AUTHOR("Peter J. Braam "); MODULE_DESCRIPTION("Lustre Request Processor v1.0"); MODULE_LICENSE("GPL"); -module_init(req_init); -module_exit(req_exit); diff --git a/lustre/tests/llmount-client.sh b/lustre/tests/llmount-client.sh index aafc15a..6fa09c5 100644 --- a/lustre/tests/llmount-client.sh +++ b/lustre/tests/llmount-client.sh @@ -1,4 +1,5 @@ #!/bin/sh +export PATH=/sbin:/usr/sbin:$PATH SRCDIR="`dirname $0`" . $SRCDIR/common.sh @@ -8,12 +9,13 @@ SERVER=compila mknod /dev/portals c 10 240 insmod $R/usr/src/portals/linux/oslib/portals.o -insmod $R/usr/src/portals/linux/socknal/ksocknal.o +# insmod $R/usr/src/portals/linux/socknal/ksocknal.o +insmod $R/usr/src/portals/linux/qswnal/kqswnal.o $R/usr/src/portals/linux/utils/ptlctl <