From 142a324303228704ded3a66e20c7755d26f706ad Mon Sep 17 00:00:00 2001 From: pschwan Date: Fri, 24 May 2002 18:56:31 +0000 Subject: [PATCH] - Fixed some 64bit warnings - Fixed ldlm EXPORT table - fixed small obdctl bug --- lustre/include/linux/lustre_idl.h | 40 +++++++++++++++++++-------------------- lustre/ldlm/ldlm_extent.c | 1 - lustre/ldlm/ldlm_lock.c | 1 - lustre/ldlm/ldlm_lockd.c | 11 +++++++++++ lustre/ldlm/ldlm_request.c | 1 - lustre/ldlm/ldlm_resource.c | 1 - lustre/ldlm/ldlm_test.c | 1 - lustre/lib/page.c | 2 -- lustre/obdfilter/filter.c | 12 ++++++------ lustre/utils/obdctl.c | 5 ++++- 10 files changed, 41 insertions(+), 34 deletions(-) diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index f17fef2..d517c34 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -137,26 +137,26 @@ struct obdo { struct obd_ops *o_op; }; -#define OBD_MD_FLALL (~0UL) -#define OBD_MD_FLID (0x00000001UL) -#define OBD_MD_FLATIME (0x00000002UL) -#define OBD_MD_FLMTIME (0x00000004UL) -#define OBD_MD_FLCTIME (0x00000008UL) -#define OBD_MD_FLSIZE (0x00000010UL) -#define OBD_MD_FLBLOCKS (0x00000020UL) -#define OBD_MD_FLBLKSZ (0x00000040UL) -#define OBD_MD_FLMODE (0x00000080UL) -#define OBD_MD_FLTYPE (0x00000100UL) -#define OBD_MD_FLUID (0x00000200UL) -#define OBD_MD_FLGID (0x00000400UL) -#define OBD_MD_FLFLAGS (0x00000800UL) -#define OBD_MD_FLOBDFLG (0x00001000UL) -#define OBD_MD_FLNLINK (0x00002000UL) -#define OBD_MD_FLGENER (0x00004000UL) -#define OBD_MD_FLINLINE (0x00008000UL) -#define OBD_MD_FLOBDMD (0x00010000UL) -#define OBD_MD_FLOBJID (0x00020000UL) -#define OBD_MD_LINKNAME (0x00040000UL) +#define OBD_MD_FLALL 0xffffffff +#define OBD_MD_FLID (0x00000001) +#define OBD_MD_FLATIME (0x00000002) +#define OBD_MD_FLMTIME (0x00000004) +#define OBD_MD_FLCTIME (0x00000008) +#define OBD_MD_FLSIZE (0x00000010) +#define OBD_MD_FLBLOCKS (0x00000020) +#define OBD_MD_FLBLKSZ (0x00000040) +#define OBD_MD_FLMODE (0x00000080) +#define OBD_MD_FLTYPE (0x00000100) +#define OBD_MD_FLUID (0x00000200) +#define OBD_MD_FLGID (0x00000400) +#define OBD_MD_FLFLAGS (0x00000800) +#define OBD_MD_FLOBDFLG (0x00001000) +#define OBD_MD_FLNLINK (0x00002000) +#define OBD_MD_FLGENER (0x00004000) +#define OBD_MD_FLINLINE (0x00008000) +#define OBD_MD_FLOBDMD (0x00010000) +#define OBD_MD_FLOBJID (0x00020000) +#define OBD_MD_LINKNAME (0x00040000) #define OBD_MD_FLNOTOBD (~(OBD_MD_FLOBDMD | OBD_MD_FLOBDFLG | OBD_MD_FLBLOCKS |\ OBD_MD_LINKNAME)) diff --git a/lustre/ldlm/ldlm_extent.c b/lustre/ldlm/ldlm_extent.c index b334e4a..3e7c723 100644 --- a/lustre/ldlm/ldlm_extent.c +++ b/lustre/ldlm/ldlm_extent.c @@ -11,7 +11,6 @@ * Phil Schwan */ -#define EXPORT_SYMTAB #define DEBUG_SUBSYSTEM S_LDLM #include diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 512836d..414bd38 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -11,7 +11,6 @@ * Phil Schwan */ -#define EXPORT_SYMTAB #define DEBUG_SUBSYSTEM S_LDLM #include diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 9618a2a..58d3a8f7 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -422,6 +422,17 @@ static void __exit ldlm_exit(void) kmem_cache_destroy(ldlm_lock_slab); } +EXPORT_SYMBOL(ldlm_local_lock_match); +EXPORT_SYMBOL(ldlm_lock_addref); +EXPORT_SYMBOL(ldlm_lock_decref); +EXPORT_SYMBOL(ldlm_cli_convert); +EXPORT_SYMBOL(ldlm_cli_enqueue); +EXPORT_SYMBOL(ldlm_handle2object); +EXPORT_SYMBOL(ldlm_test); +EXPORT_SYMBOL(ldlm_lock_dump); +EXPORT_SYMBOL(ldlm_namespace_new); +EXPORT_SYMBOL(ldlm_namespace_free); + MODULE_AUTHOR("Cluster File Systems, Inc. "); MODULE_DESCRIPTION("Lustre Lock Management Module v0.1"); MODULE_LICENSE("GPL"); diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index ec32a68..9275214 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -9,7 +9,6 @@ * by Cluster File Systems, Inc. */ -#define EXPORT_SYMTAB #define DEBUG_SUBSYSTEM S_LDLM #include diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index 600219b..4a8dcde 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -9,7 +9,6 @@ * by Cluster File Systems, Inc. */ -#define EXPORT_SYMTAB #define DEBUG_SUBSYSTEM S_LDLM #include diff --git a/lustre/ldlm/ldlm_test.c b/lustre/ldlm/ldlm_test.c index e6efaf2..fc88099 100644 --- a/lustre/ldlm/ldlm_test.c +++ b/lustre/ldlm/ldlm_test.c @@ -9,7 +9,6 @@ * by Cluster File Systems, Inc. */ -#define EXPORT_SYMTAB #define DEBUG_SUBSYSTEM S_LDLM #include diff --git a/lustre/lib/page.c b/lustre/lib/page.c index 3a17215..57cdf72 100644 --- a/lustre/lib/page.c +++ b/lustre/lib/page.c @@ -115,7 +115,6 @@ struct page *lustre_get_page_read(struct inode *inode, unsigned long index) err_page: lustre_put_page(page); -err: return ERR_PTR(rc); } @@ -153,7 +152,6 @@ struct page *lustre_get_page_write(struct inode *inode, unsigned long index) err_unlock: UnlockPage(page); lustre_put_page(page); -err: return ERR_PTR(rc); } diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index f029fd8..972bfe4 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1007,22 +1007,22 @@ static int filter_get_info(struct obd_conn *conn, obd_count keylen, if ( keylen == strlen("blocksize") && memcmp(key, "blocksize", keylen) == 0 ) { - *vallen = sizeof(int); - *val = (void *)obddev->u.filter.fo_sb->s_blocksize; + *vallen = sizeof(long); + *val = (void *)(long)obddev->u.filter.fo_sb->s_blocksize; RETURN(0); } if ( keylen == strlen("blocksize_bits") && memcmp(key, "blocksize_bits", keylen) == 0 ){ - *vallen = sizeof(int); - *val = (void *)(int)obddev->u.filter.fo_sb->s_blocksize_bits; + *vallen = sizeof(long); + *val = (void *)(long)obddev->u.filter.fo_sb->s_blocksize_bits; RETURN(0); } if ( keylen == strlen("root_ino") && memcmp(key, "root_ino", keylen) == 0 ){ - *vallen = sizeof(int); - *val = (void *)(int) FILTER_ROOTINO; + *vallen = sizeof(long); + *val = (void *)(long)FILTER_ROOTINO; RETURN(0); } diff --git a/lustre/utils/obdctl.c b/lustre/utils/obdctl.c index ce3b768..712e420 100644 --- a/lustre/utils/obdctl.c +++ b/lustre/utils/obdctl.c @@ -749,7 +749,10 @@ static int jt_test_getattr(int argc, char **argv) IOCINIT(data); count = strtoul(argv[1], NULL, 0); - verbose = get_verbose(argv[2]); + if (argc == 3) + verbose = get_verbose(argv[2]); + else + verbose = 1; data.ioc_obdo1.o_valid = 0xffffffff; data.ioc_obdo1.o_id = 2; -- 1.8.3.1