? include/.pvfs2-sysint.h.swp ? src/common/misc/.pint-event.h.swp ? src/common/misc/pvfs2-hint.c ? src/io/job/.job.c.swp ? src/proto/endecode-funcs.c Index: Makefile.in =================================================================== RCS file: /projects/cvsroot/pvfs2/Makefile.in,v retrieving revision 1.255 diff -u -a -p -r1.255 Makefile.in --- Makefile.in 17 Aug 2007 04:04:23 -0000 1.255 +++ Makefile.in 15 Sep 2007 00:27:05 -0000 @@ -890,6 +890,7 @@ install:: all install_doc install -m 644 $(srcdir)/include/pvfs2-sysint.h $(prefix)/include install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(prefix)/include install -m 644 $(srcdir)/include/pvfs2-types.h $(prefix)/include + install -m 644 $(srcdir)/include/pvfs2-hint.h $(prefix)/include install -m 644 $(srcdir)/include/pvfs2-util.h $(prefix)/include install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(prefix)/include Index: include/pvfs2-hint.h =================================================================== RCS file: include/pvfs2-hint.h diff -N include/pvfs2-hint.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/pvfs2-hint.h 15 Sep 2007 00:27:05 -0000 @@ -0,0 +1,45 @@ +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +#ifndef __PVFS2_HINT_H +#define __PVFS2_HINT_H + +#include "pvfs2-types.h" + +#define PINT_HINT_TRANSFER 0x01 + +#define PVFS_HINT_REQUEST_ID_NAME "pvfs.hint.request_id" +#define PVFS_HINT_CLIENT_ID_NAME "pvfs.hint.client_id" +#define PVFS_HINT_HANDLE_NAME "pvfs.hint.handle" + +typedef struct PVFS_hint_s *PVFS_hint; + +int PVFS_hint_add( + PVFS_hint *hint, + const char *type, + int length, + void *value); + +int PVFS_hint_copy(PVFS_hint old_hint, PVFS_hint *new_hint); + +void PVFS_hint_free(PVFS_hint hint); + +/* + * function allows users to specify hints in an environment variable. + */ +int PVFS_hint_import_env(PVFS_hint *out_hint); + +#endif /* __PVFS2_HINT_H */ + +/* + * Local variables: + * mode: c + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ft=c ts=8 sts=4 sw=4 expandtab + */ Index: include/pvfs2-mgmt.h =================================================================== RCS file: /projects/cvsroot/pvfs2/include/pvfs2-mgmt.h,v retrieving revision 1.60 diff -u -a -p -r1.60 pvfs2-mgmt.h --- include/pvfs2-mgmt.h 17 Aug 2007 04:04:23 -0000 1.60 +++ include/pvfs2-mgmt.h 15 Sep 2007 00:27:05 -0000 @@ -142,12 +142,14 @@ PVFS_error PVFS_imgmt_noop( PVFS_credentials *credentials, PVFS_BMI_addr_t addr, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_noop( PVFS_fs_id, PVFS_credentials *credentials, - PVFS_BMI_addr_t addr); + PVFS_BMI_addr_t addr, + PVFS_hint hints); const char* PVFS_mgmt_map_addr( PVFS_fs_id fs_id, @@ -165,6 +167,7 @@ PVFS_error PVFS_imgmt_setparam_list( int count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_setparam_list( @@ -175,7 +178,8 @@ PVFS_error PVFS_mgmt_setparam_list( PVFS_BMI_addr_t *addr_array, uint64_t *old_value_array, int count, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_mgmt_setparam_all( PVFS_fs_id fs_id, @@ -183,7 +187,8 @@ PVFS_error PVFS_mgmt_setparam_all( enum PVFS_server_param param, uint64_t value, uint64_t *old_value_array, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_mgmt_setparam_single( PVFS_fs_id fs_id, @@ -192,7 +197,8 @@ PVFS_error PVFS_mgmt_setparam_single( uint64_t value, char *server_addr_str, uint64_t *old_value, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_imgmt_statfs_list( PVFS_fs_id fs_id, @@ -202,6 +208,7 @@ PVFS_error PVFS_imgmt_statfs_list( int count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_statfs_list( @@ -210,14 +217,16 @@ PVFS_error PVFS_mgmt_statfs_list( struct PVFS_mgmt_server_stat *stat_array, PVFS_BMI_addr_t *addr_array, int count, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_mgmt_statfs_all( PVFS_fs_id fs_id, PVFS_credentials *credentials, struct PVFS_mgmt_server_stat *stat_array, int *inout_count_p, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_imgmt_perf_mon_list( PVFS_fs_id fs_id, @@ -230,6 +239,7 @@ PVFS_error PVFS_imgmt_perf_mon_list( int history_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_perf_mon_list( @@ -241,7 +251,8 @@ PVFS_error PVFS_mgmt_perf_mon_list( uint32_t *next_id_array, int server_count, int history_count, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_imgmt_event_mon_list( PVFS_fs_id fs_id, @@ -252,6 +263,7 @@ PVFS_error PVFS_imgmt_event_mon_list( int event_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_event_mon_list( @@ -261,7 +273,9 @@ PVFS_error PVFS_mgmt_event_mon_list( PVFS_BMI_addr_t *addr_array, int server_count, int event_count, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); + PVFS_error PVFS_imgmt_iterate_handles_list( PVFS_fs_id fs_id, @@ -273,6 +287,7 @@ PVFS_error PVFS_imgmt_iterate_handles_li int server_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_iterate_handles_list( @@ -283,7 +298,8 @@ PVFS_error PVFS_mgmt_iterate_handles_lis PVFS_ds_position *position_array, PVFS_BMI_addr_t *addr_array, int server_count, - PVFS_error_details *details); + PVFS_error_details *details, + PVFS_hint hints); PVFS_error PVFS_imgmt_get_dfile_array( PVFS_object_ref ref, @@ -291,35 +307,41 @@ PVFS_error PVFS_imgmt_get_dfile_array( PVFS_handle *dfile_array, int dfile_count, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_get_dfile_array( PVFS_object_ref ref, PVFS_credentials *credentials, PVFS_handle *dfile_array, - int dfile_count); + int dfile_count, + PVFS_hint hints); PVFS_error PVFS_imgmt_remove_object( - PVFS_object_ref object_ref, + PVFS_object_ref object_ref, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_remove_object( - PVFS_object_ref object_ref, - PVFS_credentials *credentials); + PVFS_object_ref object_ref, + PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_imgmt_remove_dirent( PVFS_object_ref parent_ref, char *entry, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_remove_dirent( PVFS_object_ref parent_ref, char *entry, - PVFS_credentials *credentials); + PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_imgmt_create_dirent( PVFS_object_ref parent_ref, @@ -327,25 +349,29 @@ PVFS_error PVFS_imgmt_create_dirent( PVFS_handle entry_handle, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_create_dirent( PVFS_object_ref parent_ref, char *entry, PVFS_handle entry_handle, - PVFS_credentials *credentials); + PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_imgmt_get_dirdata_handle( PVFS_object_ref parent_ref, PVFS_handle *out_dirdata_handle, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_mgmt_get_dirdata_handle( PVFS_object_ref parent_ref, PVFS_handle *out_dirdata_handle, - PVFS_credentials *credentials); + PVFS_credentials *credentials, + PVFS_hint hints); int PVFS_mgmt_wait( PVFS_mgmt_op_id op_id, Index: include/pvfs2-sysint.h =================================================================== RCS file: /projects/cvsroot/pvfs2/include/pvfs2-sysint.h,v retrieving revision 1.74 diff -u -a -p -r1.74 pvfs2-sysint.h --- include/pvfs2-sysint.h 12 Jul 2007 19:20:25 -0000 1.74 +++ include/pvfs2-sysint.h 15 Sep 2007 00:27:05 -0000 @@ -250,6 +250,7 @@ PVFS_error PVFS_isys_ref_lookup( PVFS_sysresp_lookup * resp, int32_t follow_link, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_ref_lookup( @@ -258,14 +259,16 @@ PVFS_error PVFS_sys_ref_lookup( PVFS_object_ref parent_ref, const PVFS_credentials *credentials, PVFS_sysresp_lookup * resp, - int32_t follow_link); + int32_t follow_link, + PVFS_hint hints); PVFS_error PVFS_sys_lookup( PVFS_fs_id fs_id, char *name, const PVFS_credentials *credentials, PVFS_sysresp_lookup * resp, - int32_t follow_link); + int32_t follow_link, + PVFS_hint hints); PVFS_error PVFS_isys_getattr( PVFS_object_ref ref, @@ -273,25 +276,29 @@ PVFS_error PVFS_isys_getattr( const PVFS_credentials *credentials, PVFS_sysresp_getattr *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_getattr( PVFS_object_ref ref, uint32_t attrmask, const PVFS_credentials *credentials, - PVFS_sysresp_getattr *resp); + PVFS_sysresp_getattr *resp, + PVFS_hint hints); PVFS_error PVFS_isys_setattr( PVFS_object_ref ref, PVFS_sys_attr attr, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_setattr( PVFS_object_ref ref, PVFS_sys_attr attr, - const PVFS_credentials *credentials); + const PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_isys_mkdir( char *entry_name, @@ -300,6 +307,7 @@ PVFS_error PVFS_isys_mkdir( const PVFS_credentials *credentials, PVFS_sysresp_mkdir *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_mkdir( @@ -307,7 +315,8 @@ PVFS_error PVFS_sys_mkdir( PVFS_object_ref parent_ref, PVFS_sys_attr attr, const PVFS_credentials *credentials, - PVFS_sysresp_mkdir *resp); + PVFS_sysresp_mkdir *resp, + PVFS_hint hints); PVFS_error PVFS_isys_readdir( PVFS_object_ref ref, @@ -316,6 +325,7 @@ PVFS_error PVFS_isys_readdir( const PVFS_credentials *credentials, PVFS_sysresp_readdir *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_readdir( @@ -323,7 +333,8 @@ PVFS_error PVFS_sys_readdir( PVFS_ds_position token, int32_t pvfs_dirent_incount, const PVFS_credentials *credentials, - PVFS_sysresp_readdir *resp); + PVFS_sysresp_readdir *resp, + PVFS_hint hints); PVFS_error PVFS_isys_readdirplus( PVFS_object_ref ref, @@ -333,6 +344,7 @@ PVFS_error PVFS_isys_readdirplus( uint32_t attrmask, PVFS_sysresp_readdirplus *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_readdirplus( @@ -341,7 +353,8 @@ PVFS_error PVFS_sys_readdirplus( int32_t pvfs_dirent_incount, const PVFS_credentials *credentials, uint32_t attrmask, - PVFS_sysresp_readdirplus *resp); + PVFS_sysresp_readdirplus *resp, + PVFS_hint hints); PVFS_error PVFS_isys_create( char *entry_name, @@ -352,6 +365,7 @@ PVFS_error PVFS_isys_create( PVFS_sys_layout *layout, PVFS_sysresp_create *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_create( @@ -360,20 +374,23 @@ PVFS_error PVFS_sys_create( PVFS_sys_attr attr, const PVFS_credentials *credentials, PVFS_sys_dist *dist, + PVFS_sysresp_create *resp, PVFS_sys_layout *layout, - PVFS_sysresp_create *resp); + PVFS_hint hints); PVFS_error PVFS_isys_remove( char *entry_name, PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_remove( char *entry_name, PVFS_object_ref ref, - const PVFS_credentials *credentials); + const PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_isys_rename( char *old_entry, @@ -382,6 +399,7 @@ PVFS_error PVFS_isys_rename( PVFS_object_ref new_parent_ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_rename( @@ -389,7 +407,8 @@ PVFS_error PVFS_sys_rename( PVFS_object_ref old_parent_ref, char *new_entry, PVFS_object_ref new_parent_ref, - const PVFS_credentials *credentials); + const PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_isys_symlink( char *entry_name, @@ -399,6 +418,7 @@ PVFS_error PVFS_isys_symlink( const PVFS_credentials *credentials, PVFS_sysresp_symlink *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_symlink( @@ -407,7 +427,8 @@ PVFS_error PVFS_sys_symlink( char *target, PVFS_sys_attr attr, const PVFS_credentials *credentials, - PVFS_sysresp_symlink *resp); + PVFS_sysresp_symlink *resp, + PVFS_hint hints); PVFS_error PVFS_isys_io( PVFS_object_ref ref, @@ -419,6 +440,7 @@ PVFS_error PVFS_isys_io( PVFS_sysresp_io *resp, enum PVFS_io_type type, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); #define PVFS_isys_read(x1,x2,x3,x4,x5,x6,y) \ @@ -435,53 +457,61 @@ PVFS_error PVFS_sys_io( PVFS_Request mem_req, const PVFS_credentials *credentials, PVFS_sysresp_io *resp, - enum PVFS_io_type type); + enum PVFS_io_type type, + PVFS_hint hints); -#define PVFS_sys_read(x1,x2,x3,x4,x5,x6,y) \ -PVFS_sys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_READ) +#define PVFS_sys_read(x1,x2,x3,x4,x5,x6,y,z) \ +PVFS_sys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_READ,z) -#define PVFS_sys_write(x1,x2,x3,x4,x5,x6,y) \ -PVFS_sys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_WRITE) +#define PVFS_sys_write(x1,x2,x3,x4,x5,x6,y,z) \ +PVFS_sys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_WRITE,z) PVFS_error PVFS_isys_truncate( PVFS_object_ref ref, PVFS_size size, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_truncate( PVFS_object_ref ref, PVFS_size size, - const PVFS_credentials *credentials); + const PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_sys_getparent( PVFS_fs_id fs_id, char *entry_name, const PVFS_credentials *credentials, - PVFS_sysresp_getparent *resp); + PVFS_sysresp_getparent *resp, + PVFS_hint hints); PVFS_error PVFS_isys_flush( PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_flush( PVFS_object_ref ref, - const PVFS_credentials *credentials); + const PVFS_credentials *credentials, + PVFS_hint hints); PVFS_error PVFS_isys_statfs( PVFS_fs_id fs_id, const PVFS_credentials *credentials, PVFS_sysresp_statfs *statfs, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_statfs( PVFS_fs_id fs_id, const PVFS_credentials *credentials, - PVFS_sysresp_statfs *resp); + PVFS_sysresp_statfs *resp, + PVFS_hint hints); PVFS_sys_dist* PVFS_sys_dist_lookup( const char* dist_identifier); @@ -500,13 +530,15 @@ PVFS_error PVFS_isys_geteattr( PVFS_ds_keyval *key_p, PVFS_sysresp_geteattr *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_geteattr( PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, - PVFS_ds_keyval *val_p); + PVFS_ds_keyval *val_p, + PVFS_hint hints); PVFS_error PVFS_isys_geteattr_list( PVFS_object_ref ref, @@ -515,6 +547,7 @@ PVFS_error PVFS_isys_geteattr_list( PVFS_ds_keyval *key_p, PVFS_sysresp_geteattr *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_geteattr_list( @@ -522,7 +555,8 @@ PVFS_error PVFS_sys_geteattr_list( const PVFS_credentials *credentials, int32_t nkey, PVFS_ds_keyval *key_p, - PVFS_sysresp_geteattr *resp); + PVFS_sysresp_geteattr *resp, + PVFS_hint hints); PVFS_error PVFS_isys_seteattr( PVFS_object_ref ref, @@ -531,6 +565,7 @@ PVFS_error PVFS_isys_seteattr( PVFS_ds_keyval *val_p, int32_t flags, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_seteattr( @@ -538,7 +573,8 @@ PVFS_error PVFS_sys_seteattr( const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, PVFS_ds_keyval *val_p, - int32_t flags); + int32_t flags, + PVFS_hint hints); PVFS_error PVFS_isys_seteattr_list( PVFS_object_ref ref, @@ -548,6 +584,7 @@ PVFS_error PVFS_isys_seteattr_list( PVFS_ds_keyval *val_array, int32_t flags, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_seteattr_list( @@ -556,19 +593,22 @@ PVFS_error PVFS_sys_seteattr_list( int32_t nkey, PVFS_ds_keyval *key_array, PVFS_ds_keyval *val_array, - int32_t flags); + int32_t flags, + PVFS_hint hints); PVFS_error PVFS_isys_deleattr( PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_deleattr( PVFS_object_ref ref, const PVFS_credentials *credentials, - PVFS_ds_keyval *key_p); + PVFS_ds_keyval *key_p, + PVFS_hint hints); PVFS_error PVFS_isys_listeattr( PVFS_object_ref ref, @@ -577,6 +617,7 @@ PVFS_error PVFS_isys_listeattr( const PVFS_credentials *credentials, PVFS_sysresp_listeattr *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr); PVFS_error PVFS_sys_listeattr( @@ -584,7 +625,8 @@ PVFS_error PVFS_sys_listeattr( PVFS_ds_position token, int32_t nkey, const PVFS_credentials *credentials, - PVFS_sysresp_listeattr *resp); + PVFS_sysresp_listeattr *resp, + PVFS_hint hints); /* exported test functions for isys calls */ Index: include/pvfs2-types.h =================================================================== RCS file: /projects/cvsroot/pvfs2/include/pvfs2-types.h,v retrieving revision 1.144 diff -u -a -p -r1.144 pvfs2-types.h --- include/pvfs2-types.h 21 Aug 2007 02:23:02 -0000 1.144 +++ include/pvfs2-types.h 15 Sep 2007 00:27:05 -0000 @@ -65,6 +65,7 @@ /* empty stubs to turn off encoding definition generation */ #include "pvfs2-encode-stubs.h" +#include "pvfs2-hint.h" /* Basic types used throughout the code. */ typedef uint8_t PVFS_boolean; Index: src/apps/admin/pvfs2-chmod.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-chmod.c,v retrieving revision 1.4 diff -u -a -p -r1.4 pvfs2-chmod.c --- src/apps/admin/pvfs2-chmod.c 29 May 2006 16:16:36 -0000 1.4 +++ src/apps/admin/pvfs2-chmod.c 15 Sep 2007 00:27:05 -0000 @@ -108,7 +108,7 @@ int pvfs2_chmod (PVFS_permissions perms, memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -147,7 +147,7 @@ int pvfs2_chmod (PVFS_permissions perms, ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -156,7 +156,7 @@ int pvfs2_chmod (PVFS_permissions perms, memset(&resp_getattr,0,sizeof(PVFS_sysresp_getattr)); attrmask = (PVFS_ATTR_SYS_ALL_SETABLE); - ret = PVFS_sys_getattr(resp_lookup.ref,attrmask,&credentials,&resp_getattr); + ret = PVFS_sys_getattr(resp_lookup.ref,attrmask,&credentials,&resp_getattr, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_getattr",ret); @@ -168,7 +168,7 @@ int pvfs2_chmod (PVFS_permissions perms, new_attr.perms = perms; new_attr.mask = PVFS_ATTR_SYS_PERM; - ret = PVFS_sys_setattr(resp_lookup.ref,new_attr,&credentials); + ret = PVFS_sys_setattr(resp_lookup.ref,new_attr,&credentials, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_setattr",ret); Index: src/apps/admin/pvfs2-chown.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-chown.c,v retrieving revision 1.3 diff -u -a -p -r1.3 pvfs2-chown.c --- src/apps/admin/pvfs2-chown.c 29 May 2006 16:16:36 -0000 1.3 +++ src/apps/admin/pvfs2-chown.c 15 Sep 2007 00:27:05 -0000 @@ -114,7 +114,7 @@ int pvfs2_chown (PVFS_uid owner, PVFS_gi memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -153,7 +153,7 @@ int pvfs2_chown (PVFS_uid owner, PVFS_gi ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -162,7 +162,7 @@ int pvfs2_chown (PVFS_uid owner, PVFS_gi memset(&resp_getattr,0,sizeof(PVFS_sysresp_getattr)); attrmask = (PVFS_ATTR_SYS_ALL_SETABLE); - ret = PVFS_sys_getattr(resp_lookup.ref,attrmask,&credentials,&resp_getattr); + ret = PVFS_sys_getattr(resp_lookup.ref,attrmask,&credentials,&resp_getattr, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_getattr",ret); @@ -175,7 +175,7 @@ int pvfs2_chown (PVFS_uid owner, PVFS_gi new_attr.group = group; new_attr.mask = PVFS_ATTR_SYS_UID | PVFS_ATTR_SYS_GID; - ret = PVFS_sys_setattr(resp_lookup.ref,new_attr,&credentials); + ret = PVFS_sys_setattr(resp_lookup.ref,new_attr,&credentials, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_setattr",ret); Index: src/apps/admin/pvfs2-cp.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-cp.c,v retrieving revision 1.25 diff -u -a -p -r1.25 pvfs2-cp.c --- src/apps/admin/pvfs2-cp.c 19 Jul 2007 16:52:28 -0000 1.25 +++ src/apps/admin/pvfs2-cp.c 15 Sep 2007 00:27:05 -0000 @@ -25,6 +25,7 @@ #include "str-utils.h" #include "pint-sysint-utils.h" #include "pvfs2-internal.h" +#include "pvfs2-hint.h" /* optional parameters, filled in by parse_args() */ struct options @@ -70,6 +71,7 @@ typedef struct file_object_s { } u; } file_object; +static PVFS_hint hints = NULL; static struct options* parse_args(int argc, char* argv[]); static void usage(int argc, char** argv); @@ -132,6 +134,8 @@ int main (int argc, char ** argv) return(-1); } + PVFS_hint_import_env(& hints); + ret = PVFS_util_init_defaults(); if (ret < 0) { @@ -198,6 +202,7 @@ int main (int argc, char ** argv) { print_timings(time2-time1, total_written); } + ret = 0; main_out: @@ -205,6 +210,8 @@ main_out: PVFS_sys_finalize(); free(user_opts); free(buffer); + + PVFS_hint_free(hints); return(ret); } @@ -331,7 +338,7 @@ static size_t generic_read(file_object * return (ret); } ret = PVFS_sys_read(src->u.pvfs2.ref, file_req, offset, - buffer, mem_req, credentials, &resp_io); + buffer, mem_req, credentials, &resp_io, hints); if (ret == 0) { PVFS_Request_free(&mem_req); @@ -363,7 +370,7 @@ static size_t generic_write(file_object return(ret); } ret = PVFS_sys_write(dest->u.pvfs2.ref, file_req, offset, - buffer, mem_req, credentials, &resp_io); + buffer, mem_req, credentials, &resp_io, hints); if (ret == 0) { PVFS_Request_free(&mem_req); @@ -485,7 +492,7 @@ static int generic_open(file_object *obj memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(obj->u.pvfs2.fs_id, obj->u.pvfs2.pvfs2_path, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, hints); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -554,13 +561,13 @@ static int generic_open(file_object *obj memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_ref_lookup(parent_ref.fs_id, entry_name, parent_ref, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, hints); if ((ret == 0) && (open_type == OPEN_SRC)) { memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); ret = PVFS_sys_getattr(resp_lookup.ref, PVFS_ATTR_SYS_ALL_NOHINT, - credentials, &resp_getattr); + credentials, &resp_getattr, hints); if (ret) { fprintf(stderr, "Failed to do pvfs2 getattr on %s\n", @@ -630,7 +637,7 @@ static int generic_open(file_object *obj layout.algorithm = PVFS_SYS_LAYOUT_NONE; ret = PVFS_sys_create(entry_name, parent_ref, obj->u.pvfs2.attr, credentials, - new_dist, &layout, &resp_create); + new_dist, &resp_create, &layout, hints); if (ret < 0) { PVFS_perror("PVFS_sys_create", ret); @@ -664,7 +671,7 @@ static int generic_cleanup(file_object * /* preserve permissions doing a pvfs2 => pvfs2 copy */ if ((src->fs_type == PVFS2_FILE) && (dest->fs_type == PVFS2_FILE)) { - PVFS_sys_setattr(dest->u.pvfs2.ref, src->u.pvfs2.attr, credentials); + PVFS_sys_setattr(dest->u.pvfs2.ref, src->u.pvfs2.attr, credentials, hints); } if ((src->fs_type == UNIX_FILE) && (src->u.ufs.fd != -1)) Index: src/apps/admin/pvfs2-event-mon-example.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-event-mon-example.c,v retrieving revision 1.16 diff -u -a -p -r1.16 pvfs2-event-mon-example.c --- src/apps/admin/pvfs2-event-mon-example.c 10 Nov 2005 01:26:56 -0000 1.16 +++ src/apps/admin/pvfs2-event-mon-example.c 15 Sep 2007 00:27:05 -0000 @@ -129,7 +129,8 @@ int main(int argc, char **argv) addr_array, io_server_count, EVENT_DEPTH, - NULL /* detailed errors */); + NULL /* detailed errors */ + , NULL); if (ret < 0) { PVFS_perror("PVFS_mgmt_event_mon_list", EVENT_DEPTH); Index: src/apps/admin/pvfs2-fs-dump.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-fs-dump.c,v retrieving revision 1.43 diff -u -a -p -r1.43 pvfs2-fs-dump.c --- src/apps/admin/pvfs2-fs-dump.c 16 Jun 2006 21:01:11 -0000 1.43 +++ src/apps/admin/pvfs2-fs-dump.c 15 Sep 2007 00:27:05 -0000 @@ -174,7 +174,8 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL /* detailed errors */); + NULL /* detailed errors */ + , NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_setparam_list", ret); @@ -185,7 +186,7 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL); + NULL, NULL); return(-1); } @@ -221,7 +222,7 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL); + NULL, NULL); PVFS_sys_finalize(); @@ -254,7 +255,7 @@ int build_handlelist(PVFS_fs_id cur_fs, addr_array, NULL, server_count, - NULL); + NULL, NULL); return -1; } @@ -263,7 +264,8 @@ int build_handlelist(PVFS_fs_id cur_fs, stat_array, addr_array, server_count, - NULL /* details */); + NULL /* details */ + , NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_statfs_list", ret); @@ -274,7 +276,7 @@ int build_handlelist(PVFS_fs_id cur_fs, addr_array, NULL, server_count, - NULL); + NULL, NULL); return -1; } @@ -348,7 +350,8 @@ int build_handlelist(PVFS_fs_id cur_fs, position_array, addr_array, server_count, - NULL /* details */); + NULL /* details */ + , NULL); if (ret < 0) { PVFS_perror("PVFS_mgmt_iterate_handles_list", ret); @@ -359,7 +362,7 @@ int build_handlelist(PVFS_fs_id cur_fs, addr_array, NULL, server_count, - NULL); + NULL, NULL); return -1; } @@ -434,14 +437,14 @@ int traverse_directory_tree(PVFS_fs_id c PVFS_object_ref pref; PVFS_sys_lookup(cur_fs, "/", creds, - &lookup_resp, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &lookup_resp, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); /* lookup_resp.pinode_refn.handle gets root handle */ pref = lookup_resp.ref; PVFS_sys_getattr(pref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); if (getattr_resp.attr.objtype != PVFS_TYPE_DIRECTORY) { @@ -490,7 +493,7 @@ int descend(PVFS_fs_id cur_fs, (!token ? PVFS_READDIR_START : token), count, creds, - &readdir_resp); + &readdir_resp, NULL); for (i = 0; i < readdir_resp.pvfs_dirent_outcount; i++) { @@ -507,7 +510,7 @@ int descend(PVFS_fs_id cur_fs, if ((ret = PVFS_sys_getattr(entry_ref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp)) != 0) + &getattr_resp, NULL)) != 0) { printf("Could not get attributes of handle %llu [%d]\n", llu(cur_handle), ret); @@ -585,7 +588,7 @@ void verify_datafiles(PVFS_fs_id cur_fs, printf("invalid value of number of datafiles = %d\n", df_count); assert(0); } - ret = PVFS_mgmt_get_dfile_array(mf_ref, creds, df_handles, df_count); + ret = PVFS_mgmt_get_dfile_array(mf_ref, creds, df_handles, df_count, NULL); if (ret != 0) { assert(0); @@ -638,7 +641,7 @@ void analyze_remaining_handles(PVFS_fs_i /* only remaining handles are dirdata */ PVFS_sys_getattr(entry_ref, PVFS_ATTR_SYS_ALL, - creds, &getattr_resp); + creds, &getattr_resp, NULL); if (getattr_resp.attr.objtype != PVFS_TYPE_DIRDATA) { flag = 0; Index: src/apps/admin/pvfs2-fsck.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-fsck.c,v retrieving revision 1.22 diff -u -a -p -r1.22 pvfs2-fsck.c --- src/apps/admin/pvfs2-fsck.c 2 Feb 2007 02:08:55 -0000 1.22 +++ src/apps/admin/pvfs2-fsck.c 15 Sep 2007 00:27:05 -0000 @@ -130,7 +130,8 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL /* detailed errors */); + NULL /* detailed errors */ + , NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_setparam_list", ret); @@ -185,7 +186,7 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL); + NULL, NULL); in_admin_mode = 0; /* third pass moves salvagable objects into lost+found: @@ -220,7 +221,7 @@ int main(int argc, char **argv) addr_array, NULL, server_count, - NULL); + NULL, NULL); } PVFS_sys_finalize(); @@ -258,7 +259,7 @@ struct handlelist *build_handlelist(PVFS addr_array, NULL, server_count, - NULL); + NULL, NULL); return NULL; } @@ -267,7 +268,8 @@ struct handlelist *build_handlelist(PVFS stat_array, addr_array, server_count, - NULL /* details */); + NULL /* details */ + , NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_statfs_list", ret); @@ -278,7 +280,7 @@ struct handlelist *build_handlelist(PVFS addr_array, NULL, server_count, - NULL); + NULL, NULL); return NULL; } @@ -353,7 +355,7 @@ struct handlelist *build_handlelist(PVFS position_array, addr_array, server_count, - NULL /* details */); + NULL /* details */, NULL); if (ret < 0) { PVFS_perror("PVFS_mgmt_iterate_handles_list", ret); @@ -364,7 +366,7 @@ struct handlelist *build_handlelist(PVFS addr_array, NULL, server_count, - NULL); + NULL, NULL); return NULL; } @@ -443,7 +445,7 @@ int traverse_directory_tree(PVFS_fs_id c "/", creds, &lookup_resp, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); assert(ret == 0); pref = lookup_resp.ref; @@ -451,7 +453,7 @@ int traverse_directory_tree(PVFS_fs_id c PVFS_sys_getattr(pref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); assert(getattr_resp.attr.objtype == PVFS_TYPE_DIRECTORY); @@ -486,7 +488,7 @@ int match_dirdata(struct handlelist *hl, ret = PVFS_mgmt_get_dirdata_handle(dir_ref, &dirdata_handle, - creds); + creds, NULL); if (ret != 0) { PVFS_perror("match_dirdata", ret); @@ -530,7 +532,7 @@ int descend(PVFS_fs_id cur_fs, (!token ? PVFS_READDIR_START : token), count, creds, - &readdir_resp); + &readdir_resp, NULL); for (i = 0; i < readdir_resp.pvfs_dirent_outcount; i++) { @@ -569,7 +571,7 @@ int descend(PVFS_fs_id cur_fs, ret = PVFS_sys_getattr(entry_ref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); if (ret != 0) { ret = remove_directory_entry(dir_ref, entry_ref, @@ -706,7 +708,7 @@ int verify_datafiles(PVFS_fs_id cur_fs, { assert(0); } - ret = PVFS_mgmt_get_dfile_array(mf_ref, creds, df_handles, df_count); + ret = PVFS_mgmt_get_dfile_array(mf_ref, creds, df_handles, df_count, NULL); if (ret != 0) { /* what does this mean? */ @@ -799,7 +801,7 @@ struct handlelist *find_sub_trees(PVFS_f ret = PVFS_sys_getattr(handle_ref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); if (ret) { /* remove anything we can't get attributes on */ ret = remove_object(handle_ref, @@ -880,7 +882,7 @@ struct handlelist *fill_lost_and_found(P ret = PVFS_sys_getattr(handle_ref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); if (ret) { printf("warning: problem calling getattr on %llu; assuming datafile for now.\n", llu(handle)); @@ -991,7 +993,7 @@ void cull_leftovers(PVFS_fs_id cur_fs, ret = PVFS_sys_getattr(handle_ref, PVFS_ATTR_SYS_ALL_NOHINT, creds, - &getattr_resp); + &getattr_resp, NULL); if (ret) { printf("warning: problem calling getattr on %llu\n", llu(handle)); @@ -1027,7 +1029,7 @@ int create_lost_and_found(PVFS_fs_id cur "/lost+found", creds, &lookup_resp, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret == 0) { laf_ref = lookup_resp.ref; return 0; @@ -1043,7 +1045,7 @@ int create_lost_and_found(PVFS_fs_id cur "/", creds, &lookup_resp, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); assert(ret == 0); root_ref = lookup_resp.ref; @@ -1056,7 +1058,7 @@ int create_lost_and_found(PVFS_fs_id cur root_ref, attr, creds, - &mkdir_resp); + &mkdir_resp, NULL); if (ret == 0) { laf_ref = mkdir_resp.ref; } @@ -1085,7 +1087,7 @@ int create_dirent(PVFS_object_ref dir_re ret = PVFS_mgmt_create_dirent(dir_ref, name, handle, - creds); + creds, NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_create_dirent", ret); } @@ -1113,7 +1115,7 @@ int remove_directory_entry(PVFS_object_r if (fsck_opts->destructive) { ret = PVFS_mgmt_remove_dirent(dir_ref, name, - creds); + creds, NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_remove_dirent", ret); } @@ -1138,7 +1140,7 @@ int remove_object(PVFS_object_ref obj_re if (fsck_opts->destructive) { ret = PVFS_mgmt_remove_object(obj_ref, - creds); + creds, NULL); if (ret != 0) { PVFS_perror("PVFS_mgmt_remove_object", ret); } @@ -1523,4 +1525,3 @@ static char *get_type_str(int type) * * vim: ts=8 sts=4 sw=4 expandtab */ - Index: src/apps/admin/pvfs2-ln.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ln.c,v retrieving revision 1.5 diff -u -a -p -r1.5 pvfs2-ln.c --- src/apps/admin/pvfs2-ln.c 16 Sep 2006 21:48:39 -0000 1.5 +++ src/apps/admin/pvfs2-ln.c 15 Sep 2007 00:27:05 -0000 @@ -187,7 +187,7 @@ static int make_link(PVFS_credentials (char *) pszLinkTarget, attr, pCredentials, - &resp_sym); + &resp_sym, NULL); if (ret < 0) { Index: src/apps/admin/pvfs2-ls.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ls.c,v retrieving revision 1.69 diff -u -a -p -r1.69 pvfs2-ls.c --- src/apps/admin/pvfs2-ls.c 2 Feb 2007 02:08:55 -0000 1.69 +++ src/apps/admin/pvfs2-ls.c 15 Sep 2007 00:27:05 -0000 @@ -132,7 +132,7 @@ static inline void format_size_string( spaces_size_allowed = num_spaces_total; } } - + buf = (char *)malloc(spaces_size_allowed+1); assert(buf); @@ -369,7 +369,7 @@ void print_entry( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, - &credentials, &getattr_response); + &credentials, &getattr_response, NULL); if (ret) { fprintf(stderr,"Failed to get attributes on handle %llu,%d\n", @@ -412,7 +412,7 @@ int do_list( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if(ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -425,7 +425,7 @@ int do_list( memset(&getattr_response,0,sizeof(PVFS_sysresp_getattr)); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, - &credentials, &getattr_response); + &credentials, &getattr_response, NULL); if(ret == 0) { if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) || @@ -444,7 +444,7 @@ int do_list( if (getattr_response.attr.objtype == PVFS_TYPE_DIRECTORY) { if (PVFS_sys_getparent(ref.fs_id, name, &credentials, - &getparent_resp) == 0) + &getparent_resp, NULL) == 0) { print_dot_and_dot_dot_info_if_required( getparent_resp.parent_ref); @@ -477,7 +477,7 @@ int do_list( memset(&rd_response, 0, sizeof(PVFS_sysresp_readdir)); ret = PVFS_sys_readdir( ref, (!token ? PVFS_READDIR_START : token), - pvfs_dirent_incount, &credentials, &rd_response); + pvfs_dirent_incount, &credentials, &rd_response, NULL); if(ret < 0) { PVFS_perror("PVFS_sys_readdir", ret); Index: src/apps/admin/pvfs2-lsplus.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-lsplus.c,v retrieving revision 1.4 diff -u -a -p -r1.4 pvfs2-lsplus.c --- src/apps/admin/pvfs2-lsplus.c 23 Oct 2006 15:23:19 -0000 1.4 +++ src/apps/admin/pvfs2-lsplus.c 15 Sep 2007 00:27:05 -0000 @@ -402,7 +402,7 @@ int do_list( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if(ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -415,7 +415,7 @@ int do_list( memset(&getattr_response,0,sizeof(PVFS_sysresp_getattr)); if (PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, - &credentials, &getattr_response) == 0) + &credentials, &getattr_response, NULL) == 0) { if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) || (getattr_response.attr.objtype == PVFS_TYPE_SYMLINK) || @@ -433,7 +433,7 @@ int do_list( if (getattr_response.attr.objtype == PVFS_TYPE_DIRECTORY) { if (PVFS_sys_getparent(ref.fs_id, name, &credentials, - &getparent_resp) == 0) + &getparent_resp, NULL) == 0) { print_dot_and_dot_dot_info_if_required( getparent_resp.parent_ref); @@ -465,8 +465,10 @@ int do_list( ret = PVFS_sys_readdirplus( ref, (!token ? PVFS_READDIR_START : token), pvfs_dirent_incount, &credentials, - (opts->list_long) ? PVFS_ATTR_SYS_ALL : PVFS_ATTR_SYS_ALL_NOSIZE, - &rdplus_response); + (opts->list_long) ? + PVFS_ATTR_SYS_ALL : PVFS_ATTR_SYS_ALL_NOSIZE, + &rdplus_response, + NULL); if(ret < 0) { PVFS_perror("PVFS_sys_readdir", ret); Index: src/apps/admin/pvfs2-migrate-collection.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-migrate-collection.c,v retrieving revision 1.20 diff -u -a -p -r1.20 pvfs2-migrate-collection.c --- src/apps/admin/pvfs2-migrate-collection.c 17 Aug 2007 04:04:23 -0000 1.20 +++ src/apps/admin/pvfs2-migrate-collection.c 15 Sep 2007 00:27:05 -0000 @@ -1092,7 +1092,7 @@ static int translate_dspace_attr_0_0_1( coll_id, &extent_array, &new_handle, tmp_attr->type, NULL, (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), - NULL, trove_context, &op_id); + NULL, trove_context, &op_id, NULL); while (ret == 0) { @@ -1136,7 +1136,7 @@ static int translate_dspace_attr_0_0_1( TROVE_SYNC, NULL, trove_context, - &op_id); + &op_id, NULL); while (ret == 0) { ret = trove_dspace_test( @@ -1420,7 +1420,7 @@ static int translate_keyval_db_0_0_1( state = 0; ret = trove_keyval_write( coll_id, handle, &t_key, &t_val, trove_flags, 0, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { Index: src/apps/admin/pvfs2-mkdir.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-mkdir.c,v retrieving revision 1.13 diff -u -a -p -r1.13 pvfs2-mkdir.c --- src/apps/admin/pvfs2-mkdir.c 16 Sep 2006 21:48:39 -0000 1.13 +++ src/apps/admin/pvfs2-mkdir.c 15 Sep 2007 00:27:05 -0000 @@ -237,7 +237,7 @@ static int make_directory(PVFS_credentia parentdir_ptr, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if( ret < 0 && !make_parent_dirs) @@ -275,7 +275,7 @@ static int make_directory(PVFS_credentia parentdir_ptr, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if(ret < 0) { @@ -314,7 +314,7 @@ static int make_directory(PVFS_credentia parent_ref, attr, credentials, - &resp_mkdir); + &resp_mkdir, NULL); if (ret < 0) { Index: src/apps/admin/pvfs2-perf-mon-example.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-perf-mon-example.c,v retrieving revision 1.23 diff -u -a -p -r1.23 pvfs2-perf-mon-example.c --- src/apps/admin/pvfs2-perf-mon-example.c 29 May 2006 16:16:36 -0000 1.23 +++ src/apps/admin/pvfs2-perf-mon-example.c 15 Sep 2007 00:27:05 -0000 @@ -157,7 +157,7 @@ int main(int argc, char **argv) next_id_array, io_server_count, HISTORY, - NULL); + NULL, NULL); if (ret < 0) { PVFS_perror("PVFS_mgmt_perf_mon_list", ret); Index: src/apps/admin/pvfs2-ping.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ping.c,v retrieving revision 1.52 diff -u -a -p -r1.52 pvfs2-ping.c --- src/apps/admin/pvfs2-ping.c 12 Sep 2006 00:49:29 -0000 1.52 +++ src/apps/admin/pvfs2-ping.c 15 Sep 2007 00:27:05 -0000 @@ -175,7 +175,7 @@ int main(int argc, char **argv) */ ret = PVFS_mgmt_setparam_all( cur_fs, &creds, PVFS_SERV_PARAM_FSID_CHECK, - (uint64_t)cur_fs, NULL, error_details); + (uint64_t)cur_fs, NULL, error_details, NULL); if(ret < 0) { PVFS_perror("PVFS_mgmt_setparam_all", ret); @@ -193,7 +193,7 @@ int main(int argc, char **argv) printf("\n(7) Verifying that root handle is owned by one server...\n"); ret = PVFS_sys_lookup(cur_fs, "/", &creds, - &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if(ret != 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -208,7 +208,7 @@ int main(int argc, char **argv) */ ret = PVFS_mgmt_setparam_all( cur_fs, &creds, PVFS_SERV_PARAM_ROOT_CHECK, - (uint64_t)resp_lookup.ref.handle, NULL, error_details); + (uint64_t)resp_lookup.ref.handle, NULL, error_details, NULL); if(ret < 0) { @@ -294,7 +294,7 @@ static int noop_all_servers(PVFS_fs_id f { printf(" %s ", PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); - ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i]); + ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i], NULL); if (ret == 0) { printf("Ok\n"); @@ -336,7 +336,7 @@ static int noop_all_servers(PVFS_fs_id f { printf(" %s ", PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); - ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i]); + ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i], NULL); if (ret == 0) { printf("Ok\n"); Index: src/apps/admin/pvfs2-remove-object.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-remove-object.c,v retrieving revision 1.8 diff -u -a -p -r1.8 pvfs2-remove-object.c --- src/apps/admin/pvfs2-remove-object.c 16 Sep 2006 21:48:39 -0000 1.8 +++ src/apps/admin/pvfs2-remove-object.c 15 Sep 2007 00:27:05 -0000 @@ -216,7 +216,7 @@ int main(int argc, char **argv) fprintf(stderr,"Attempting to remove object %llu,%d\n", llu(ref.handle), ref.fs_id); - ret = PVFS_mgmt_remove_object(ref, &credentials); + ret = PVFS_mgmt_remove_object(ref, &credentials, NULL); if (ret) { PVFS_perror("PVFS_mgmt_remove_object", ret); @@ -228,7 +228,7 @@ int main(int argc, char **argv) "\n", user_opts->dirent_name, llu(ref.handle), ref.fs_id); ret = PVFS_mgmt_remove_dirent( - ref, user_opts->dirent_name, &credentials); + ref, user_opts->dirent_name, &credentials, NULL); if (ret) { PVFS_perror("PVFS_mgmt_remove_dirent", ret); Index: src/apps/admin/pvfs2-rm.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-rm.c,v retrieving revision 1.10 diff -u -a -p -r1.10 pvfs2-rm.c --- src/apps/admin/pvfs2-rm.c 5 Apr 2007 20:58:36 -0000 1.10 +++ src/apps/admin/pvfs2-rm.c 15 Sep 2007 00:27:05 -0000 @@ -100,7 +100,7 @@ int main(int argc, char **argv) memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); rc = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, - &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (rc) { PVFS_perror("PVFS_sys_lookup", rc); @@ -110,7 +110,7 @@ int main(int argc, char **argv) memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); rc = PVFS_sys_getattr(resp_lookup.ref, PVFS_ATTR_SYS_TYPE, - &credentials, &resp_getattr); + &credentials, &resp_getattr, NULL); if (rc) { PVFS_perror("PVFS_sys_getattr", rc); @@ -146,7 +146,7 @@ int main(int argc, char **argv) memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); rc = PVFS_sys_lookup(cur_fs, directory, &credentials, - &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (rc) { PVFS_perror("PVFS_sys_lookup", rc); @@ -155,7 +155,7 @@ int main(int argc, char **argv) } parent_ref = resp_lookup.ref; - rc = PVFS_sys_remove(filename, parent_ref, &credentials); + rc = PVFS_sys_remove(filename, parent_ref, &credentials, NULL); if (rc) { fprintf(stderr, "Error: An error occurred while " Index: src/apps/admin/pvfs2-set-debugmask.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-set-debugmask.c,v retrieving revision 1.24 diff -u -a -p -r1.24 pvfs2-set-debugmask.c --- src/apps/admin/pvfs2-set-debugmask.c 16 Sep 2006 21:48:39 -0000 1.24 +++ src/apps/admin/pvfs2-set-debugmask.c 15 Sep 2007 00:27:05 -0000 @@ -79,7 +79,7 @@ int main(int argc, char **argv) ret = PVFS_mgmt_setparam_single( cur_fs, &creds, PVFS_SERV_PARAM_GOSSIP_MASK, user_opts->debug_mask, user_opts->single_server, - NULL, NULL); + NULL, NULL, NULL); } else { @@ -87,7 +87,7 @@ int main(int argc, char **argv) ret = PVFS_mgmt_setparam_all( cur_fs, &creds, PVFS_SERV_PARAM_GOSSIP_MASK, - user_opts->debug_mask, NULL, NULL); + user_opts->debug_mask, NULL, NULL, NULL); } if (ret) Index: src/apps/admin/pvfs2-set-eventmask.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-set-eventmask.c,v retrieving revision 1.12 diff -u -a -p -r1.12 pvfs2-set-eventmask.c --- src/apps/admin/pvfs2-set-eventmask.c 29 May 2006 16:16:36 -0000 1.12 +++ src/apps/admin/pvfs2-set-eventmask.c 15 Sep 2007 00:27:05 -0000 @@ -18,6 +18,7 @@ #include "pvfs2.h" #include "pvfs2-mgmt.h" +#include "pvfs2-event.h" #ifndef PVFS2_VERSION #define PVFS2_VERSION "Unknown" @@ -76,17 +77,17 @@ int main(int argc, char **argv) if(!user_opts->op_mask || !user_opts->api_mask) { /* turn off event logging */ - ret = PVFS_mgmt_setparam_all(cur_fs, &creds, - PVFS_SERV_PARAM_EVENT_ON, 0, NULL, NULL); + ret = PVFS_mgmt_setparam_all(cur_fs, &creds, + PVFS_SERV_PARAM_EVENT_ON, 0, NULL, NULL, NULL); } else { /* set mask */ - ret = PVFS_mgmt_setparam_all(cur_fs, &creds, - PVFS_SERV_PARAM_EVENT_MASKS, - (int64_t)(((int64_t)user_opts->op_mask << 32) + ret = PVFS_mgmt_setparam_all(cur_fs, &creds, + PVFS_SERV_PARAM_EVENT_MASKS, + (int64_t)(((int64_t)user_opts->op_mask << 32) + user_opts->api_mask), - NULL, NULL); + NULL, NULL, NULL); if(ret < 0) { PVFS_perror("PVFS_mgmt_setparam_all", ret); @@ -94,8 +95,8 @@ int main(int argc, char **argv) } /* turn on event logging */ - ret = PVFS_mgmt_setparam_all(cur_fs, &creds, - PVFS_SERV_PARAM_EVENT_ON, 1, NULL, NULL); + ret = PVFS_mgmt_setparam_all(cur_fs, &creds, + PVFS_SERV_PARAM_EVENT_ON, 1, NULL, NULL, NULL); } if(ret < 0) Index: src/apps/admin/pvfs2-set-mode.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-set-mode.c,v retrieving revision 1.13 diff -u -a -p -r1.13 pvfs2-set-mode.c --- src/apps/admin/pvfs2-set-mode.c 29 May 2006 16:16:36 -0000 1.13 +++ src/apps/admin/pvfs2-set-mode.c 15 Sep 2007 00:27:05 -0000 @@ -75,6 +75,7 @@ int main(int argc, char **argv) PVFS_SERV_PARAM_MODE, user_opts->mode, NULL, + NULL, NULL /* detailed errors */); PVFS_sys_finalize(); Index: src/apps/admin/pvfs2-set-sync.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-set-sync.c,v retrieving revision 1.3 diff -u -a -p -r1.3 pvfs2-set-sync.c --- src/apps/admin/pvfs2-set-sync.c 29 May 2006 16:16:36 -0000 1.3 +++ src/apps/admin/pvfs2-set-sync.c 15 Sep 2007 00:27:05 -0000 @@ -79,6 +79,7 @@ int main(int argc, char **argv) &creds, PVFS_SERV_PARAM_SYNC_META, user_opts->meta_sync, + NULL, NULL, NULL /* detailed errors */); if(ret < 0) @@ -92,6 +93,7 @@ int main(int argc, char **argv) PVFS_SERV_PARAM_SYNC_DATA, user_opts->data_sync, NULL, + NULL, NULL /* detailed errors */); if(ret < 0) { Index: src/apps/admin/pvfs2-showcoll.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-showcoll.c,v retrieving revision 1.24 diff -u -a -p -r1.24 pvfs2-showcoll.c --- src/apps/admin/pvfs2-showcoll.c 18 Oct 2006 16:01:10 -0000 1.24 +++ src/apps/admin/pvfs2-showcoll.c 15 Sep 2007 00:27:05 -0000 @@ -295,7 +295,7 @@ static int print_dspace(TROVE_coll_id co 0 /* flags */, NULL /* user ptr */, trove_context, - &op_id); + &op_id, NULL); while (ret == 0) { ret = trove_dspace_test( coll_id, op_id, trove_context, &opcount, NULL, NULL, &state, @@ -374,7 +374,7 @@ static int print_dspace_keyvals(TROVE_co NULL /* vtag */, NULL /* user ptr */, trove_context, - &op_id); + &op_id, NULL); while (ret == 0) ret = trove_dspace_test( coll_id, op_id, trove_context, &opcount, NULL, NULL, &state, Index: src/apps/admin/pvfs2-stat.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-stat.c,v retrieving revision 1.9 diff -u -a -p -r1.9 pvfs2-stat.c --- src/apps/admin/pvfs2-stat.c 26 Sep 2006 03:44:15 -0000 1.9 +++ src/apps/admin/pvfs2-stat.c 15 Sep 2007 00:27:05 -0000 @@ -200,7 +200,7 @@ static int do_stat(const char (char *) pszRelativeFile, (PVFS_credentials *) credentials, &lk_response, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); } else { @@ -208,7 +208,7 @@ static int do_stat(const char (char *) pszRelativeFile, (PVFS_credentials *) credentials, &lk_response, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); } if(ret < 0) @@ -227,7 +227,7 @@ static int do_stat(const char ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, (PVFS_credentials *) credentials, - &getattr_response); + &getattr_response, NULL); if(ret < 0) { Index: src/apps/admin/pvfs2-statfs.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-statfs.c,v retrieving revision 1.31 diff -u -a -p -r1.31 pvfs2-statfs.c --- src/apps/admin/pvfs2-statfs.c 29 May 2006 16:16:36 -0000 1.31 +++ src/apps/admin/pvfs2-statfs.c 15 Sep 2007 00:27:05 -0000 @@ -84,7 +84,7 @@ int main(int argc, char **argv) PVFS_util_gen_credentials(&creds); /* gather normal statfs statistics from system interface */ - ret = PVFS_sys_statfs(cur_fs, &creds, &resp_statfs); + ret = PVFS_sys_statfs(cur_fs, &creds, &resp_statfs, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_statfs", ret); @@ -146,7 +146,7 @@ int main(int argc, char **argv) outcount = resp_statfs.server_count; ret = PVFS_mgmt_statfs_all(cur_fs, &creds, stat_array, - &outcount, NULL); + &outcount, NULL, NULL); for(j = 0; j<2; j++) { Index: src/apps/admin/pvfs2-touch.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-touch.c,v retrieving revision 1.4 diff -u -a -p -r1.4 pvfs2-touch.c --- src/apps/admin/pvfs2-touch.c 6 Jul 2007 05:23:20 -0000 1.4 +++ src/apps/admin/pvfs2-touch.c 15 Sep 2007 00:27:05 -0000 @@ -97,7 +97,7 @@ int main(int argc, char **argv) memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); rc = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, - &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (rc) { PVFS_perror("PVFS_sys_lookup", rc); @@ -122,8 +122,7 @@ int main(int argc, char **argv) attr, &credentials, NULL, - NULL, - &resp_create); + &resp_create, NULL, NULL); if (rc) { fprintf(stderr, "Error: An error occurred while creating %s\n", Index: src/apps/admin/pvfs2-validate.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-validate.c,v retrieving revision 1.2 diff -u -a -p -r1.2 pvfs2-validate.c --- src/apps/admin/pvfs2-validate.c 2 Jan 2007 17:10:35 -0000 1.2 +++ src/apps/admin/pvfs2-validate.c 15 Sep 2007 00:27:05 -0000 @@ -141,7 +141,7 @@ int main(int argc, char **argv) cur_fs, pvfs_path, &creds, &lookup_resp, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { Index: src/apps/admin/pvfs2-viewdist.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-viewdist.c,v retrieving revision 1.16 diff -u -a -p -r1.16 pvfs2-viewdist.c --- src/apps/admin/pvfs2-viewdist.c 15 Aug 2007 16:39:21 -0000 1.16 +++ src/apps/admin/pvfs2-viewdist.c 15 Sep 2007 00:27:05 -0000 @@ -91,7 +91,7 @@ static int generic_dist(file_object *obj { char *buffer = (char *) malloc(4096); int ret; - + if (obj->fs_type == UNIX_FILE) { #ifndef HAVE_FGETXATTR_EXTRA_ARGS @@ -113,8 +113,8 @@ static int generic_dist(file_object *obj key.buffer_sz = strlen(DIST_KEY) + 1; val.buffer = buffer; val.buffer_sz = 4096; - if ((ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, - creds, &key, &val)) < 0) + if ((ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, + creds, &key, &val, NULL)) < 0) { PVFS_perror("PVFS_sys_geteattr", ret); return -1; @@ -137,7 +137,7 @@ static int generic_server_location(file_ char *buffer = (char *) malloc(4096); int ret, num_dfiles, count; PVFS_fs_id fsid; - + if (obj->fs_type == UNIX_FILE) { #ifndef HAVE_FGETXATTR_EXTRA_ARGS @@ -159,8 +159,8 @@ static int generic_server_location(file_ key.buffer_sz = strlen(DFILE_KEY) + 1; val.buffer = buffer; val.buffer_sz = 4096; - if ((ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, - creds, &key, &val)) < 0) + if ((ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, + creds, &key, &val, NULL)) < 0) { PVFS_perror("PVFS_sys_geteattr", ret); return -1; @@ -169,7 +169,7 @@ static int generic_server_location(file_ fsid = obj->u.pvfs2.fs_id; } /* - * At this point, we know all the dfile handles + * At this point, we know all the dfile handles */ num_dfiles = (ret / sizeof(PVFS_handle)); count = num_dfiles < *nservers ? num_dfiles : *nservers; @@ -212,6 +212,7 @@ int main(int argc, char ** argv) PVFS_credentials credentials; char *servers[256]; PVFS_handle handles[256]; + char metadataserver[256]; int i, nservers = 256; memset(&dist, 0, sizeof(dist)); @@ -258,10 +259,21 @@ int main(int argc, char ** argv) printf("dist_name = %s\n", dist->dist_name); printf("dist_params:\n%s\n", dist->methods->params_string(dist->params)); PINT_dist_free(dist); + + + ret = PINT_cached_config_get_server_name(metadataserver, 256, + src.u.pvfs2.ref.handle, src.u.pvfs2.ref.fs_id); + if( ret != 0) + { + fprintf(stderr, "Error, could not get metadataserver name\n"); + return (-1); + } + printf("Metadataserver: %s\n", metadataserver); + printf("Number of datafiles/servers = %d\n", nservers); for (i = 0; i < nservers; i++) { - printf("Server %d - %s, handle: %llu (%08llx.bstream)\n", i, servers[i], + printf("Datafile %d - %s, handle: %llu (%08llx.bstream)\n", i, servers[i], llu(handles[i]), llu(handles[i])); free(servers[i]); } @@ -380,18 +392,18 @@ static int generic_open(file_object *obj perror("fstatfs:"); fprintf(stderr, "could not fstatfs %s\n", obj->u.ufs.path); } - memcpy(&obj->u.ufs.fs_id, &PINT_statfs_fsid(&statfsbuf), + memcpy(&obj->u.ufs.fs_id, &PINT_statfs_fsid(&statfsbuf), sizeof(PINT_statfs_fsid(&statfsbuf))); return 0; } else { memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); - ret = PVFS_sys_lookup(obj->u.pvfs2.fs_id, + ret = PVFS_sys_lookup(obj->u.pvfs2.fs_id, (char *) obj->u.pvfs2.pvfs2_path, - credentials, + credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -402,7 +414,7 @@ static int generic_open(file_object *obj memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, - credentials, &resp_getattr); + credentials, &resp_getattr, NULL); if (ret) { fprintf(stderr, "Failed to do pvfs2 getattr on %s\n", Index: src/apps/admin/pvfs2-xattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-xattr.c,v retrieving revision 1.6 diff -u -a -p -r1.6 pvfs2-xattr.c --- src/apps/admin/pvfs2-xattr.c 19 Aug 2007 18:20:26 -0000 1.6 +++ src/apps/admin/pvfs2-xattr.c 15 Sep 2007 00:27:05 -0000 @@ -248,10 +248,10 @@ static int pvfs2_eattr(int get, file_obj { if (get == 1) { - ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, creds, key_p, val_p); + ret = PVFS_sys_geteattr(obj->u.pvfs2.ref, creds, key_p, val_p, NULL); } else { - ret = PVFS_sys_seteattr(obj->u.pvfs2.ref, creds, key_p, val_p, 0); + ret = PVFS_sys_seteattr(obj->u.pvfs2.ref, creds, key_p, val_p, 0, NULL); } if (ret < 0) @@ -415,7 +415,7 @@ static int generic_open(file_object *obj (char *) obj->u.pvfs2.pvfs2_path, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -426,7 +426,7 @@ static int generic_open(file_object *obj memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, - credentials, &resp_getattr); + credentials, &resp_getattr, NULL); if (ret) { fprintf(stderr, "Failed to do pvfs2 getattr on %s\n", Index: src/apps/karma/comm.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/karma/comm.c,v retrieving revision 1.30 diff -u -a -p -r1.30 comm.c --- src/apps/karma/comm.c 23 May 2006 18:26:27 -0000 1.30 +++ src/apps/karma/comm.c 15 Sep 2007 00:27:05 -0000 @@ -351,7 +351,7 @@ static int gui_comm_stats_collect( &creds, internal_stats, internal_addrs, - internal_stat_ct, internal_details); + internal_stat_ct, internal_details, NULL); if (ret == 0) return 0; else if (ret == -PVFS_EDETAIL) @@ -408,7 +408,8 @@ static int gui_comm_perf_collect( internal_addrs, internal_perf_ids, internal_addr_ct, - GUI_COMM_PERF_HISTORY, internal_details); + GUI_COMM_PERF_HISTORY, internal_details, + NULL); if (ret == 0) return 0; else if (ret == -PVFS_EDETAIL) Index: src/apps/kernel/linux/pvfs2-client-core.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/kernel/linux/pvfs2-client-core.c,v retrieving revision 1.88 diff -u -a -p -r1.88 pvfs2-client-core.c --- src/apps/kernel/linux/pvfs2-client-core.c 15 Aug 2007 18:43:06 -0000 1.88 +++ src/apps/kernel/linux/pvfs2-client-core.c 15 Sep 2007 00:27:05 -0000 @@ -92,6 +92,7 @@ typedef struct char* gossip_mask; int logstamp_type; int logstamp_type_set; + int create_request_id; int standalone; /* kernel module buffer size settings */ unsigned int dev_buffer_count; @@ -123,7 +124,8 @@ typedef struct job_status_s jstat; struct PINT_dev_unexp_info info; - + PVFS_hint * hints; + /* iox requests may post multiple operations at one shot */ int num_ops, num_incomplete_ops; PVFS_sys_op_id op_id; @@ -189,6 +191,7 @@ static struct PINT_dev_params s_desc_par static struct PINT_perf_counter* acache_pc = NULL; static struct PINT_perf_counter* ncache_pc = NULL; +static char hostname[100]; /* used only for deleting all allocated vfs_request objects */ vfs_request_t *s_vfs_request_array[MAX_NUM_OPS] = {NULL}; @@ -209,12 +212,15 @@ static int set_acache_parameters(options static void set_device_parameters(options_t *s_opts); static void reset_ncache_timeout(void); static int set_ncache_parameters(options_t* s_opts); +static int create_request_id(PVFS_hint ** hint, vfs_request_t *vfs_request); static PVFS_object_ref perform_lookup_on_create_error( PVFS_object_ref parent, char *entry_name, PVFS_credentials *credentials, - int follow_link); + int follow_link, + PVFS_hint * hints + ); static int write_device_response( void *buffer_list, @@ -416,6 +422,27 @@ static void finalize_ops_in_progress_tab } } +#define REQ_LENGTH 100 +static int create_request_id(PVFS_hint ** hint, vfs_request_t *vfs_request) +{ + if (s_opts.create_request_id) + { + char str[REQ_LENGTH]; + if( vfs_request->in_upcall.tgid != -1 ){ + snprintf(str, REQ_LENGTH, "host:%s,pid:%d,tgid:%d", + hostname, vfs_request->in_upcall.pid, + vfs_request->in_upcall.tgid); + }else{ + snprintf(str, REQ_LENGTH, "host:%s,pid:%d", + hostname, vfs_request->in_upcall.pid); + } + + str[REQ_LENGTH-1] = 0; + PVFS_add_hint(hint, REQUEST_ID, str); + } + return 0; +} + static void *exec_remount(void *ptr) { pthread_mutex_lock(&remount_mutex); @@ -462,6 +489,7 @@ static inline void log_operation_timing( static PVFS_error post_lookup_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; + PVFS_hint * hints = NULL; gossip_debug( GOSSIP_CLIENTCORE_DEBUG, @@ -470,6 +498,7 @@ static PVFS_error post_lookup_request(vf vfs_request->in_upcall.req.lookup.parent_refn.fs_id, llu(vfs_request->in_upcall.req.lookup.parent_refn.handle)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_ref_lookup( vfs_request->in_upcall.req.lookup.parent_refn.fs_id, vfs_request->in_upcall.req.lookup.d_name, @@ -477,7 +506,8 @@ static PVFS_error post_lookup_request(vf &vfs_request->in_upcall.credentials, &vfs_request->response.lookup, vfs_request->in_upcall.req.lookup.sym_follow, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -493,21 +523,24 @@ static PVFS_error post_lookup_request(vf static PVFS_error post_create_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a create request for %s (fsid %d | parent %llu)\n", vfs_request->in_upcall.req.create.d_name, vfs_request->in_upcall.req.create.parent_refn.fs_id, llu(vfs_request->in_upcall.req.create.parent_refn.handle)); - + + create_request_id(& hints, vfs_request); ret = PVFS_isys_create( vfs_request->in_upcall.req.create.d_name, vfs_request->in_upcall.req.create.parent_refn, vfs_request->in_upcall.req.create.attributes, &vfs_request->in_upcall.credentials, NULL, NULL, &vfs_request->response.create, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -519,7 +552,8 @@ static PVFS_error post_create_request(vf static PVFS_error post_symlink_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a symlink request from %s (fsid %d | parent %llu) to %s\n", @@ -527,7 +561,8 @@ static PVFS_error post_symlink_request(v vfs_request->in_upcall.req.sym.parent_refn.fs_id, llu(vfs_request->in_upcall.req.sym.parent_refn.handle), vfs_request->in_upcall.req.sym.target); - + + create_request_id(& hints, vfs_request); ret = PVFS_isys_symlink( vfs_request->in_upcall.req.sym.entry_name, vfs_request->in_upcall.req.sym.parent_refn, @@ -535,8 +570,9 @@ static PVFS_error post_symlink_request(v vfs_request->in_upcall.req.sym.attributes, &vfs_request->in_upcall.credentials, &vfs_request->response.symlink, - &vfs_request->op_id, (void *)vfs_request); - + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; + if (ret < 0) { PVFS_perror_gossip("Posting symlink create failed", ret); @@ -547,19 +583,22 @@ static PVFS_error post_symlink_request(v static PVFS_error post_getattr_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a getattr request for fsid %d | handle %llu\n", vfs_request->in_upcall.req.getattr.refn.fs_id, llu(vfs_request->in_upcall.req.getattr.refn.handle)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_getattr( vfs_request->in_upcall.req.getattr.refn, vfs_request->in_upcall.req.getattr.mask, &vfs_request->in_upcall.credentials, &vfs_request->response.getattr, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -571,7 +610,8 @@ static PVFS_error post_getattr_request(v static PVFS_error post_setattr_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a setattr request for fsid %d | handle %llu [mask %d]\n", @@ -579,11 +619,13 @@ static PVFS_error post_setattr_request(v llu(vfs_request->in_upcall.req.setattr.refn.handle), vfs_request->in_upcall.req.setattr.attributes.mask); + create_request_id(& hints, vfs_request); ret = PVFS_isys_setattr( vfs_request->in_upcall.req.setattr.refn, vfs_request->in_upcall.req.setattr.attributes, &vfs_request->in_upcall.credentials, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -595,7 +637,8 @@ static PVFS_error post_setattr_request(v static PVFS_error post_remove_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a remove request for %s under fsid %d and " @@ -603,11 +646,13 @@ static PVFS_error post_remove_request(vf vfs_request->in_upcall.req.remove.parent_refn.fs_id, llu(vfs_request->in_upcall.req.remove.parent_refn.handle)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_remove( vfs_request->in_upcall.req.remove.d_name, vfs_request->in_upcall.req.remove.parent_refn, &vfs_request->in_upcall.credentials, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -619,7 +664,8 @@ static PVFS_error post_remove_request(vf static PVFS_error post_mkdir_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a mkdir request for %s (fsid %d | parent %llu)\n", @@ -627,13 +673,15 @@ static PVFS_error post_mkdir_request(vfs vfs_request->in_upcall.req.mkdir.parent_refn.fs_id, llu(vfs_request->in_upcall.req.mkdir.parent_refn.handle)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_mkdir( vfs_request->in_upcall.req.mkdir.d_name, vfs_request->in_upcall.req.mkdir.parent_refn, vfs_request->in_upcall.req.mkdir.attributes, &vfs_request->in_upcall.credentials, &vfs_request->response.mkdir, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -645,20 +693,23 @@ static PVFS_error post_mkdir_request(vfs static PVFS_error post_readdir_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug(GOSSIP_CLIENTCORE_DEBUG, "Got a readdir request " "for %llu,%d (token %llu)\n", llu(vfs_request->in_upcall.req.readdir.refn.handle), vfs_request->in_upcall.req.readdir.refn.fs_id, llu(vfs_request->in_upcall.req.readdir.token)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_readdir( vfs_request->in_upcall.req.readdir.refn, vfs_request->in_upcall.req.readdir.token, vfs_request->in_upcall.req.readdir.max_dirent_count, &vfs_request->in_upcall.credentials, &vfs_request->response.readdir, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -696,7 +747,8 @@ static PVFS_error post_readdirplus_reque static PVFS_error post_rename_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a rename request for %s under fsid %d and " @@ -708,13 +760,15 @@ static PVFS_error post_rename_request(vf vfs_request->in_upcall.req.rename.new_parent_refn.fs_id, llu(vfs_request->in_upcall.req.rename.new_parent_refn.handle)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_rename( vfs_request->in_upcall.req.rename.d_old_name, vfs_request->in_upcall.req.rename.old_parent_refn, vfs_request->in_upcall.req.rename.d_new_name, vfs_request->in_upcall.req.rename.new_parent_refn, &vfs_request->in_upcall.credentials, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -726,7 +780,8 @@ static PVFS_error post_rename_request(vf static PVFS_error post_truncate_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a truncate request for %llu under " "fsid %d to be size %lld\n", @@ -734,11 +789,13 @@ static PVFS_error post_truncate_request( vfs_request->in_upcall.req.truncate.refn.fs_id, lld(vfs_request->in_upcall.req.truncate.size)); + create_request_id(& hints, vfs_request); ret = PVFS_isys_truncate( vfs_request->in_upcall.req.truncate.refn, vfs_request->in_upcall.req.truncate.size, &vfs_request->in_upcall.credentials, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -750,7 +807,8 @@ static PVFS_error post_truncate_request( static PVFS_error post_getxattr_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a getxattr request for fsid %d | handle %llu\n", @@ -790,6 +848,7 @@ static PVFS_error post_getxattr_request( vfs_request->response.geteattr.val_array[0].buffer_sz = PVFS_REQ_LIMIT_VAL_LEN; + create_request_id(& hints, vfs_request); /* Remember to free these up */ ret = PVFS_isys_geteattr_list( vfs_request->in_upcall.req.getxattr.refn, @@ -798,7 +857,9 @@ static PVFS_error post_getxattr_request( &vfs_request->key, &vfs_request->response.geteattr, &vfs_request->op_id, + hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -810,7 +871,8 @@ static PVFS_error post_getxattr_request( static PVFS_error post_setxattr_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a setxattr request for fsid %d | handle %llu\n", @@ -829,6 +891,7 @@ static PVFS_error post_setxattr_request( vfs_request->val.buffer_sz = vfs_request->in_upcall.req.setxattr.keyval.val_sz; + create_request_id(& hints, vfs_request); ret = PVFS_isys_seteattr_list( vfs_request->in_upcall.req.setxattr.refn, &vfs_request->in_upcall.credentials, @@ -837,7 +900,9 @@ static PVFS_error post_setxattr_request( &vfs_request->val, vfs_request->in_upcall.req.setxattr.flags, &vfs_request->op_id, + hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -849,7 +914,8 @@ static PVFS_error post_setxattr_request( static PVFS_error post_removexattr_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a removexattr request for fsid %d | handle %llu\n", @@ -863,12 +929,15 @@ static PVFS_error post_removexattr_reque GOSSIP_CLIENTCORE_DEBUG, "removexattr key %s\n", (char *) vfs_request->key.buffer); + create_request_id(& hints, vfs_request); ret = PVFS_isys_deleattr( vfs_request->in_upcall.req.setxattr.refn, &vfs_request->in_upcall.credentials, &vfs_request->key, &vfs_request->op_id, + hints, (void *)vfs_request); + vfs_request->hints = hints; if (ret < 0) { @@ -881,7 +950,8 @@ static PVFS_error post_listxattr_request { PVFS_error ret = -PVFS_EINVAL; int i = 0, j = 0; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "got a listxattr request for fsid %d | handle %llu\n", @@ -923,6 +993,8 @@ static PVFS_error post_listxattr_request free(vfs_request->response.listeattr.key_array); return -PVFS_ENOMEM; } + + create_request_id(& hints, vfs_request); ret = PVFS_isys_listeattr( vfs_request->in_upcall.req.listxattr.refn, vfs_request->in_upcall.req.listxattr.token, @@ -930,8 +1002,10 @@ static PVFS_error post_listxattr_request &vfs_request->in_upcall.credentials, &vfs_request->response.listeattr, &vfs_request->op_id, + hints, (void *)vfs_request); - + vfs_request->hints = hints; + if (ret < 0) { PVFS_perror_gossip("Posting listxattr failed", ret); @@ -1333,16 +1407,19 @@ static PVFS_error service_param_request( static PVFS_error post_statfs_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a statfs request for fsid %d\n", vfs_request->in_upcall.req.statfs.fs_id); + create_request_id(& hints, vfs_request); ret = PVFS_isys_statfs( vfs_request->in_upcall.req.statfs.fs_id, &vfs_request->in_upcall.credentials, &vfs_request->response.statfs, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; vfs_request->out_downcall.status = ret; vfs_request->out_downcall.type = vfs_request->in_upcall.type; @@ -1463,7 +1540,8 @@ static PVFS_error post_io_readahead_requ static PVFS_error post_io_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + #ifdef USE_MMAP_RA_CACHE int val = 0, amt_returned = 0; void *buf = NULL; @@ -1577,6 +1655,7 @@ static PVFS_error post_io_request(vfs_re PVFS_BYTE, &vfs_request->file_req); assert(ret == 0); + create_request_id(& hints, vfs_request); ret = PVFS_isys_io( vfs_request->in_upcall.req.io.refn, vfs_request->file_req, vfs_request->in_upcall.req.io.offset, @@ -1584,7 +1663,7 @@ static PVFS_error post_io_request(vfs_re &vfs_request->in_upcall.credentials, &vfs_request->response.io, vfs_request->in_upcall.req.io.io_type, - &vfs_request->op_id, (void *)vfs_request); + &vfs_request->op_id, hints, (void *)vfs_request); if (ret < 0) { @@ -1627,6 +1706,8 @@ static PVFS_error post_iox_request(vfs_r int32_t i, num_ops_posted, iox_count, iox_index; int32_t *mem_sizes = NULL; PVFS_error ret = -PVFS_EINVAL; + PVFS_hint * hints = NULL; + struct read_write_x *rwx = (struct read_write_x *) vfs_request->in_upcall.trailer_buf; if (vfs_request->in_upcall.trailer_size <= 0 || rwx == NULL) @@ -1753,7 +1834,9 @@ static PVFS_error post_iox_request(vfs_r gossip_err("post_iox_request: request_hindexed failed\n"); break; } - /* post the I/O */ + + create_request_id(& hints, vfs_request); + /* post the I/O */ ret = PVFS_isys_io( vfs_request->in_upcall.req.iox.refn, vfs_request->file_req_a[i], 0, @@ -1762,6 +1845,7 @@ static PVFS_error post_iox_request(vfs_r &vfs_request->response.iox[i], vfs_request->in_upcall.req.iox.io_type, &vfs_request->op_ids[i], + hints, (void *)vfs_request); if (ret < 0) @@ -1857,17 +1941,20 @@ static PVFS_error service_operation_canc static PVFS_error post_fsync_request(vfs_request_t *vfs_request) { PVFS_error ret = -PVFS_EINVAL; - + PVFS_hint * hints = NULL; + gossip_debug( GOSSIP_CLIENTCORE_DEBUG, "Got a flush request for %llu,%d\n", llu(vfs_request->in_upcall.req.fsync.refn.handle), vfs_request->in_upcall.req.fsync.refn.fs_id); + create_request_id(& hints, vfs_request); ret = PVFS_isys_flush( vfs_request->in_upcall.req.fsync.refn, &vfs_request->in_upcall.credentials, - &vfs_request->op_id, (void *)vfs_request); - + &vfs_request->op_id, hints, (void *)vfs_request); + vfs_request->hints = hints; + if (ret < 0) { PVFS_perror_gossip("Posting flush failed", ret); @@ -1879,15 +1966,15 @@ static PVFS_object_ref perform_lookup_on PVFS_object_ref parent, char *entry_name, PVFS_credentials *credentials, - int follow_link) + int follow_link, + PVFS_hint * hints) { PVFS_error ret = 0; PVFS_sysresp_lookup lookup_response; PVFS_object_ref refn = { PVFS_HANDLE_NULL, PVFS_FS_ID_NULL }; - ret = PVFS_sys_ref_lookup( parent.fs_id, entry_name, parent, credentials, - &lookup_response, follow_link); + &lookup_response, follow_link, hints); if (ret) { @@ -2137,11 +2224,14 @@ static inline void package_downcall_memb */ if (*error_code == -PVFS_EEXIST) { + PVFS_hint * hints = NULL; + create_request_id(& hints, vfs_request); vfs_request->out_downcall.resp.create.refn = perform_lookup_on_create_error( vfs_request->in_upcall.req.create.parent_refn, vfs_request->in_upcall.req.create.d_name, - &vfs_request->in_upcall.credentials, 1); + &vfs_request->in_upcall.credentials, 1, hints); + vfs_request->hints = hints; if (vfs_request->out_downcall.resp.create.refn.handle == PVFS_HANDLE_NULL) @@ -2589,6 +2679,7 @@ static inline PVFS_error repost_unexp_vf PINT_dev_release_unexpected(&vfs_request->info); PINT_sys_release(vfs_request->op_id); + PVFS_free_hint(& vfs_request->hints); memset(vfs_request, 0, sizeof(vfs_request_t)); vfs_request->is_dev_unexp = 1; @@ -3111,6 +3202,16 @@ int main(int argc, char **argv) memset(&s_opts, 0, sizeof(options_t)); parse_args(argc, argv, &s_opts); + ret = gethostname(hostname, 100); + if(ret < 0) + { + if( s_opts.create_request_id ){ + fprintf(stderr, "gethostname could not determine hostname ! " + "Request ID can not transfer hostname to server \n"); + hostname[0] = 0; + } + } + if(!s_opts.standalone) { struct rlimit lim = {0,0}; @@ -3439,6 +3540,7 @@ static void print_help(char *progname) printf("--logtype=file|syslog specify writing logs to file or syslog\n"); printf("--logstamp=none|usec|datetime overrides the default log message's time stamp\n"); printf("--gossip-mask=MASK_LIST gossip logging mask\n"); + printf("--create-request-id create a id which is transfered to the server\n"); printf("--desc-count=VALUE overrides the default # of kernel buffer descriptors\n"); printf("--desc-size=VALUE overrides the default size of each kernel buffer descriptor\n"); } @@ -3466,6 +3568,7 @@ static void parse_args(int argc, char ** {"logfile",1,0,0}, {"logtype",1,0,0}, {"logstamp",1,0,0}, + {"create-request-id",0,0,0}, {"standalone",0,0,0}, {0,0,0,0} }; @@ -3640,6 +3743,10 @@ static void parse_args(int argc, char ** else if (strcmp("gossip-mask", cur_option) == 0) { opts->gossip_mask = optarg; + } + else if (strcmp("create-request-id", cur_option) == 0) + { + opts->create_request_id = 1; } else if (strcmp("standalone", cur_option) == 0) { Index: src/apps/kernel/linux/pvfs2-client.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/kernel/linux/pvfs2-client.c,v retrieving revision 1.25 diff -u -a -p -r1.25 pvfs2-client.c --- src/apps/kernel/linux/pvfs2-client.c 15 Aug 2007 18:43:06 -0000 1.25 +++ src/apps/kernel/linux/pvfs2-client.c 15 Sep 2007 00:27:05 -0000 @@ -57,6 +57,7 @@ typedef struct char *path; char *logfile; char *logstamp; + int create_request_id; char *dev_buffer_count; char *dev_buffer_size; int threaded; @@ -367,6 +368,11 @@ static int monitor_pvfs2_client(options_ arg_list[arg_index+1] = opts->logstamp; arg_index+=2; } + if(opts->create_request_id) + { + arg_list[arg_index] = "--create-request-id"; + arg_index+=1; + } if(opts->dev_buffer_count) { arg_list[arg_index] = "--desc-count"; @@ -425,6 +431,7 @@ static void print_help(char *progname) printf("--perf-time-interval-secs=SECONDS length of perf counter intervals\n"); printf("--perf-history-size=VALUE number of perf counter intervals to maintain\n"); printf("--gossip-mask=MASK_LIST gossip logging mask\n"); + printf("--create-request-id create a id which is transfered to the server\n"); printf("-p PATH, --path PATH execute pvfs2-client at " "PATH\n"); printf("--logstamp=none|usec|datetime override default log message time stamp format\n"); @@ -460,6 +467,7 @@ static void parse_args(int argc, char ** {"gossip-mask",1,0,0}, {"path",1,0,0}, {"logstamp",1,0,0}, + {"create-request-id",0,0,0}, {"threaded",0,0,0}, {0,0,0,0} }; @@ -568,6 +576,11 @@ static void parse_args(int argc, char ** { opts->gossip_mask = optarg; break; + } + else if (strcmp("create-request-id", cur_option) == 0) + { + opts->create_request_id = 1; + break; } else if (strcmp("threaded", cur_option) == 0) { Index: src/apps/vis/pvfs2-vis.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/apps/vis/pvfs2-vis.c,v retrieving revision 1.15 diff -u -a -p -r1.15 pvfs2-vis.c --- src/apps/vis/pvfs2-vis.c 28 Sep 2005 22:59:17 -0000 1.15 +++ src/apps/vis/pvfs2-vis.c 15 Sep 2007 00:27:05 -0000 @@ -179,7 +179,7 @@ int pvfs2_vis_start(char* path, int upda next_id_array, io_server_count, HISTORY, - NULL); + NULL, NULL); if (ret < 0) { return ret; @@ -294,7 +294,7 @@ static void *poll_for_updates(void *args next_id_array, server_count, history_count, - NULL); + NULL, NULL); if (ret < 0) { pint_vis_error = ret; Index: src/client/sysint/client-state-machine.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.h,v retrieving revision 1.170 diff -u -a -p -r1.170 client-state-machine.h --- src/client/sysint/client-state-machine.h 17 Aug 2007 04:04:24 -0000 1.170 +++ src/client/sysint/client-state-machine.h 15 Sep 2007 00:27:05 -0000 @@ -28,6 +28,7 @@ #include "pint-sysint-utils.h" #include "pint-perf-counter.h" #include "state-machine.h" +#include "pvfs2-hint.h" /* skip everything except #includes if __SM_CHECK_DEP is already defined; this * allows us to get the dependencies right for msgpairarray.sm which relies @@ -520,6 +521,8 @@ typedef struct PINT_client_sm /* fetch_config state used by the nested fetch config state machines */ struct PINT_server_fetch_config_sm_state fetch_config; + + PVFS_hint hints; /* msgpair array ptr used when operations can be performed * concurrently. this must be allocated within the upper-level Index: src/client/sysint/getparent.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/getparent.c,v retrieving revision 1.13 diff -u -a -p -r1.13 getparent.c --- src/client/sysint/getparent.c 16 Sep 2006 21:13:14 -0000 1.13 +++ src/client/sysint/getparent.c 15 Sep 2007 00:27:05 -0000 @@ -15,7 +15,8 @@ int PVFS_sys_getparent( PVFS_fs_id fs_id, char *entry_name, const PVFS_credentials *credentials, - PVFS_sysresp_getparent *resp) + PVFS_sysresp_getparent *resp, + PVFS_hint hints) { int ret = -PVFS_EINVAL; char parent_buf[PVFS_NAME_MAX] = {0}; @@ -38,7 +39,7 @@ int PVFS_sys_getparent( memset(&resp_look,0,sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(fs_id, parent_buf, credentials, - &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW, hints); if (ret) { gossip_err("Lookup failed on %s\n",parent_buf); Index: src/client/sysint/initialize.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/initialize.c,v retrieving revision 1.108 diff -u -a -p -r1.108 initialize.c --- src/client/sysint/initialize.c 30 Aug 2007 00:13:41 -0000 1.108 +++ src/client/sysint/initialize.c 15 Sep 2007 00:27:05 -0000 @@ -28,6 +28,7 @@ #include "src/server/request-scheduler/request-scheduler.h" #include "job-time-mgr.h" #include "pint-util.h" +#include "pint-event.h" PINT_smcb *g_smcb = NULL; @@ -82,6 +83,13 @@ int PVFS_sys_initialize(uint64_t default if (debug_file) { gossip_enable_file(debug_file, "w"); + } + + ret = PINT_event_initialize(PINT_EVENT_DEFAULT_RING_SIZE); + if (ret < 0) + { + gossip_err("Error initializing event interface.\n"); + return (ret); } ret = id_gen_safe_initialize(); Index: src/client/sysint/mgmt-create-dirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-create-dirent.sm,v retrieving revision 1.17 diff -u -a -p -r1.17 mgmt-create-dirent.sm --- src/client/sysint/mgmt-create-dirent.sm 30 Aug 2007 00:13:41 -0000 1.17 +++ src/client/sysint/mgmt-create-dirent.sm 15 Sep 2007 00:27:05 -0000 @@ -69,6 +69,7 @@ PVFS_error PVFS_imgmt_create_dirent( PVFS_handle entry_handle, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -102,6 +103,7 @@ PVFS_error PVFS_imgmt_create_dirent( sm_p->parent_ref = parent_ref; sm_p->u.mgmt_create_dirent.entry = entry; sm_p->u.mgmt_create_dirent.entry_handle = entry_handle; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Trying to create dirent %s under %llu,%d\n", @@ -118,7 +120,8 @@ PVFS_error PVFS_mgmt_create_dirent( PVFS_object_ref parent_ref, char *entry, PVFS_handle entry_handle, - PVFS_credentials *credentials) + PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -127,7 +130,7 @@ PVFS_error PVFS_mgmt_create_dirent( "PVFS_mgmt_create_dirent entered\n"); ret = PVFS_imgmt_create_dirent( - parent_ref, entry, entry_handle, credentials, &op_id, NULL); + parent_ref, entry, entry_handle, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_imgmt_create_dirent call", ret); @@ -182,7 +185,8 @@ static int mgmt_create_dirent_setup_msgp sm_p->u.mgmt_create_dirent.entry, sm_p->u.mgmt_create_dirent.entry_handle, sm_p->parent_ref.handle, - sm_p->parent_ref.fs_id); + sm_p->parent_ref.fs_id, + sm_p->hints); msg_p->fs_id = sm_p->parent_ref.fs_id; msg_p->handle = sm_p->u.mgmt_create_dirent.entry_handle; Index: src/client/sysint/mgmt-event-mon-list.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-event-mon-list.sm,v retrieving revision 1.30 diff -u -a -p -r1.30 mgmt-event-mon-list.sm --- src/client/sysint/mgmt-event-mon-list.sm 30 Aug 2007 00:13:41 -0000 1.30 +++ src/client/sysint/mgmt-event-mon-list.sm 15 Sep 2007 00:27:05 -0000 @@ -63,6 +63,7 @@ PVFS_error PVFS_imgmt_event_mon_list( int event_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -96,6 +97,7 @@ PVFS_error PVFS_imgmt_event_mon_list( sm_p->u.event_mon_list.event_count = event_count; sm_p->u.event_mon_list.addr_array = addr_array; sm_p->u.event_mon_list.details = details; + PVFS_hint_copy(hints, &sm_p->hints); sm_p->msgarray_count = server_count; sm_p->msgarray = (PINT_sm_msgpair_state *)malloc( @@ -117,7 +119,8 @@ PVFS_error PVFS_mgmt_event_mon_list( PVFS_BMI_addr_t *addr_array, int server_count, int event_count, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -127,7 +130,7 @@ PVFS_error PVFS_mgmt_event_mon_list( ret = PVFS_imgmt_event_mon_list( fs_id, credentials, event_matrix, addr_array, server_count, - event_count, details, &op_id, NULL); + event_count, details, &op_id, hints, NULL); if (ret) { @@ -170,7 +173,8 @@ static PINT_sm_action mgmt_event_mon_lis PINT_SERVREQ_MGMT_EVENT_MON_FILL( msg_p->req, *sm_p->cred_p, - sm_p->u.event_mon_list.event_count); + sm_p->u.event_mon_list.event_count, + sm_p->hints); msg_p->fs_id = sm_p->u.event_mon_list.fs_id; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/mgmt-get-dfile-array.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-get-dfile-array.sm,v retrieving revision 1.31 diff -u -a -p -r1.31 mgmt-get-dfile-array.sm --- src/client/sysint/mgmt-get-dfile-array.sm 30 Aug 2007 00:13:41 -0000 1.31 +++ src/client/sysint/mgmt-get-dfile-array.sm 15 Sep 2007 00:27:05 -0000 @@ -55,6 +55,7 @@ PVFS_error PVFS_imgmt_get_dfile_array( PVFS_handle *dfile_array, int dfile_count, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -85,6 +86,7 @@ PVFS_error PVFS_imgmt_get_dfile_array( sm_p->object_ref = ref; sm_p->u.get_dfile_array.dfile_array = dfile_array; sm_p->u.get_dfile_array.dfile_count = dfile_count; + PVFS_hint_copy(hints, &sm_p->hints); PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, @@ -103,7 +105,8 @@ PVFS_error PVFS_mgmt_get_dfile_array( PVFS_object_ref ref, PVFS_credentials *credentials, PVFS_handle *dfile_array, - int dfile_count) + int dfile_count, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -112,7 +115,7 @@ PVFS_error PVFS_mgmt_get_dfile_array( "PVFS_mgmt_get_dfile_array entered\n"); ret = PVFS_imgmt_get_dfile_array( - ref, credentials, dfile_array, dfile_count, &op_id, NULL); + ref, credentials, dfile_array, dfile_count, &op_id, hints, NULL); if (ret) { Index: src/client/sysint/mgmt-get-dirdata-handle.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-get-dirdata-handle.sm,v retrieving revision 1.13 diff -u -a -p -r1.13 mgmt-get-dirdata-handle.sm --- src/client/sysint/mgmt-get-dirdata-handle.sm 30 Aug 2007 00:13:41 -0000 1.13 +++ src/client/sysint/mgmt-get-dirdata-handle.sm 15 Sep 2007 00:27:05 -0000 @@ -71,6 +71,7 @@ PVFS_error PVFS_imgmt_get_dirdata_handle PVFS_handle *out_dirdata_handle, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -102,6 +103,7 @@ PVFS_error PVFS_imgmt_get_dirdata_handle PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->parent_ref = parent_ref; sm_p->u.mgmt_get_dirdata_handle.dirdata_handle = out_dirdata_handle; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Trying to get dirdata object of parent " @@ -116,7 +118,8 @@ PVFS_error PVFS_imgmt_get_dirdata_handle PVFS_error PVFS_mgmt_get_dirdata_handle( PVFS_object_ref parent_ref, PVFS_handle *out_dirdata_handle, - PVFS_credentials *credentials) + PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -125,7 +128,7 @@ PVFS_error PVFS_mgmt_get_dirdata_handle( "PVFS_mgmt_get_dirdata_handle entered\n"); ret = PVFS_imgmt_get_dirdata_handle( - parent_ref, out_dirdata_handle, credentials, &op_id, NULL); + parent_ref, out_dirdata_handle, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_imgmt_get_dirdata_handle call", ret); @@ -167,7 +170,8 @@ static int mgmt_get_dirdata_handle_setup msg_p->req, *sm_p->cred_p, sm_p->parent_ref.fs_id, - sm_p->parent_ref.handle); + sm_p->parent_ref.handle, + sm_p->hints); gossip_debug(GOSSIP_CLIENT_DEBUG, "- doing MGMT_GET_DIRDATA_HANDLE " "under %llu,%d\n", llu(sm_p->parent_ref.handle), Index: src/client/sysint/mgmt-iterate-handles-list.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-iterate-handles-list.sm,v retrieving revision 1.29 diff -u -a -p -r1.29 mgmt-iterate-handles-list.sm --- src/client/sysint/mgmt-iterate-handles-list.sm 30 Aug 2007 00:13:41 -0000 1.29 +++ src/client/sysint/mgmt-iterate-handles-list.sm 15 Sep 2007 00:27:05 -0000 @@ -66,6 +66,7 @@ PVFS_error PVFS_imgmt_iterate_handles_li int server_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -100,6 +101,7 @@ PVFS_error PVFS_imgmt_iterate_handles_li sm_p->u.iterate_handles_list.handle_count_array = handle_count_array; sm_p->u.iterate_handles_list.position_array = position_array; sm_p->u.iterate_handles_list.details = details; + PVFS_hint_copy(hints, &sm_p->hints); sm_p->msgarray_count = server_count; sm_p->msgarray = (PINT_sm_msgpair_state *)malloc( @@ -125,7 +127,8 @@ PVFS_error PVFS_mgmt_iterate_handles_lis PVFS_ds_position *position_array, PVFS_BMI_addr_t *addr_array, int server_count, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -135,7 +138,7 @@ PVFS_error PVFS_mgmt_iterate_handles_lis ret = PVFS_imgmt_iterate_handles_list( fs_id, credentials, handle_matrix, handle_count_array, - position_array, addr_array, server_count, details, &op_id, NULL); + position_array, addr_array, server_count, details, &op_id, hints, NULL); if (ret) { @@ -190,7 +193,8 @@ static PINT_sm_action mgmt_iterate_handl *sm_p->cred_p, sm_p->u.iterate_handles_list.fs_id, sm_p->u.iterate_handles_list.handle_count_array[i], - sm_p->u.iterate_handles_list.position_array[i]); + sm_p->u.iterate_handles_list.position_array[i], + sm_p->hints); j++; msg_p->fs_id = sm_p->u.iterate_handles_list.fs_id; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/mgmt-misc.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-misc.c,v retrieving revision 1.27 diff -u -a -p -r1.27 mgmt-misc.c --- src/client/sysint/mgmt-misc.c 30 Aug 2006 19:07:31 -0000 1.27 +++ src/client/sysint/mgmt-misc.c 15 Sep 2007 00:27:05 -0000 @@ -19,6 +19,7 @@ #include "bmi.h" #include "pint-sysint-utils.h" #include "pint-cached-config.h" +#include "pint-util.h" #include "server-config.h" #include "client-state-machine.h" @@ -52,7 +53,8 @@ PVFS_error PVFS_mgmt_statfs_all( PVFS_credentials *credentials, struct PVFS_mgmt_server_stat *stat_array, int *inout_count_p, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL; PVFS_BMI_addr_t *addr_array = NULL; @@ -103,7 +105,7 @@ PVFS_error PVFS_mgmt_statfs_all( ret = PVFS_mgmt_statfs_list( fs_id, credentials, stat_array, addr_array, - real_count, details); + real_count, details, hints); free(addr_array); @@ -121,7 +123,8 @@ PVFS_error PVFS_mgmt_setparam_all( enum PVFS_server_param param, uint64_t value, uint64_t *old_value_array, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { int count = 0; PVFS_error ret = -PVFS_EINVAL; @@ -165,7 +168,7 @@ PVFS_error PVFS_mgmt_setparam_all( ret = PVFS_mgmt_setparam_list( fs_id, credentials, param, value, addr_array, - old_value_array, count, details); + old_value_array, count, details, hints); free(addr_array); @@ -181,7 +184,8 @@ PVFS_error PVFS_mgmt_setparam_single( uint64_t value, char *server_addr_str, uint64_t *old_value, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL; PVFS_BMI_addr_t addr; @@ -190,7 +194,7 @@ PVFS_error PVFS_mgmt_setparam_single( { ret = PVFS_mgmt_setparam_list( fs_id, credentials, param, value, - &addr, old_value, 1, details); + &addr, old_value, 1, details, hints); } return ret; } Index: src/client/sysint/mgmt-noop.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-noop.sm,v retrieving revision 1.33 diff -u -a -p -r1.33 mgmt-noop.sm --- src/client/sysint/mgmt-noop.sm 30 Aug 2007 00:13:41 -0000 1.33 +++ src/client/sysint/mgmt-noop.sm 15 Sep 2007 00:27:05 -0000 @@ -59,6 +59,7 @@ PVFS_error PVFS_imgmt_noop( PVFS_credentials *credentials, PVFS_BMI_addr_t addr, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -82,6 +83,7 @@ PVFS_error PVFS_imgmt_noop( sm_p->msgpair.fs_id = fs_id; sm_p->msgpair.retry_flag = PVFS_MSGPAIR_NO_RETRY; sm_p->msgpair.svr_addr = addr; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_mgmt_noop calling " "PINT_client_state_machine_post()\n"); @@ -95,14 +97,15 @@ PVFS_error PVFS_imgmt_noop( PVFS_error PVFS_mgmt_noop( PVFS_fs_id fs_id, PVFS_credentials *credentials, - PVFS_BMI_addr_t addr) + PVFS_BMI_addr_t addr, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_mgmt_noop entered\n"); - ret = PVFS_imgmt_noop(fs_id, credentials, addr, &op_id, NULL); + ret = PVFS_imgmt_noop(fs_id, credentials, addr, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_imgmt_noop call", ret); @@ -129,7 +132,7 @@ static PINT_sm_action mgmt_noop_setup_ms gossip_debug(GOSSIP_CLIENT_DEBUG, "noop state: mgmt_noop_setup_msgpair\n"); - PINT_SERVREQ_MGMT_NOOP_FILL(sm_p->msgpair.req, *sm_p->cred_p); + PINT_SERVREQ_MGMT_NOOP_FILL(sm_p->msgpair.req, *sm_p->cred_p, sm_p->hints); sm_p->msgarray = &(sm_p->msgpair); sm_p->msgarray_count = 1; Index: src/client/sysint/mgmt-perf-mon-list.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-perf-mon-list.sm,v retrieving revision 1.33 diff -u -a -p -r1.33 mgmt-perf-mon-list.sm --- src/client/sysint/mgmt-perf-mon-list.sm 30 Aug 2007 00:13:41 -0000 1.33 +++ src/client/sysint/mgmt-perf-mon-list.sm 15 Sep 2007 00:27:05 -0000 @@ -67,6 +67,7 @@ PVFS_error PVFS_imgmt_perf_mon_list( int history_count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -98,6 +99,7 @@ PVFS_error PVFS_imgmt_perf_mon_list( sm_p->u.perf_mon_list.next_id_array = next_id_array; sm_p->u.perf_mon_list.end_time_ms_array = end_time_ms_array; sm_p->u.perf_mon_list.details = details; + PVFS_hint_copy(hints, &sm_p->hints); sm_p->msgarray_count = server_count; sm_p->msgarray = (PINT_sm_msgpair_state *)malloc( @@ -124,7 +126,8 @@ PVFS_error PVFS_mgmt_perf_mon_list( uint32_t* next_id_array, int server_count, int history_count, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -135,7 +138,7 @@ PVFS_error PVFS_mgmt_perf_mon_list( ret = PVFS_imgmt_perf_mon_list( fs_id, credentials, perf_matrix, end_time_ms_array, addr_array, next_id_array, server_count, history_count, - details, &op_id, NULL); + details, &op_id, hints, NULL); if (ret) { @@ -178,7 +181,8 @@ static PINT_sm_action mgmt_perf_mon_list msg_p->req, *sm_p->cred_p, sm_p->u.perf_mon_list.next_id_array[i], - sm_p->u.perf_mon_list.history_count); + sm_p->u.perf_mon_list.history_count, + sm_p->hints); msg_p->fs_id = sm_p->u.perf_mon_list.fs_id; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/mgmt-remove-dirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-remove-dirent.sm,v retrieving revision 1.14 diff -u -a -p -r1.14 mgmt-remove-dirent.sm --- src/client/sysint/mgmt-remove-dirent.sm 30 Aug 2007 00:13:41 -0000 1.14 +++ src/client/sysint/mgmt-remove-dirent.sm 15 Sep 2007 00:27:05 -0000 @@ -69,6 +69,7 @@ PVFS_error PVFS_imgmt_remove_dirent( char *entry, PVFS_credentials *credentials, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -100,6 +101,7 @@ PVFS_error PVFS_imgmt_remove_dirent( PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->parent_ref = parent_ref; sm_p->u.mgmt_remove_dirent.entry = entry; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Trying to remove dirent %s under %llu,%d\n", @@ -115,7 +117,8 @@ PVFS_error PVFS_imgmt_remove_dirent( PVFS_error PVFS_mgmt_remove_dirent( PVFS_object_ref parent_ref, char *entry, - PVFS_credentials *credentials) + PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -124,7 +127,7 @@ PVFS_error PVFS_mgmt_remove_dirent( "PVFS_mgmt_remove_dirent entered\n"); ret = PVFS_imgmt_remove_dirent( - parent_ref, entry, credentials, &op_id, NULL); + parent_ref, entry, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_imgmt_remove_dirent call", ret); @@ -171,7 +174,8 @@ static PINT_sm_action mgmt_remove_dirent *sm_p->cred_p, sm_p->parent_ref.fs_id, sm_p->parent_ref.handle, - sm_p->u.mgmt_remove_dirent.entry); + sm_p->u.mgmt_remove_dirent.entry, + sm_p->hints); gossip_debug(GOSSIP_REMOVE_DEBUG, "- doing MGMT_REMOVE_DIRENT %s " "under %llu,%d\n", sm_p->u.mgmt_remove_dirent.entry, Index: src/client/sysint/mgmt-remove-object.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-remove-object.sm,v retrieving revision 1.14 diff -u -a -p -r1.14 mgmt-remove-object.sm --- src/client/sysint/mgmt-remove-object.sm 30 Aug 2007 00:13:41 -0000 1.14 +++ src/client/sysint/mgmt-remove-object.sm 15 Sep 2007 00:27:05 -0000 @@ -68,6 +68,7 @@ PVFS_error PVFS_imgmt_remove_object( PVFS_object_ref object_ref, PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -97,6 +98,7 @@ PVFS_error PVFS_imgmt_remove_object( PINT_init_msgarray_params(&sm_p->msgarray_params, object_ref.fs_id); PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->object_ref = object_ref; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Trying to remove handle %llu,%d\n", @@ -113,7 +115,8 @@ PVFS_error PVFS_imgmt_remove_object( */ PVFS_error PVFS_mgmt_remove_object( PVFS_object_ref object_ref, - PVFS_credentials *credentials) + PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -121,7 +124,7 @@ PVFS_error PVFS_mgmt_remove_object( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_mgmt_remove_object entered\n"); - ret = PVFS_imgmt_remove_object(object_ref, credentials, &op_id, NULL); + ret = PVFS_imgmt_remove_object(object_ref, credentials, &op_id, NULL, hints); if (ret) { PVFS_perror_gossip("PVFS_imgmt_remove_object call", ret); @@ -167,7 +170,8 @@ static PINT_sm_action mgmt_remove_object msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->object_ref.handle); + sm_p->object_ref.handle, + sm_p->hints); gossip_debug(GOSSIP_REMOVE_DEBUG, "- doing MGMT_REMOVE_OBJECT on " "%llu,%d\n", llu(sm_p->object_ref.handle), Index: src/client/sysint/mgmt-setparam-list.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-setparam-list.sm,v retrieving revision 1.36 diff -u -a -p -r1.36 mgmt-setparam-list.sm --- src/client/sysint/mgmt-setparam-list.sm 30 Aug 2007 00:13:41 -0000 1.36 +++ src/client/sysint/mgmt-setparam-list.sm 15 Sep 2007 00:27:05 -0000 @@ -70,6 +70,7 @@ PVFS_error PVFS_imgmt_setparam_list( int count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -139,7 +140,8 @@ PVFS_error PVFS_mgmt_setparam_list( PVFS_BMI_addr_t *addr_array, uint64_t *old_value_array, int count, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -148,7 +150,7 @@ PVFS_error PVFS_mgmt_setparam_list( ret = PVFS_imgmt_setparam_list( fs_id, credentials, param, value, addr_array, old_value_array, - count, details, &op_id, NULL); + count, details, &op_id, hints, NULL); if (ret) { @@ -191,7 +193,8 @@ static PINT_sm_action mgmt_setparam_list *sm_p->cred_p, sm_p->u.setparam_list.fs_id, sm_p->u.setparam_list.param, - sm_p->u.setparam_list.value); + sm_p->u.setparam_list.value, + sm_p->hints); msg_p->fs_id = sm_p->u.setparam_list.fs_id; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/mgmt-statfs-list.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-statfs-list.sm,v retrieving revision 1.43 diff -u -a -p -r1.43 mgmt-statfs-list.sm --- src/client/sysint/mgmt-statfs-list.sm 30 Aug 2007 00:13:41 -0000 1.43 +++ src/client/sysint/mgmt-statfs-list.sm 15 Sep 2007 00:27:05 -0000 @@ -82,6 +82,7 @@ PVFS_error PVFS_imgmt_statfs_list( int count, PVFS_error_details *details, PVFS_mgmt_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -113,6 +114,7 @@ PVFS_error PVFS_imgmt_statfs_list( sm_p->u.statfs_list.count = count; sm_p->u.statfs_list.addr_array = addr_array; sm_p->u.statfs_list.details = details; + PVFS_hint_copy(hints, &sm_p->hints); memset(sm_p->u.statfs_list.stat_array, 0, (count * sizeof(struct PVFS_mgmt_server_stat))); @@ -139,7 +141,8 @@ PVFS_error PVFS_mgmt_statfs_list( struct PVFS_mgmt_server_stat *stat_array, PVFS_BMI_addr_t *addr_array, int count, - PVFS_error_details *details) + PVFS_error_details *details, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_mgmt_op_id op_id; @@ -148,7 +151,7 @@ PVFS_error PVFS_mgmt_statfs_list( ret = PVFS_imgmt_statfs_list( fs_id, credentials, stat_array, addr_array, count, - details, &op_id, NULL); + details, &op_id, hints, NULL); if (ret) { @@ -191,7 +194,8 @@ static PINT_sm_action mgmt_statfs_list_s PINT_SERVREQ_STATFS_FILL( msg_p->req, *sm_p->cred_p, - sm_p->u.statfs_list.fs_id); + sm_p->u.statfs_list.fs_id, + sm_p->hints); msg_p->fs_id = sm_p->u.statfs_list.fs_id; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/pint-sysint-utils.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/pint-sysint-utils.c,v retrieving revision 1.35 diff -u -a -p -r1.35 pint-sysint-utils.c --- src/client/sysint/pint-sysint-utils.c 18 Aug 2006 15:46:33 -0000 1.35 +++ src/client/sysint/pint-sysint-utils.c 15 Sep 2007 00:27:05 -0000 @@ -66,7 +66,7 @@ int PINT_lookup_parent( } ret = PVFS_sys_lookup(fs_id, buf, credentials, - &resp_look, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { gossip_err("Lookup failed on %s\n", buf); Index: src/client/sysint/pint-sysint-utils.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/pint-sysint-utils.h,v retrieving revision 1.28 diff -u -a -p -r1.28 pint-sysint-utils.h --- src/client/sysint/pint-sysint-utils.h 12 Sep 2006 00:49:30 -0000 1.28 +++ src/client/sysint/pint-sysint-utils.h 15 Sep 2007 00:27:05 -0000 @@ -30,7 +30,9 @@ int PINT_server_get_config( struct server_configuration_s *config, - struct PVFS_sys_mntent* mntent_p); + struct PVFS_sys_mntent* mntent_p, + PVFS_hint hints); + struct server_configuration_s *PINT_get_server_config_struct( PVFS_fs_id fs_id); void PINT_put_server_config_struct( Index: src/client/sysint/remove.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/remove.sm,v retrieving revision 1.27 diff -u -a -p -r1.27 remove.sm --- src/client/sysint/remove.sm 30 Aug 2007 00:13:41 -0000 1.27 +++ src/client/sysint/remove.sm 15 Sep 2007 00:27:05 -0000 @@ -209,7 +209,8 @@ static PINT_sm_action remove_datafile_re msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - attr->u.meta.dfile_array[i]); + attr->u.meta.dfile_array[i], + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = attr->u.meta.dfile_array[i]; @@ -247,7 +248,8 @@ static PINT_sm_action remove_object_remo msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->object_ref.handle); + sm_p->object_ref.handle, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; Index: src/client/sysint/server-get-config.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/server-get-config.sm,v retrieving revision 1.29 diff -u -a -p -r1.29 server-get-config.sm --- src/client/sysint/server-get-config.sm 30 Aug 2007 00:13:41 -0000 1.29 +++ src/client/sysint/server-get-config.sm 15 Sep 2007 00:27:05 -0000 @@ -124,7 +124,8 @@ machine pvfs2_server_fetch_config_sm */ int PINT_server_get_config( struct server_configuration_s *config, - struct PVFS_sys_mntent* mntent_p) + struct PVFS_sys_mntent* mntent_p, + PVFS_hint hints) { int ret = -PVFS_EINVAL; PINT_smcb *smcb = NULL; @@ -172,6 +173,8 @@ int PINT_server_get_config( PINT_init_sysint_credentials(sm_p->cred_p, &creds); sm_p->u.get_config.mntent = mntent_p; sm_p->u.get_config.config = config; + + PVFS_hint_copy(hints, &sm_p->hints); ret = PINT_client_state_machine_post(smcb, &op_id, NULL); if (ret) @@ -270,7 +273,7 @@ static PINT_sm_action server_get_config_ return ret; } - PINT_SERVREQ_GETCONFIG_FILL(msg_p->req, *sm_p->cred_p); + PINT_SERVREQ_GETCONFIG_FILL(msg_p->req, *sm_p->cred_p, sm_p->hints); msg_p->fs_id = PVFS_FS_ID_NULL; msg_p->handle = PVFS_HANDLE_NULL; @@ -502,7 +505,7 @@ static PINT_sm_action server_fetch_confi { msg_p = &sm_p->msgarray[i]; sm_p->msgarray[i].enc_type = sm_p->msgpair.enc_type; - PINT_SERVREQ_GETCONFIG_FILL(msg_p->req, *sm_p->cred_p); + PINT_SERVREQ_GETCONFIG_FILL(msg_p->req, *sm_p->cred_p, sm_p->hints); msg_p->fs_id = PVFS_FS_ID_NULL; msg_p->handle = PVFS_HANDLE_NULL; Index: src/client/sysint/sys-create.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-create.sm,v retrieving revision 1.111 diff -u -a -p -r1.111 sys-create.sm --- src/client/sysint/sys-create.sm 30 Aug 2007 00:13:41 -0000 1.111 +++ src/client/sysint/sys-create.sm 15 Sep 2007 00:27:05 -0000 @@ -181,6 +181,7 @@ PVFS_error PVFS_isys_create( PVFS_sys_layout *layout, PVFS_sysresp_create *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -239,6 +240,7 @@ PVFS_error PVFS_isys_create( PVFS_util_copy_sys_attr(&sm_p->u.create.sys_attr, &attr); sm_p->u.create.stored_error_code = 0; sm_p->u.create.retry_count = 0; + PVFS_hint_copy(hints, &sm_p->hints); sm_p->parent_ref = parent_ref; /* copy layout to sm struct */ @@ -333,7 +335,7 @@ PVFS_error PVFS_isys_create( gossip_debug( GOSSIP_CLIENT_DEBUG, "Creating file %s under %llu, %d\n", object_name, llu(parent_ref.handle), parent_ref.fs_id); - + return PINT_client_state_machine_post( smcb, op_id, user_ptr); } @@ -346,8 +348,9 @@ PVFS_error PVFS_sys_create( PVFS_sys_attr attr, const PVFS_credentials *credentials, PVFS_sys_dist *dist, + PVFS_sysresp_create *resp, PVFS_sys_layout *layout, - PVFS_sysresp_create *resp) + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -355,7 +358,7 @@ PVFS_error PVFS_sys_create( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_create entered\n"); ret = PVFS_isys_create(object_name, parent_ref, attr, credentials, - dist, layout, resp, &op_id, NULL); + dist, layout, resp, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_create call", ret); @@ -580,7 +583,8 @@ static PINT_sm_action create_dspace_crea *sm_p->cred_p, sm_p->object_ref.fs_id, PVFS_TYPE_METAFILE, - meta_handle_extent_array); + meta_handle_extent_array, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = meta_handle_extent_array.extent_array[0].first; @@ -682,7 +686,8 @@ static PINT_sm_action create_datafiles_s *sm_p->cred_p, sm_p->object_ref.fs_id, PVFS_TYPE_DATAFILE, - sm_p->u.create.io_handle_extent_array[i]); + sm_p->u.create.io_handle_extent_array[i], + sm_p->hints); gossip_debug(GOSSIP_CLIENT_DEBUG, "posting datafile[%d] create " "with extents %llu-%llu\n", i, @@ -697,6 +702,11 @@ static PINT_sm_action create_datafiles_s msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; msg_p->comp_fn = create_datafiles_comp_fn; msg_p->svr_addr = sm_p->u.create.data_server_addrs[i]; + + gossip_debug(GOSSIP_VARSTRIP_DEBUG, + "Data file number: %d - Server name: %s\n", + i, PVFS_mgmt_map_addr(msg_p->fs_id, sm_p->cred_p, + msg_p->svr_addr, NULL)); } return SM_ACTION_COMPLETE; } @@ -735,7 +745,9 @@ static PINT_sm_action create_setattr_set sm_p->u.create.metafile_handle, PVFS_TYPE_METAFILE, sm_p->u.create.sys_attr, - PVFS_ATTR_META_ALL); + PVFS_ATTR_META_ALL, + sm_p->hints + ); msg_p->req.u.setattr.attr.u.meta.dfile_array = sm_p->u.create.datafile_handles; @@ -800,7 +812,8 @@ static PINT_sm_action create_crdirent_se sm_p->u.create.object_name, sm_p->u.create.metafile_handle, sm_p->object_ref.handle, - sm_p->object_ref.fs_id); + sm_p->object_ref.fs_id, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; @@ -912,7 +925,8 @@ static PINT_sm_action create_delete_hand msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->u.create.metafile_handle); + sm_p->u.create.metafile_handle, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->u.create.metafile_handle; @@ -929,7 +943,8 @@ static PINT_sm_action create_delete_hand msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->u.create.datafile_handles[i]); + sm_p->u.create.datafile_handles[i], + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->u.create.datafile_handles[i]; Index: src/client/sysint/sys-del-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-del-eattr.sm,v retrieving revision 1.10 diff -u -a -p -r1.10 sys-del-eattr.sm --- src/client/sysint/sys-del-eattr.sm 30 Aug 2007 00:13:41 -0000 1.10 +++ src/client/sysint/sys-del-eattr.sm 15 Sep 2007 00:27:05 -0000 @@ -55,6 +55,7 @@ PVFS_error PVFS_isys_deleattr( const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { int ret = -PVFS_EINVAL; @@ -86,7 +87,8 @@ PVFS_error PVFS_isys_deleattr( sm_p->u.deleattr.key_p = key_p; sm_p->error_code = 0; sm_p->object_ref = ref; - + PVFS_hint_copy(hints, &sm_p->hints); + return PINT_client_state_machine_post( smcb, op_id, user_ptr); } @@ -94,7 +96,8 @@ PVFS_error PVFS_isys_deleattr( PVFS_error PVFS_sys_deleattr( PVFS_object_ref ref, const PVFS_credentials *credentials, - PVFS_ds_keyval *key_p) + PVFS_ds_keyval *key_p, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -102,7 +105,7 @@ PVFS_error PVFS_sys_deleattr( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_deleattr entered\n"); ret = PVFS_isys_deleattr(ref, credentials, - key_p, &op_id, NULL); + key_p, &op_id, hints, NULL); if (ret) { @@ -137,7 +140,8 @@ static PINT_sm_action del_eattr_setup_ms (*sm_p->cred_p), sm_p->object_ref.fs_id, sm_p->object_ref.handle, - (*sm_p->u.deleattr.key_p) + (*sm_p->u.deleattr.key_p), + sm_p->hints ); sm_p->msgarray = &(sm_p->msgpair); Index: src/client/sysint/sys-flush.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-flush.sm,v retrieving revision 1.41 diff -u -a -p -r1.41 sys-flush.sm --- src/client/sysint/sys-flush.sm 30 Aug 2007 00:13:41 -0000 1.41 +++ src/client/sysint/sys-flush.sm 15 Sep 2007 00:27:05 -0000 @@ -71,6 +71,7 @@ PVFS_error PVFS_isys_flush( PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -100,6 +101,7 @@ PVFS_error PVFS_isys_flush( PINT_init_msgarray_params(&sm_p->msgarray_params, ref.fs_id); PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); /* NOTE: This state machine previously multiplied the default job timeout * by five to allow for potentially long sync delays. We instead now set @@ -122,14 +124,15 @@ PVFS_error PVFS_isys_flush( */ PVFS_error PVFS_sys_flush( PVFS_object_ref ref, - const PVFS_credentials *credentials) + const PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_flush entered\n"); - ret = PVFS_isys_flush(ref, credentials, &op_id, NULL); + ret = PVFS_isys_flush(ref, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_flush call", ret); @@ -192,7 +195,8 @@ static int flush_datafile_setup_msgpaira PINT_SERVREQ_FLUSH_FILL(msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - attr->u.meta.dfile_array[i]); + attr->u.meta.dfile_array[i], + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = attr->u.meta.dfile_array[i]; @@ -210,7 +214,8 @@ static int flush_datafile_setup_msgpaira PINT_SERVREQ_FLUSH_FILL(msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->object_ref.handle); + sm_p->object_ref.handle, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; Index: src/client/sysint/sys-get-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-get-eattr.sm,v retrieving revision 1.12 diff -u -a -p -r1.12 sys-get-eattr.sm --- src/client/sysint/sys-get-eattr.sm 30 Aug 2007 00:13:41 -0000 1.12 +++ src/client/sysint/sys-get-eattr.sm 15 Sep 2007 00:27:05 -0000 @@ -58,6 +58,7 @@ PVFS_error PVFS_isys_geteattr_list( PVFS_ds_keyval *key_array, PVFS_sysresp_geteattr *resp_p, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { int ret = -PVFS_EINVAL; @@ -92,6 +93,7 @@ PVFS_error PVFS_isys_geteattr_list( sm_p->u.geteattr.resp_p = resp_p; sm_p->error_code = 0; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); return PINT_client_state_machine_post( smcb, op_id, user_ptr); @@ -102,7 +104,8 @@ PVFS_error PVFS_sys_geteattr_list( const PVFS_credentials *credentials, int32_t nkey, PVFS_ds_keyval *key_array, - PVFS_sysresp_geteattr *resp_p) + PVFS_sysresp_geteattr *resp_p, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -110,7 +113,7 @@ PVFS_error PVFS_sys_geteattr_list( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_geteattr entered\n"); ret = PVFS_isys_geteattr_list(ref, credentials, - nkey, key_array, resp_p, &op_id, NULL); + nkey, key_array, resp_p, &op_id, hints, NULL); if (ret) { @@ -135,13 +138,14 @@ PVFS_error PVFS_sys_geteattr( PVFS_object_ref ref, const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, - PVFS_ds_keyval *val_p) + PVFS_ds_keyval *val_p, + PVFS_hint hints) { PVFS_sysresp_geteattr resp_p; PVFS_error tmp_err; resp_p.val_array = val_p; resp_p.err_array = &tmp_err; - return PVFS_sys_geteattr_list(ref, credentials, 1, key_p, &resp_p); + return PVFS_sys_geteattr_list(ref, credentials, 1, key_p, &resp_p, hints); } static PINT_sm_action get_eattr_setup_msgpair( @@ -172,7 +176,8 @@ static PINT_sm_action get_eattr_setup_ms sm_p->object_ref.handle, sm_p->u.geteattr.nkey, sm_p->u.geteattr.key_array, - sm_p->u.geteattr.size_array); + sm_p->u.geteattr.size_array, + sm_p->hints); sm_p->msgarray = &(sm_p->msgpair); sm_p->msgarray_count = 1; Index: src/client/sysint/sys-getattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-getattr.sm,v retrieving revision 1.109 diff -u -a -p -r1.109 sys-getattr.sm --- src/client/sysint/sys-getattr.sm 30 Aug 2007 00:13:41 -0000 1.109 +++ src/client/sysint/sys-getattr.sm 15 Sep 2007 00:27:06 -0000 @@ -162,6 +162,7 @@ PVFS_error PVFS_isys_getattr( const PVFS_credentials *credentials, PVFS_sysresp_getattr *resp_p, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -199,6 +200,7 @@ PVFS_error PVFS_isys_getattr( sm_p->error_code = 0; sm_p->object_ref = ref; sm_p->u.getattr.getattr_resp_p = resp_p; + PVFS_hint_copy(hints, &sm_p->hints); PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, @@ -218,7 +220,8 @@ PVFS_error PVFS_sys_getattr( PVFS_object_ref ref, uint32_t attrmask, const PVFS_credentials *credentials, - PVFS_sysresp_getattr *resp_p) + PVFS_sysresp_getattr *resp_p, + PVFS_hint hints) { PVFS_error ret, error; PVFS_sys_op_id op_id; @@ -226,7 +229,7 @@ PVFS_error PVFS_sys_getattr( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_getattr entered\n"); ret = PVFS_isys_getattr(ref, attrmask, credentials, - resp_p, &op_id, NULL); + resp_p, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_getattr call", ret); @@ -455,7 +458,8 @@ static PINT_sm_action getattr_object_get *sm_p->cred_p, object_ref.fs_id, object_ref.handle, - sm_p->getattr.req_attrmask); + sm_p->getattr.req_attrmask, + sm_p->hints); sm_p->msgpair.fs_id = object_ref.fs_id; sm_p->msgpair.handle = object_ref.handle; @@ -673,7 +677,8 @@ static PINT_sm_action getattr_datafile_g *sm_p->cred_p, sm_p->getattr.object_ref.fs_id, attr->u.meta.dfile_array[i], - PVFS_ATTR_DATA_SIZE); + PVFS_ATTR_DATA_SIZE, + sm_p->hints); msg_p->fs_id = sm_p->getattr.object_ref.fs_id; msg_p->handle = attr->u.meta.dfile_array[i]; Index: src/client/sysint/sys-io.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-io.sm,v retrieving revision 1.158 diff -u -a -p -r1.158 sys-io.sm --- src/client/sysint/sys-io.sm 30 Aug 2007 00:13:42 -0000 1.158 +++ src/client/sysint/sys-io.sm 15 Sep 2007 00:27:06 -0000 @@ -229,6 +229,7 @@ PVFS_error PVFS_isys_io( PVFS_sysresp_io *resp_p, enum PVFS_io_type io_type, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -302,6 +303,7 @@ PVFS_error PVFS_isys_io( sm_p->u.io.total_size = 0; sm_p->u.io.small_io = 0; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); return PINT_client_state_machine_post( smcb, op_id, user_ptr); @@ -319,7 +321,8 @@ PVFS_error PVFS_sys_io( PVFS_Request mem_req, const PVFS_credentials *credentials, PVFS_sysresp_io *resp_p, - enum PVFS_io_type io_type) + enum PVFS_io_type io_type, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -327,7 +330,7 @@ PVFS_error PVFS_sys_io( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_io entered\n"); ret = PVFS_isys_io(ref, file_req, file_req_offset, buffer, mem_req, - credentials, resp_p, io_type, &op_id, NULL); + credentials, resp_p, io_type, &op_id, hints, NULL); if (ret == 1) return 0; else if (ret < 0) @@ -553,7 +556,8 @@ static PINT_sm_action io_datafile_setup_ attr->u.meta.dist, sm_p->u.io.file_req, sm_p->u.io.file_req_offset, - PINT_REQUEST_TOTAL_BYTES(sm_p->u.io.mem_req)); + PINT_REQUEST_TOTAL_BYTES(sm_p->u.io.mem_req), + sm_p->hints); } js_p->error_code = 0; @@ -689,7 +693,7 @@ static PINT_sm_action io_datafile_post_m msg->svr_addr, msg->encoded_resp_p, msg->max_resp_sz, cur_ctx->session_tag, BMI_PRE_ALLOC, smcb, status_user_tag, &msg->recv_status, &msg->recv_id, pint_client_sm_context, - server_config->client_job_bmi_timeout); + server_config->client_job_bmi_timeout, sm_p->hints); PINT_put_server_config_struct(server_config); /* ret -1: problem, do not look at msg recv_status */ @@ -764,7 +768,7 @@ static PINT_sm_action io_datafile_post_m msg->encoded_req.total_size, cur_ctx->session_tag, msg->encoded_req.buffer_type, 1, smcb, status_user_tag, &msg->send_status, &msg->send_id, pint_client_sm_context, - server_config->client_job_bmi_timeout); + server_config->client_job_bmi_timeout, sm_p->hints); PINT_put_server_config_struct(server_config); if (ret < 0) { @@ -1764,7 +1768,7 @@ static inline int io_post_flow( &cur_ctx->flow_desc, smcb, status_user_tag, &cur_ctx->flow_status, &cur_ctx->flow_job_id, pint_client_sm_context, - server_config->client_job_flow_timeout); + server_config->client_job_flow_timeout, sm_p->hints); PINT_put_server_config_struct(server_config); /* if the flow fails immediately, then we have to do some special @@ -1854,7 +1858,7 @@ static inline int io_post_write_ack_recv cur_ctx->write_ack.max_resp_sz, cur_ctx->session_tag, BMI_PRE_ALLOC, smcb, status_user_tag, &cur_ctx->write_ack.recv_status, &cur_ctx->write_ack.recv_id, - pint_client_sm_context, JOB_TIMEOUT_INF); + pint_client_sm_context, JOB_TIMEOUT_INF, sm_p->hints); if (ret < 0) { Index: src/client/sysint/sys-list-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-list-eattr.sm,v retrieving revision 1.9 diff -u -a -p -r1.9 sys-list-eattr.sm --- src/client/sysint/sys-list-eattr.sm 30 Aug 2007 00:13:42 -0000 1.9 +++ src/client/sysint/sys-list-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -57,6 +57,7 @@ PVFS_error PVFS_isys_listeattr( const PVFS_credentials *credentials, PVFS_sysresp_listeattr *resp_p, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { int ret = -PVFS_EINVAL; @@ -91,6 +92,7 @@ PVFS_error PVFS_isys_listeattr( sm_p->u.listeattr.pos_token = token; sm_p->error_code = 0; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); return PINT_client_state_machine_post( smcb, op_id, user_ptr); @@ -101,7 +103,8 @@ PVFS_error PVFS_sys_listeattr( PVFS_ds_position token, int32_t nkey, const PVFS_credentials *credentials, - PVFS_sysresp_listeattr *resp_p) + PVFS_sysresp_listeattr *resp_p, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -109,7 +112,7 @@ PVFS_error PVFS_sys_listeattr( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_listeattr entered\n"); ret = PVFS_isys_listeattr(ref, token, nkey, credentials, - resp_p, &op_id, NULL); + resp_p, &op_id, hints, NULL); if (ret) { @@ -156,7 +159,8 @@ static PINT_sm_action list_eattr_setup_m sm_p->object_ref.handle, sm_p->u.listeattr.pos_token, sm_p->u.listeattr.nkey, - sm_p->u.listeattr.size_array + sm_p->u.listeattr.size_array, + sm_p->hints ); sm_p->msgarray = &(sm_p->msgpair); Index: src/client/sysint/sys-lookup.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-lookup.sm,v retrieving revision 1.70 diff -u -a -p -r1.70 sys-lookup.sm --- src/client/sysint/sys-lookup.sm 30 Aug 2007 00:13:42 -0000 1.70 +++ src/client/sysint/sys-lookup.sm 15 Sep 2007 00:27:06 -0000 @@ -450,6 +450,7 @@ PVFS_error PVFS_isys_ref_lookup( PVFS_sysresp_lookup *resp, int32_t follow_link, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -481,7 +482,7 @@ PVFS_error PVFS_isys_ref_lookup( sm_p->u.lookup.lookup_resp = resp; sm_p->u.lookup.follow_link = follow_link; sm_p->u.lookup.current_context = 0; - sm_p->u.lookup.context_count = 0; + PVFS_hint_copy(hints, &sm_p->hints); ret = initialize_context(&sm_p->u.lookup, relative_pathname, parent); @@ -510,7 +511,8 @@ PVFS_error PVFS_sys_ref_lookup( PVFS_object_ref parent, const PVFS_credentials *credentials, PVFS_sysresp_lookup *resp, - int32_t follow_link) + int32_t follow_link, + PVFS_hint hints) { PVFS_error ret, error; PVFS_sys_op_id op_id; @@ -519,7 +521,7 @@ PVFS_error PVFS_sys_ref_lookup( ret = PVFS_isys_ref_lookup( fs_id, relative_pathname, parent, credentials, resp, - follow_link, &op_id, resp); + follow_link, &op_id, hints, resp); if (ret) { @@ -551,7 +553,8 @@ PVFS_error PVFS_sys_lookup( PVFS_fs_id fs_id, char *name, const PVFS_credentials *credentials, PVFS_sysresp_lookup *resp, - int32_t follow_link) + int32_t follow_link, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL; PVFS_object_ref parent; @@ -586,7 +589,7 @@ PVFS_error PVFS_sys_lookup( */ char *path = ((name[0] == '/') ? &name[1] : name); ret = PVFS_sys_ref_lookup( - fs_id, path, parent, credentials, resp, follow_link); + fs_id, path, parent, credentials, resp, follow_link, hints); } } return ret; @@ -655,7 +658,8 @@ static PINT_sm_action lookup_segment_loo seg_to_lookup, cur_seg->seg_starting_refn.fs_id, cur_seg->seg_starting_refn.handle, - PVFS_ATTR_COMMON_ALL); + PVFS_ATTR_COMMON_ALL, + sm_p->hints); gossip_debug( GOSSIP_LOOKUP_DEBUG, "Looking up segment %s under handle %llu\n", Index: src/client/sysint/sys-mkdir.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-mkdir.sm,v retrieving revision 1.62 diff -u -a -p -r1.62 sys-mkdir.sm --- src/client/sysint/sys-mkdir.sm 30 Aug 2007 00:13:42 -0000 1.62 +++ src/client/sysint/sys-mkdir.sm 15 Sep 2007 00:27:06 -0000 @@ -159,6 +159,7 @@ PVFS_error PVFS_isys_mkdir( const PVFS_credentials *credentials, PVFS_sysresp_mkdir *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -206,6 +207,7 @@ PVFS_error PVFS_isys_mkdir( sm_p->u.mkdir.mkdir_resp = resp; sm_p->u.mkdir.stored_error_code = 0; sm_p->object_ref = parent_ref; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug(GOSSIP_CLIENT_DEBUG, "Creating directory named %s " "under parent handle %llu on fs %d\n", object_name, @@ -222,7 +224,8 @@ PVFS_error PVFS_sys_mkdir( PVFS_object_ref parent_ref, PVFS_sys_attr attr, const PVFS_credentials *credentials, - PVFS_sysresp_mkdir *resp) + PVFS_sysresp_mkdir *resp, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -230,7 +233,7 @@ PVFS_error PVFS_sys_mkdir( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_mkdir entered\n"); ret = PVFS_isys_mkdir(object_name, parent_ref, attr, - credentials, resp, &op_id, NULL); + credentials, resp, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_mkdir call", ret); @@ -372,7 +375,8 @@ static PINT_sm_action mkdir_msg_setup_ms *sm_p->cred_p, sm_p->object_ref.fs_id, meta_handle_extent_array, - sm_p->u.mkdir.sys_attr); + sm_p->u.mkdir.sys_attr, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = meta_handle_extent_array.extent_array[0].first; @@ -419,7 +423,8 @@ static PINT_sm_action mkdir_crdirent_set sm_p->u.mkdir.object_name, sm_p->u.mkdir.metafile_handle, sm_p->object_ref.handle, - sm_p->object_ref.fs_id); + sm_p->object_ref.fs_id, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; @@ -480,7 +485,8 @@ static PINT_sm_action mkdir_delete_handl msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->u.mkdir.metafile_handle); + sm_p->u.mkdir.metafile_handle, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->u.mkdir.metafile_handle; @@ -698,8 +704,8 @@ static PINT_sm_action mkdir_seteattr_set 0, eattr_count, sm_p->u.mkdir.key_array, - sm_p->u.mkdir.val_array - ); + sm_p->u.mkdir.val_array, + sm_p->hints); sm_p->msgarray = &(sm_p->msgpair); sm_p->msgarray_count = 1; Index: src/client/sysint/sys-readdir.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-readdir.sm,v retrieving revision 1.52 diff -u -a -p -r1.52 sys-readdir.sm --- src/client/sysint/sys-readdir.sm 30 Aug 2007 00:13:42 -0000 1.52 +++ src/client/sysint/sys-readdir.sm 15 Sep 2007 00:27:06 -0000 @@ -102,6 +102,7 @@ PVFS_error PVFS_isys_readdir( const PVFS_credentials *credentials, PVFS_sysresp_readdir *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -140,6 +141,7 @@ PVFS_error PVFS_isys_readdir( PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->u.readdir.readdir_resp = resp; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); /* point the sm dirent array and outcount to the readdir response field */ sm_p->readdir.dirent_array = &resp->dirent_array; sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; @@ -168,7 +170,8 @@ PVFS_error PVFS_sys_readdir( PVFS_ds_position token, int32_t pvfs_dirent_incount, const PVFS_credentials *credentials, - PVFS_sysresp_readdir *resp) + PVFS_sysresp_readdir *resp, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -176,7 +179,7 @@ PVFS_error PVFS_sys_readdir( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_readdir entered\n"); ret = PVFS_isys_readdir(ref, token, pvfs_dirent_incount, - credentials, resp, &op_id, NULL); + credentials, resp, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_readdir call", ret); @@ -248,8 +251,9 @@ static PINT_sm_action readdir_msg_setup_ *sm_p->cred_p, sm_p->object_ref.fs_id, sm_p->object_ref.handle, - sm_p->readdir.pos_token, - sm_p->readdir.dirent_limit); + sm_p->u.readdir.pos_token, + sm_p->u.readdir.dirent_limit, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; Index: src/client/sysint/sys-readdirplus.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-readdirplus.sm,v retrieving revision 1.7 diff -u -a -p -r1.7 sys-readdirplus.sm --- src/client/sysint/sys-readdirplus.sm 30 Aug 2007 00:13:42 -0000 1.7 +++ src/client/sysint/sys-readdirplus.sm 15 Sep 2007 00:27:06 -0000 @@ -114,6 +114,7 @@ PVFS_error PVFS_isys_readdirplus( uint32_t attrmask, PVFS_sysresp_readdirplus *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -151,6 +152,7 @@ PVFS_error PVFS_isys_readdirplus( PINT_init_msgarray_params(&sm_p->msgarray_params, ref.fs_id); PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); /* point the sm dirent array and outcount to the readdirplus response field */ sm_p->readdir.dirent_array = &resp->dirent_array; sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; @@ -191,7 +193,8 @@ PVFS_error PVFS_sys_readdirplus( int32_t pvfs_dirent_incount, const PVFS_credentials *credentials, uint32_t attrmask, - PVFS_sysresp_readdirplus *resp) + PVFS_sysresp_readdirplus *resp, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -199,7 +202,7 @@ PVFS_error PVFS_sys_readdirplus( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_readdirplus entered\n"); ret = PVFS_isys_readdirplus(ref, token, pvfs_dirent_incount, - credentials, attrmask, resp, &op_id, NULL); + credentials, attrmask, resp, &op_id, NULL, hints); if (ret) { PVFS_perror_gossip("PVFS_isys_readdirplus call", ret); @@ -512,7 +515,8 @@ static PINT_sm_action readdirplus_fetch_ sm_p->object_ref.fs_id, sm_p->u.readdirplus.attrmask, sm_p->u.readdirplus.handle_count[i], - sm_p->u.readdirplus.handles[i]); + sm_p->u.readdirplus.handles[i], + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = PVFS_HANDLE_NULL; msg_p->retry_flag = PVFS_MSGPAIR_RETRY; @@ -732,7 +736,8 @@ static PINT_sm_action readdirplus_fetch_ sm_p->object_ref.fs_id, sm_p->u.readdirplus.attrmask, sm_p->u.readdirplus.handle_count[i], - sm_p->u.readdirplus.handles[i]); + sm_p->u.readdirplus.handles[i], + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = PVFS_HANDLE_NULL; msg_p->retry_flag = PVFS_MSGPAIR_RETRY; Index: src/client/sysint/sys-remove.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-remove.sm,v retrieving revision 1.105 diff -u -a -p -r1.105 sys-remove.sm --- src/client/sysint/sys-remove.sm 30 Aug 2007 00:13:42 -0000 1.105 +++ src/client/sysint/sys-remove.sm 15 Sep 2007 00:27:06 -0000 @@ -154,6 +154,7 @@ PVFS_error PVFS_isys_remove( PVFS_object_ref parent_ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -186,6 +187,7 @@ PVFS_error PVFS_isys_remove( sm_p->u.remove.object_name = object_name; sm_p->parent_ref = parent_ref; sm_p->u.remove.stored_error_code = 0; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Trying to remove entry %s under %llu,%d\n", @@ -206,7 +208,8 @@ PVFS_error PVFS_isys_remove( PVFS_error PVFS_sys_remove( char *object_name, PVFS_object_ref parent_ref, - const PVFS_credentials *credentials) + const PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -214,7 +217,7 @@ PVFS_error PVFS_sys_remove( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_remove entered\n"); ret = PVFS_isys_remove(object_name, parent_ref, - credentials, &op_id, NULL); + credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_remove call", ret); @@ -268,7 +271,8 @@ static PINT_sm_action remove_rmdirent_se *sm_p->cred_p, sm_p->parent_ref.fs_id, sm_p->parent_ref.handle, - sm_p->u.remove.object_name); + sm_p->u.remove.object_name, + sm_p->hints); gossip_debug(GOSSIP_REMOVE_DEBUG, "- doing RMDIRENT on %s " "under %llu,%d\n", sm_p->u.remove.object_name, @@ -313,7 +317,8 @@ static PINT_sm_action remove_crdirent_se sm_p->u.remove.object_name, sm_p->object_ref.handle, sm_p->parent_ref.handle, - sm_p->parent_ref.fs_id); + sm_p->parent_ref.fs_id, + sm_p->hints); gossip_debug(GOSSIP_REMOVE_DEBUG, "- doing CRDIRENT of %s (%llu,%d) " "under %llu,%d\n", sm_p->u.remove.object_name, Index: src/client/sysint/sys-rename.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-rename.sm,v retrieving revision 1.56 diff -u -a -p -r1.56 sys-rename.sm --- src/client/sysint/sys-rename.sm 30 Aug 2007 00:13:42 -0000 1.56 +++ src/client/sysint/sys-rename.sm 15 Sep 2007 00:27:06 -0000 @@ -224,6 +224,7 @@ PVFS_error PVFS_isys_rename( PVFS_object_ref new_parent_ref, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -287,6 +288,7 @@ PVFS_error PVFS_isys_rename( sm_p->u.rename.rmdirent_index = 0; sm_p->u.rename.target_dirent_exists = 0; sm_p->u.rename.stored_error_code = 0; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Renaming file named %s (under [%llu,%d]\n\t" @@ -312,7 +314,8 @@ PVFS_error PVFS_sys_rename( PVFS_object_ref old_parent_ref, char *new_entry, PVFS_object_ref new_parent_ref, - const PVFS_credentials *credentials) + const PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -320,7 +323,7 @@ PVFS_error PVFS_sys_rename( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_rename entered\n"); ret = PVFS_isys_rename(old_entry, old_parent_ref, new_entry, - new_parent_ref, credentials, &op_id, NULL); + new_parent_ref, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_rename call", ret); @@ -545,7 +548,8 @@ static PINT_sm_action rename_lookups_set sm_p->u.rename.entries[i], sm_p->u.rename.parent_refns[i].fs_id, sm_p->u.rename.parent_refns[i].handle, - PVFS_ATTR_COMMON_ALL); + PVFS_ATTR_COMMON_ALL, + sm_p->hints); /* fill in msgpair structure components */ msg_p->fs_id = sm_p->u.rename.parent_refns[i].fs_id; @@ -603,7 +607,8 @@ static PINT_sm_action rename_crdirent_se sm_p->u.rename.entries[1], sm_p->u.rename.refns[0].handle, sm_p->u.rename.parent_refns[1].handle, - sm_p->u.rename.parent_refns[1].fs_id); + sm_p->u.rename.parent_refns[1].fs_id, + sm_p->hints); msg_p->fs_id = sm_p->u.rename.parent_refns[1].fs_id; msg_p->handle = sm_p->u.rename.parent_refns[1].handle; @@ -651,7 +656,8 @@ static PINT_sm_action rename_rmdirent_se *sm_p->cred_p, sm_p->u.rename.parent_refns[sm_p->u.rename.rmdirent_index].fs_id, sm_p->u.rename.parent_refns[sm_p->u.rename.rmdirent_index].handle, - sm_p->u.rename.entries[sm_p->u.rename.rmdirent_index]); + sm_p->u.rename.entries[sm_p->u.rename.rmdirent_index], + sm_p->hints); msg_p->fs_id = sm_p->u.rename.parent_refns[ sm_p->u.rename.rmdirent_index].fs_id; @@ -777,7 +783,8 @@ static PINT_sm_action rename_chdirent_se sm_p->u.rename.parent_refns[1].fs_id, sm_p->u.rename.parent_refns[1].handle, sm_p->u.rename.refns[0].handle, - sm_p->u.rename.entries[1]); + sm_p->u.rename.entries[1], + sm_p->hints); msg_p->fs_id = sm_p->u.rename.parent_refns[1].fs_id; msg_p->handle = sm_p->u.rename.parent_refns[1].handle; Index: src/client/sysint/sys-set-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-set-eattr.sm,v retrieving revision 1.11 diff -u -a -p -r1.11 sys-set-eattr.sm --- src/client/sysint/sys-set-eattr.sm 30 Aug 2007 00:13:42 -0000 1.11 +++ src/client/sysint/sys-set-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -58,6 +58,7 @@ PVFS_error PVFS_isys_seteattr_list( PVFS_ds_keyval *val_array, int32_t flags, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { int ret = -PVFS_EINVAL; @@ -107,6 +108,7 @@ PVFS_error PVFS_isys_seteattr_list( sm_p->u.seteattr.flags = flags; sm_p->error_code = 0; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); return PINT_client_state_machine_post( smcb, op_id, user_ptr); @@ -118,7 +120,8 @@ PVFS_error PVFS_sys_seteattr_list( int32_t nkey, PVFS_ds_keyval *key_array, PVFS_ds_keyval *val_array, - int32_t flags) + int32_t flags, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -126,7 +129,7 @@ PVFS_error PVFS_sys_seteattr_list( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_seteattr entered\n"); ret = PVFS_isys_seteattr_list(ref, credentials, - nkey, key_array, val_array, flags, &op_id, NULL); + nkey, key_array, val_array, flags, &op_id, hints, NULL); if (ret) { @@ -152,9 +155,10 @@ PVFS_error PVFS_sys_seteattr( const PVFS_credentials *credentials, PVFS_ds_keyval *key_p, PVFS_ds_keyval *val_p, - int32_t flags) + int32_t flags, + PVFS_hint hints) { - return PVFS_sys_seteattr_list(ref, credentials, 1, key_p, val_p, flags); + return PVFS_sys_seteattr_list(ref, credentials, 1, key_p, val_p, flags, hints); } @@ -172,7 +176,8 @@ static PINT_sm_action set_eattr_setup_ms sm_p->u.seteattr.flags, sm_p->u.seteattr.nkey, sm_p->u.seteattr.key_array, - sm_p->u.seteattr.val_array + sm_p->u.seteattr.val_array, + sm_p->hints ); sm_p->msgarray = &(sm_p->msgpair); Index: src/client/sysint/sys-setattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-setattr.sm,v retrieving revision 1.51 diff -u -a -p -r1.51 sys-setattr.sm --- src/client/sysint/sys-setattr.sm 30 Aug 2007 00:13:42 -0000 1.51 +++ src/client/sysint/sys-setattr.sm 15 Sep 2007 00:27:06 -0000 @@ -75,6 +75,7 @@ PVFS_error PVFS_isys_setattr( PVFS_sys_attr attr, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -123,6 +124,7 @@ PVFS_error PVFS_isys_setattr( PINT_init_msgarray_params(&sm_p->msgarray_params, ref.fs_id); PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->object_ref = ref; + sm_p->hints = hints; ret = PVFS_util_copy_sys_attr(&sm_p->u.setattr.sys_attr, &attr); if(ret < 0) @@ -145,14 +147,15 @@ PVFS_error PVFS_isys_setattr( PVFS_error PVFS_sys_setattr( PVFS_object_ref ref, PVFS_sys_attr attr, - const PVFS_credentials *credentials) + const PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_setattr entered\n"); - ret = PVFS_isys_setattr(ref, attr, credentials, &op_id, NULL); + ret = PVFS_isys_setattr(ref, attr, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_setattr call", ret); @@ -215,7 +218,8 @@ static PINT_sm_action setattr_msg_setup_ sm_p->object_ref.handle, objtype, sm_p->u.setattr.sys_attr, - 0); + 0, + sm_p->hints); /* clients should not be able to mess with dfile and distribution * information here. Those parameters should only be set at create time. Index: src/client/sysint/sys-small-io.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-small-io.sm,v retrieving revision 1.15 diff -u -a -p -r1.15 sys-small-io.sm --- src/client/sysint/sys-small-io.sm 30 Aug 2007 00:13:42 -0000 1.15 +++ src/client/sysint/sys-small-io.sm 15 Sep 2007 00:27:06 -0000 @@ -168,7 +168,8 @@ static PINT_sm_action small_io_setup_msg sm_p->u.io.file_req, sm_p->u.io.file_req_offset, regions, - PINT_REQUEST_TOTAL_BYTES(sm_p->u.io.mem_req)); + PINT_REQUEST_TOTAL_BYTES(sm_p->u.io.mem_req), + sm_p->hints); sm_p->msgarray[i].fs_id = sm_p->object_ref.fs_id; sm_p->msgarray[i].handle = sm_p->object_ref.handle; Index: src/client/sysint/sys-statfs.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-statfs.sm,v retrieving revision 1.7 diff -u -a -p -r1.7 sys-statfs.sm --- src/client/sysint/sys-statfs.sm 30 Aug 2007 00:13:42 -0000 1.7 +++ src/client/sysint/sys-statfs.sm 15 Sep 2007 00:27:06 -0000 @@ -53,6 +53,7 @@ PVFS_error PVFS_isys_statfs( const PVFS_credentials *credentials, PVFS_sysresp_statfs *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PINT_smcb *smcb = NULL; @@ -140,9 +141,11 @@ PVFS_error PVFS_isys_statfs( PINT_smcb_free(smcb); return -PVFS_ENOMEM; } + + PVFS_hint_copy(hints, &sm_p->hints); return PINT_client_state_machine_post( - smcb, op_id, user_ptr); + smcb, op_id, user_ptr); } /** Obtain file system statistics. @@ -150,7 +153,8 @@ PVFS_error PVFS_isys_statfs( PVFS_error PVFS_sys_statfs( PVFS_fs_id fs_id, const PVFS_credentials *credentials, - PVFS_sysresp_statfs* resp) + PVFS_sysresp_statfs* resp, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -158,7 +162,7 @@ PVFS_error PVFS_sys_statfs( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_statfs entered\n"); ret = PVFS_isys_statfs( - fs_id, credentials, resp, &op_id, NULL); + fs_id, credentials, resp, &op_id, hints, NULL); if (ret) { Index: src/client/sysint/sys-symlink.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-symlink.sm,v retrieving revision 1.70 diff -u -a -p -r1.70 sys-symlink.sm --- src/client/sysint/sys-symlink.sm 30 Aug 2007 00:13:42 -0000 1.70 +++ src/client/sysint/sys-symlink.sm 15 Sep 2007 00:27:06 -0000 @@ -1,5 +1,5 @@ -/* - * (C) 2003 Clemson University and The University of Chicago +/* + * (C) 2003 Clemson University and The University of Chicago * * See COPYING in top-level directory. */ @@ -150,6 +150,7 @@ PVFS_error PVFS_isys_symlink( const PVFS_credentials *credentials, PVFS_sysresp_symlink *resp, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -200,6 +201,7 @@ PVFS_error PVFS_isys_symlink( sm_p->u.sym.stored_error_code = 0; sm_p->u.sym.retry_count = 0; sm_p->object_ref = parent_ref; + PVFS_hint_copy(hints, &sm_p->hints); gossip_debug( GOSSIP_CLIENT_DEBUG, "Symlinking %s under parent handle %llu " @@ -218,7 +220,8 @@ PVFS_error PVFS_sys_symlink( char *target, PVFS_sys_attr attr, const PVFS_credentials *credentials, - PVFS_sysresp_symlink *resp) + PVFS_sysresp_symlink *resp, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -226,7 +229,7 @@ PVFS_error PVFS_sys_symlink( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_symlink entered\n"); ret = PVFS_isys_symlink(entry_name, parent_ref, target, attr, - credentials, resp, &op_id, NULL); + credentials, resp, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_symlink call", ret); @@ -273,7 +276,7 @@ static PINT_sm_action symlink_init( PVFS_ATTR_COMMON_ALL, PVFS_TYPE_DIRECTORY, 0); - + return ret; } @@ -281,9 +284,8 @@ static int symlink_create_comp_fn(void * struct PVFS_server_resp *resp_p, int index) { - PINT_smcb *smcb = v_p; - PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - + PINT_client_sm *sm_p = (PINT_client_sm *)v_p; + gossip_debug(GOSSIP_CLIENT_DEBUG, "symlink_create_comp_fn\n"); assert(resp_p->op == PVFS_SERV_CREATE); @@ -381,7 +383,8 @@ static PINT_sm_action symlink_dspace_cre *sm_p->cred_p, sm_p->object_ref.fs_id, PVFS_TYPE_SYMLINK, - meta_handle_extent_array); + meta_handle_extent_array, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = meta_handle_extent_array.extent_array[0].first; @@ -419,7 +422,8 @@ static PINT_sm_action symlink_crdirent_s sm_p->u.sym.link_name, sm_p->u.sym.symlink_handle, sm_p->object_ref.handle, - sm_p->object_ref.fs_id); + sm_p->object_ref.fs_id, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; @@ -471,7 +475,8 @@ static PINT_sm_action symlink_setattr_se sm_p->u.sym.symlink_handle, PVFS_TYPE_SYMLINK, sm_p->u.sym.sys_attr, - PVFS_ATTR_SYMLNK_ALL); + PVFS_ATTR_SYMLNK_ALL, + sm_p->hints); /* fill in symlink specific attributes */ msg_p->req.u.setattr.attr.u.sym.target_path = @@ -521,7 +526,8 @@ static PINT_sm_action symlink_delete_han msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, - sm_p->u.sym.symlink_handle); + sm_p->u.sym.symlink_handle, + sm_p->hints); msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->u.sym.symlink_handle; @@ -566,8 +572,8 @@ static PINT_sm_action symlink_cleanup( sm_p->u.sym.sym_resp->ref = symlink_ref; /* insert newly created symlink into the ncache */ - PINT_ncache_update((const char*) sm_p->u.sym.link_name, - (const PVFS_object_ref*) &symlink_ref, + PINT_ncache_update((const char*) sm_p->u.sym.link_name, + (const PVFS_object_ref*) &symlink_ref, (const PVFS_object_ref*) &(sm_p->object_ref)); } else if ((PVFS_ERROR_CLASS(-sm_p->error_code) == PVFS_ERROR_BMI) && Index: src/client/sysint/sys-truncate.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-truncate.sm,v retrieving revision 1.56 diff -u -a -p -r1.56 sys-truncate.sm --- src/client/sysint/sys-truncate.sm 30 Aug 2007 00:13:42 -0000 1.56 +++ src/client/sysint/sys-truncate.sm 15 Sep 2007 00:27:06 -0000 @@ -74,6 +74,7 @@ PVFS_error PVFS_isys_truncate( PVFS_size size, const PVFS_credentials *credentials, PVFS_sys_op_id *op_id, + PVFS_hint hints, void *user_ptr) { PVFS_error ret = -PVFS_EINVAL; @@ -111,6 +112,7 @@ PVFS_error PVFS_isys_truncate( PINT_init_sysint_credentials(sm_p->cred_p, credentials); sm_p->u.truncate.size = size; sm_p->object_ref = ref; + PVFS_hint_copy(hints, &sm_p->hints); PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, @@ -126,7 +128,8 @@ PVFS_error PVFS_isys_truncate( PVFS_error PVFS_sys_truncate( PVFS_object_ref ref, PVFS_size size, - const PVFS_credentials *credentials) + const PVFS_credentials *credentials, + PVFS_hint hints) { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; @@ -134,7 +137,7 @@ PVFS_error PVFS_sys_truncate( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_truncate entered with %lld\n", lld(size)); - ret = PVFS_isys_truncate(ref, size, credentials, &op_id, NULL); + ret = PVFS_isys_truncate(ref, size, credentials, &op_id, hints, NULL); if (ret) { PVFS_perror_gossip("PVFS_isys_truncate call", ret); @@ -221,7 +224,8 @@ static PINT_sm_action truncate_datafile_ *sm_p->cred_p, sm_p->object_ref.fs_id, new_dfile_size, - attr->u.meta.dfile_array[i]); + attr->u.meta.dfile_array[i], + sm_p->hints); /* no callback. the status will be in the generic response structure Index: src/common/misc/fsck-utils.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/common/misc/fsck-utils.c,v retrieving revision 1.4 diff -u -a -p -r1.4 fsck-utils.c --- src/common/misc/fsck-utils.c 17 Aug 2007 04:04:24 -0000 1.4 +++ src/common/misc/fsck-utils.c 15 Sep 2007 00:27:06 -0000 @@ -480,7 +480,7 @@ int PVFS_fsck_validate_metafile( err = PVFS_mgmt_get_dfile_array(*obj_ref, (PVFS_credentials *) creds, - df_handles, attributes->attr.dfile_count); + df_handles, attributes->attr.dfile_count, NULL); if(err < 0) { PVFS_perror("PVFS_mgmt_get_dfile_array", err); @@ -786,7 +786,7 @@ int PVFS_fsck_validate_dir( /* get the dirdata handle and validate */ err = PVFS_mgmt_get_dirdata_handle - (*obj_ref, &dirdata_handle, (PVFS_credentials *) creds); + (*obj_ref, &dirdata_handle, (PVFS_credentials *) creds, NULL); if(err < 0) { gossip_err("Error: unable to get dirdata handle\n"); @@ -810,7 +810,7 @@ int PVFS_fsck_validate_dir( err = PVFS_sys_readdir(*obj_ref, token, MAX_DIR_ENTS, - (PVFS_credentials *) creds, &readdir_resp); + (PVFS_credentials *) creds, &readdir_resp, NULL); if(err < 0) { gossip_err("Error: could not read directory entries\n"); @@ -946,7 +946,7 @@ int PVFS_fsck_get_attributes( int ret = 0; ret = PVFS_sys_getattr - (*pref, PVFS_ATTR_SYS_ALL, (PVFS_credentials *) creds, getattr_resp); + (*pref, PVFS_ATTR_SYS_ALL, (PVFS_credentials *) creds, getattr_resp, NULL); if(ret < 0) { gossip_err("Error: unable to retrieve attributes\n"); @@ -1123,7 +1123,7 @@ static int PINT_handle_wrangler_load_han (PVFS_credentials *) creds, stat_array, PINT_handle_wrangler_handlelist.addr_array, - server_count, NULL); + server_count, NULL, NULL); if(err < 0) { ret = -PVFS_ENOMEM; @@ -1250,7 +1250,7 @@ static int PINT_handle_wrangler_load_han handle_count_array, position_array, PINT_handle_wrangler_handlelist. - addr_array, server_count, NULL); + addr_array, server_count, NULL, NULL); if(err < 0) { PVFS_perror_gossip("PVFS_mgmt_iterate_handles", err); Index: src/common/misc/mkspace.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/common/misc/mkspace.c,v retrieving revision 1.43 diff -u -a -p -r1.43 mkspace.c --- src/common/misc/mkspace.c 18 Oct 2006 16:01:10 -0000 1.43 +++ src/common/misc/mkspace.c 15 Sep 2007 00:27:06 -0000 @@ -286,7 +286,7 @@ int pvfs2_mkspace( coll_id, &extent_array, &new_root_handle, PVFS_TYPE_DIRECTORY, NULL, (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), - NULL, trove_context, &op_id); + NULL, trove_context, &op_id, NULL); while (ret == 0) { @@ -338,7 +338,7 @@ int pvfs2_mkspace( ret = trove_dspace_setattr( coll_id, new_root_handle, &attr, TROVE_SYNC, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -390,7 +390,7 @@ int pvfs2_mkspace( ret = trove_dspace_create( coll_id, &extent_array, &root_dirdata_handle, PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -417,7 +417,7 @@ int pvfs2_mkspace( ret = trove_keyval_write( coll_id, new_root_handle, &key, &val, TROVE_SYNC, 0, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -466,7 +466,7 @@ int pvfs2_mkspace( ret = trove_dspace_create( coll_id, &extent_array, &lost_and_found_handle, PVFS_TYPE_DIRECTORY, NULL, TROVE_SYNC, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -497,7 +497,7 @@ int pvfs2_mkspace( ret = trove_dspace_setattr( coll_id, lost_and_found_handle, &attr, TROVE_SYNC, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -540,7 +540,7 @@ int pvfs2_mkspace( ret = trove_dspace_create( coll_id, &extent_array, &lost_and_found_dirdata_handle, PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, - trove_context, &op_id); + trove_context, &op_id, NULL); while (ret == 0) { @@ -568,7 +568,7 @@ int pvfs2_mkspace( ret = trove_keyval_write( coll_id, lost_and_found_handle, &key, &val, TROVE_SYNC, - 0, NULL, trove_context, &op_id); + 0, NULL, trove_context, &op_id, NULL); while (ret == 0) { @@ -601,7 +601,7 @@ int pvfs2_mkspace( coll_id, root_dirdata_handle, &key, &val, TROVE_SYNC | TROVE_NOOVERWRITE | TROVE_KEYVAL_HANDLE_COUNT, 0, - NULL, trove_context, &op_id); + NULL, trove_context, &op_id, NULL); while (ret == 0) { Index: src/common/misc/module.mk.in =================================================================== RCS file: /projects/cvsroot/pvfs2/src/common/misc/module.mk.in,v retrieving revision 1.32 diff -u -a -p -r1.32 module.mk.in --- src/common/misc/module.mk.in 16 Apr 2007 19:20:42 -0000 1.32 +++ src/common/misc/module.mk.in 15 Sep 2007 00:27:06 -0000 @@ -19,7 +19,8 @@ LIBSRC += $(DIR)/server-config.c \ $(DIR)/tcache.c \ $(DIR)/state-machine-fns.c \ $(DIR)/fsck-utils.c \ - $(DIR)/pint-eattr.c + $(DIR)/pint-eattr.c \ + $(DIR)/pint-hint.c SERVERSRC += $(DIR)/server-config.c \ $(DIR)/server-config-mgr.c \ $(DIR)/str-utils.c \ @@ -34,7 +35,8 @@ SERVERSRC += $(DIR)/server-config.c \ $(DIR)/tcache.c \ $(DIR)/state-machine-fns.c \ $(DIR)/void.c \ - $(DIR)/pint-eattr.c + $(DIR)/pint-eattr.c \ + $(DIR)/pint-hint.c MODCFLAGS_$(DIR)/server-config.c = \ -I$(srcdir)/src/server Index: src/common/misc/msgpairarray.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/common/misc/msgpairarray.sm,v retrieving revision 1.44 diff -u -a -p -r1.44 msgpairarray.sm --- src/common/misc/msgpairarray.sm 30 Aug 2007 00:13:43 -0000 1.44 +++ src/common/misc/msgpairarray.sm 15 Sep 2007 00:27:06 -0000 @@ -264,7 +264,8 @@ static PINT_sm_action msgpairarray_post( &msg_p->recv_status, &msg_p->recv_id, sm_p->msgarray_params.job_context, - sm_p->msgarray_params.job_timeout); + sm_p->msgarray_params.job_timeout, + sm_p->hints); if (ret == 0) { /* perform a quick test to see if the recv failed before posting @@ -336,7 +337,8 @@ static PINT_sm_action msgpairarray_post( &msg_p->send_status, &msg_p->send_id, sm_p->msgarray_params.job_context, - sm_p->msgarray_params.job_timeout); + sm_p->msgarray_params.job_timeout, + sm_p->hints); if ((ret < 0) || ((ret == 1) && (msg_p->send_status.error_code != 0))) Index: src/common/misc/pint-hint.c =================================================================== RCS file: src/common/misc/pint-hint.c diff -N src/common/misc/pint-hint.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/common/misc/pint-hint.c 15 Sep 2007 00:27:06 -0000 @@ -0,0 +1,408 @@ +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +#define __PINT_REQPROTO_ENCODE_FUNCS_C + +#include +#include +#include +#include +#include "pint-hint.h" +#include "gossip.h" +#include + +DEFINE_STATIC_ENDECODE_FUNCS(uint64_t, uint64_t); +DEFINE_STATIC_ENDECODE_FUNCS(int64_t, int64_t); +DEFINE_STATIC_ENDECODE_FUNCS(uint32_t, uint32_t); +DEFINE_STATIC_ENDECODE_FUNCS(int32_t, int32_t); +DEFINE_STATIC_ENDECODE_FUNCS(string, char *); + +struct PINT_hint_info +{ + enum PINT_hint_type type; + int flags; + const char * name; + void (*encode)(char **pptr, void *value); + void (*decode)(char **pptr, void *value); + int length; +}; + +static const struct PINT_hint_info hint_types[] = { + + {PINT_HINT_REQUEST_ID, + PINT_HINT_TRANSFER, + PVFS_HINT_REQUEST_ID_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_CLIENT_ID, + PINT_HINT_TRANSFER, + PVFS_HINT_CLIENT_ID_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_HANDLE, + PINT_HINT_TRANSFER, + PVFS_HINT_HANDLE_NAME, + encode_func_uint64_t, + decode_func_uint64_t, + sizeof(uint32_t)}, + + {0} +}; + +static const struct PINT_hint_info *PINT_hint_get_info_by_type(int type) +{ + int j = 0; + while(hint_types[j].type != 0) + { + if(type == hint_types[j].type) + { + return &hint_types[j]; + } + } + + return NULL; +} + +static const struct PINT_hint_info * +PINT_hint_get_info_by_name(const char *name) +{ + int j = 0; + while(hint_types[j].type != 0) + { + if(!strcmp(name, hint_types[j].name)) + { + return &hint_types[j]; + } + } + return NULL; +} + +int PVFS_hint_add( + PVFS_hint *hint, + const char *type, + int length, + void *value) +{ + const struct PINT_hint_info *info; + PINT_hint * new_hint = calloc(1, sizeof(PINT_hint)); + if (!new_hint) + { + return -PVFS_ENOMEM; + } + + new_hint->length = length; + new_hint->value = malloc(new_hint->length); + if(!new_hint->value) + { + free(new_hint); + return -PVFS_ENOMEM; + } + + memcpy(new_hint->value, value, length); + + info = PINT_hint_get_info_by_name(type); + if(info) + { + new_hint->type = info->type; + new_hint->flags = info->flags; + new_hint->encode = info->encode; + new_hint->decode = info->decode; + } + else + { + new_hint->type = PINT_HINT_UNKNOWN; + new_hint->type_string = strdup(type); + + /* always transfer unknown hints */ + new_hint->flags = PINT_HINT_TRANSFER; + new_hint->encode = encode_func_string; + new_hint->decode = decode_func_string; + } + + new_hint->next = *hint; + *hint = new_hint; + + return 0; +} + +void encode_PINT_hint(char **pptr, const PINT_hint *hint) +{ + int transfer_count = 0; + const PINT_hint *tmp_hint = hint; + + /* count up the transferable hints */ + while(tmp_hint) + { + if(tmp_hint->flags & PINT_HINT_TRANSFER) + { + transfer_count++; + } + + tmp_hint = tmp_hint->next; + } + + /* encode the number of hints to be transferred */ + encode_uint32_t(pptr, &transfer_count); + + tmp_hint = hint; + while(tmp_hint) + { + /* encode the hint type */ + encode_uint32_t(pptr, &tmp_hint->type); + + /* if the type is unknown, encode the type string */ + if(tmp_hint->type == PINT_HINT_UNKNOWN) + { + encode_string(pptr, &tmp_hint->type_string); + } + + /* encode the hint using the encode function provided */ + tmp_hint->encode(pptr, tmp_hint->value); + + tmp_hint = tmp_hint->next; + } +} + +void decode_PINT_hint(char **pptr, PINT_hint **hint) +{ + int count, i, type; + PINT_hint *new_hint = NULL; + const struct PINT_hint_info *info; + + decode_uint32_t(pptr, &count); + + for(i = 0; i < count; ++i) + { + decode_uint32_t(pptr, &type); + info = PINT_hint_get_info_by_type(type); + if(info) + { + char **start; + int len; + void *value = malloc((*hint)->length); + if(!value) + { + return; + } + + start = pptr; + info->decode(pptr, value); + len = (pptr - start); + PVFS_hint_add(&new_hint, info->name, len, value); + } + else + { + char *type_string; + char *value; + /* not a recognized hint, assume its a string */ + decode_string(pptr, &type_string); + decode_string(pptr, &value); + PVFS_hint_add(&new_hint, type_string, strlen(value) + 1, value); + } + } + + *hint = new_hint; +} + +int PVFS_hint_copy(PVFS_hint old_hint, PVFS_hint *new_hint) +{ + const struct PINT_hint_info *info; + PINT_hint *h = old_hint; + const char *name; + + info = PINT_hint_get_info_by_type(h->type); + if(!info) + { + name = h->type_string; + } + else + { + name = info->name; + } + + while(h) + { + PVFS_hint_add(new_hint, name, h->length, h->value); + h = h->next; + } + return 0; +} + +void PVFS_hint_free(PVFS_hint hint) +{ + PINT_hint * act = hint; + PINT_hint * old; + + while(act != NULL) + { + old = act; + act = act->next; + + free(old->value); + free(old); + } +} + +/* + * example environment variable + * PVFS2_HINTS = + *'pvfs.hint.request_id:10+pvfs.hint.client_id:30' + */ +int PVFS_hint_import_env(PVFS_hint * out_hint) +{ + char * env; + char * env_copy; + char * save_ptr; + char * aktvar; + char name[PVFS_HINT_MAX_NAME_LENGTH]; + int len; + const struct PINT_hint_info *info; + PINT_hint *hint = NULL; + int ret; + + if( out_hint == NULL ) + { + return 1; + } + env = getenv("PVFS2_HINTS"); + if( env == NULL ) + { + return 0; + } + len = strlen(env); + env_copy = (char *) malloc(sizeof(char) * (len+1)); + strncpy(env_copy, env, len+1); + + /* parse hints and do not overwrite already specified hints !*/ + aktvar = strtok_r(env_copy, "+", & save_ptr); + while( aktvar != NULL ) + { + char * rest; + + rest = index(aktvar, ':'); + if (rest == NULL) + { + gossip_err("Environment variable PVFS2_HINTS is " + "malformed starting with: %s\n", + save_ptr); + free(env_copy); + return 0; + } + + *rest = 0; + + sprintf(name, "pvfs2.hint.%s", aktvar); + info = PINT_hint_get_info_by_name(name); + if(info) + { + /* a bit of a hack..if we know the type and its + * an int, we convert from a string + */ + if(info->encode == encode_func_uint32_t) + { + uint32_t val; + sscanf(rest+1, "%u", &val); + ret = PVFS_hint_add(&hint, info->name, sizeof(val), &val); + } + else if(info->encode == encode_func_uint64_t) + { + uint32_t val; + sscanf(rest+1, "%u", &val); + ret = PVFS_hint_add(&hint, info->name, sizeof(val), &val); + } + else if(info->encode == encode_func_string) + { + /* just pass the string along as the hint value */ + ret = PVFS_hint_add(&hint, info->name, strlen(rest+1), rest+1); + } + else + { + /* Can't specify a complex hint in the PVFS2_HINTS environment + * variable. + */ + ret = -PVFS_EINVAL; + } + } + else + { + /* Hint not recognized, so we store it with its name */ + ret = PVFS_hint_add(&hint, name, strlen(rest+1), rest+1); + } + + if(ret < 0) + { + /* hint parsing failed */ + PVFS_hint_free(hint); + free(env_copy); + return ret; + } + + aktvar = strtok_r(NULL, "+", & save_ptr); + } + + free(env_copy); + return 0; +} + +void *PINT_hint_get_value_by_type( + PINT_hint *hint, enum PINT_hint_type type, int *length) +{ + PINT_hint *h; + + h = hint; + + while(h) + { + if(hint->type == type) + { + if(length) + { + *length = h->length; + } + return h->value; + } + + h = h->next; + } + return NULL; +} + +void *PINT_hint_get_value_by_name( + PINT_hint *hint, const char *name, int *length) +{ + PINT_hint *h; + + h = hint; + + while(h) + { + if(!strcmp(hint->type_string, name)) + { + if(length) + { + *length = h->length; + } + return h->value; + } + + h = h->next; + } + return NULL; +} + +/* + * Local variables: + * mode: c + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ft=c ts=8 sts=4 sw=4 expandtab + */ Index: src/common/misc/pint-hint.h =================================================================== RCS file: src/common/misc/pint-hint.h diff -N src/common/misc/pint-hint.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/common/misc/pint-hint.h 15 Sep 2007 00:27:06 -0000 @@ -0,0 +1,60 @@ + +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +#ifndef __PINT_HINT_H__ +#define __PINT_HINT_H__ + +#define PVFS_HINT_MAX 24 +#define PVFS_HINT_MAX_LENGTH 1024 +#define PVFS_HINT_MAX_NAME_LENGTH 512 + +#include "pvfs2-hint.h" + +enum PINT_hint_type +{ + PINT_HINT_UNKNOWN = 0, + PINT_HINT_REQUEST_ID, + PINT_HINT_CLIENT_ID, + PINT_HINT_HANDLE +}; + +typedef struct PVFS_hint_s +{ + enum PINT_hint_type type; + char *type_string; + char *value; + int32_t length; + + void (*encode)(char **pptr, void *value); + void (*decode)(char **pptr, void *value); + + int flags; + struct PVFS_hint_s *next; + int count; + +} PINT_hint; + +void encode_PINT_hint(char **pptr, const PINT_hint *hint); +void decode_PINT_hint(char **pptr, PINT_hint **hint); + +void *PINT_hint_get_value_by_type(PINT_hint *hint, enum PINT_hint_type type, + int *length); + +void *PINT_hint_get_value_by_name( + PINT_hint *hint, const char *name, int *length); + +#endif /* __PINT_HINT_H__ */ + +/* + * Local variables: + * mode: c + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ft=c ts=8 sts=4 sw=4 expandtab + */ Index: src/io/buffer/ncac-trove.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/buffer/ncac-trove.c,v retrieving revision 1.7 diff -u -a -p -r1.7 ncac-trove.c --- src/io/buffer/ncac-trove.c 27 May 2006 23:50:03 -0000 1.7 +++ src/io/buffer/ncac-trove.c 15 Sep 2007 00:27:06 -0000 @@ -117,7 +117,7 @@ int NCAC_aio_read_ext( PVFS_fs_id coll_i NULL, /* vtag */ user_ptr_array, context, - &op_id); + &op_id, NULL); if (ret < 0) { NCAC_error("trove listio read failed\n"); @@ -212,7 +212,7 @@ int NCAC_aio_write( PVFS_fs_id coll_id, NULL, /* vtag */ user_ptr_array, context, - &op_id); + &op_id, NULL); if (ret < 0) { NCAC_error("trove listio read failed\n"); @@ -247,7 +247,7 @@ int do_read_for_rmw(PVFS_fs_id coll_id, ret = trove_bstream_read_at(coll_id, handle, buf, &inout_size, 0, 0, NULL, NULL, - context, &op_id); + context, &op_id, NULL); DPRINT("do_read_for_rmw; req=%lld\n", op_id); @@ -392,7 +392,7 @@ int init_io_read( PVFS_fs_id coll_id, PV NULL, /* vtag */ user_ptr_array, context, - ioreq); + ioreq, NULL); if (ret < 0) { NCAC_error("trove read at failed\n"); Index: src/io/description/pint-request.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/description/pint-request.h,v retrieving revision 1.35 diff -u -a -p -r1.35 pint-request.h --- src/io/description/pint-request.h 9 May 2007 17:45:28 -0000 1.35 +++ src/io/description/pint-request.h 15 Sep 2007 00:27:06 -0000 @@ -65,7 +65,7 @@ typedef struct PINT_Request { #define PVFS_REQUEST_ENCODED_SIZE \ ((sizeof(PVFS_offset) * 3) + (sizeof(PVFS_size) * 2) + \ - (sizeof(int32_t) * 7) + (sizeof(uint32_t) * 2) + 4) + (sizeof(int32_t) * 6) + (sizeof(uint32_t) * 2) + (sizeof(uint64_t)) + 4) typedef struct PINT_reqstack { int64_t el; /* number of element being processed */ Index: src/io/flow/flow.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/flow/flow.h,v retrieving revision 1.37 diff -u -a -p -r1.37 flow.h --- src/io/flow/flow.h 1 Jun 2007 20:58:04 -0000 1.37 +++ src/io/flow/flow.h 15 Sep 2007 00:27:06 -0000 @@ -143,6 +143,8 @@ struct flow_descriptor PINT_Request_state *file_req_state; PINT_Request_state *mem_req_state; PINT_Request_result result; + + PVFS_hint hints; }; typedef struct flow_descriptor flow_descriptor; Index: src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.c,v retrieving revision 1.117 diff -u -a -p -r1.117 flowproto-multiqueue.c --- src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.c 1 Jun 2007 20:58:04 -0000 1.117 +++ src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.c 15 Sep 2007 00:27:06 -0000 @@ -752,7 +752,8 @@ static void bmi_recv_callback_fn(void *u NULL, &result_tmp->trove_callback, global_trove_context, - &result_tmp->posted_id); + &result_tmp->posted_id, + flow_data->parent->hints); result_tmp = result_tmp->next; @@ -1248,7 +1249,8 @@ static int bmi_send_callback_fn(void *us NULL, &result_tmp->trove_callback, global_trove_context, - &result_tmp->posted_id); + &result_tmp->posted_id, + flow_data->parent->hints); result_tmp = result_tmp->next; Index: src/io/job/job-desc-queue.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/job/job-desc-queue.c,v retrieving revision 1.17 diff -u -a -p -r1.17 job-desc-queue.c --- src/io/job/job-desc-queue.c 22 Aug 2007 16:12:48 -0000 1.17 +++ src/io/job/job-desc-queue.c 15 Sep 2007 00:27:06 -0000 @@ -16,6 +16,7 @@ #include "job-desc-queue.h" #include "gossip.h" #include "id-generator.h" +#include "pint-util.h" /*************************************************************** * Visible functions @@ -41,6 +42,7 @@ struct job_desc *alloc_job_desc(int type id_gen_fast_register(&(jd->job_id), jd); jd->type = type; + return (jd); }; @@ -92,7 +94,7 @@ void job_desc_q_cleanup(job_desc_q_p jdq qlist_for_each_safe(iterator, scratch, jdqp) { tmp_job_desc = qlist_entry(iterator, struct job_desc, - job_desc_q_link); + job_desc_q_link); /* qlist_for_each_safe lets us iterate and remove nodes. no * need to adjust pointers as we are freeing everything */ free(tmp_job_desc); Index: src/io/job/job-desc-queue.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/job/job-desc-queue.h,v retrieving revision 1.26 diff -u -a -p -r1.26 job-desc-queue.h --- src/io/job/job-desc-queue.h 7 Dec 2004 15:09:29 -0000 1.26 +++ src/io/job/job-desc-queue.h 15 Sep 2007 00:27:06 -0000 @@ -100,6 +100,7 @@ struct job_desc struct PINT_thread_mgr_bmi_callback bmi_callback; /* callback information */ struct PINT_thread_mgr_trove_callback trove_callback; /* callback information */ enum PVFS_event_op event_type; + PVFS_hint hints; /* union of information for lower level interfaces */ union Index: src/io/job/job.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/job/job.c,v retrieving revision 1.174 diff -u -a -p -r1.174 job.c --- src/io/job/job.c 22 Aug 2007 16:12:48 -0000 1.174 +++ src/io/job/job.c 15 Sep 2007 00:27:06 -0000 @@ -26,11 +26,11 @@ #include "pint-event.h" #include "job-time-mgr.h" -#define JOB_EVENT_START(__op, __id) \ +#define JOB_EVENT_START(__op, __id, __hint) \ PINT_event_timestamp(PVFS_EVENT_API_JOB, __op, 0, __id, \ PVFS_EVENT_FLAG_START) -#define JOB_EVENT_END(__op, __size, __id) \ +#define JOB_EVENT_END(__op, __size, __id, __hint) \ PINT_event_timestamp(PVFS_EVENT_API_JOB, __op, __size, __id, \ PVFS_EVENT_FLAG_END) @@ -318,7 +318,8 @@ int job_bmi_send(PVFS_BMI_addr_t addr, job_status_s * out_status_p, job_id_t * id, job_context_id context_id, - int timeout_sec) + int timeout_sec, + PVFS_hint hints) { /* post a bmi send. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -344,13 +345,15 @@ int job_bmi_send(PVFS_BMI_addr_t addr, jd->bmi_callback.fn = bmi_thread_mgr_callback; jd->bmi_callback.data = (void*)jd; user_ptr_internal = &jd->bmi_callback; - JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id, hints); + + jd->hints = hints; /* post appropriate type of send */ if (!send_unexpected) { ret = BMI_post_send(&(jd->u.bmi.id), addr, buffer, size, - buffer_type, tag, user_ptr_internal, + buffer_type, tag, user_ptr_internal, global_bmi_context); } else @@ -365,7 +368,7 @@ int job_bmi_send(PVFS_BMI_addr_t addr, /* error posting */ out_status_p->error_code = ret; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -377,14 +380,14 @@ int job_bmi_send(PVFS_BMI_addr_t addr, out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = size; - JOB_EVENT_END(PVFS_EVENT_BMI_SEND, size, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_SEND, size, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; bmi_pending_count++; @@ -414,7 +417,8 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad job_status_s * out_status_p, job_id_t * id, job_context_id context_id, - int timeout_sec) + int timeout_sec, + PVFS_hint hints) { /* post a bmi send. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -440,7 +444,9 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad jd->bmi_callback.fn = bmi_thread_mgr_callback; jd->bmi_callback.data = (void*)jd; user_ptr_internal = &jd->bmi_callback; - JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id, hints); + + jd->hints = hints; /* post appropriate type of send */ if (!send_unexpected) @@ -464,7 +470,7 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad /* error posting */ out_status_p->error_code = ret; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -476,14 +482,14 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = total_size; - JOB_EVENT_END(PVFS_EVENT_BMI_SEND, total_size, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_SEND, total_size, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; bmi_pending_count++; @@ -508,7 +514,8 @@ int job_bmi_recv(PVFS_BMI_addr_t addr, job_status_s * out_status_p, job_id_t * id, job_context_id context_id, - int timeout_sec) + int timeout_sec, + PVFS_hint hints) { /* post a bmi recv. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -526,24 +533,26 @@ int job_bmi_recv(PVFS_BMI_addr_t addr, { return (-ENOMEM); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; jd->bmi_callback.fn = bmi_thread_mgr_callback; jd->bmi_callback.data = (void*)jd; user_ptr_internal = &jd->bmi_callback; - JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id, hints); + ret = BMI_post_recv(&(jd->u.bmi.id), addr, buffer, size, - &(jd->u.bmi.actual_size), buffer_type, tag, - user_ptr_internal, + &(jd->u.bmi.actual_size), buffer_type, tag, + user_ptr_internal, global_bmi_context); if (ret < 0) { /* error posting */ out_status_p->error_code = ret; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -555,15 +564,15 @@ int job_bmi_recv(PVFS_BMI_addr_t addr, out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.bmi.actual_size; - JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; bmi_pending_count++; @@ -592,7 +601,8 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad job_status_s * out_status_p, job_id_t * id, job_context_id context_id, - int timeout_sec) + int timeout_sec, + PVFS_hint hints) { /* post a bmi recv. If it completes (or fails) immediately, then @@ -612,13 +622,14 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad { return (-ENOMEM); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; jd->bmi_callback.fn = bmi_thread_mgr_callback; jd->bmi_callback.data = (void*)jd; user_ptr_internal = &jd->bmi_callback; - JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id, hints); ret = BMI_post_recv_list(&(jd->u.bmi.id), addr, buffer_list, size_list, list_count, total_expected_size, @@ -630,7 +641,7 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad /* error posting */ out_status_p->error_code = ret; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -642,15 +653,15 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.bmi.actual_size; - JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; bmi_pending_count++; @@ -1177,7 +1188,8 @@ int job_flow(flow_descriptor * flow_d, job_status_s * out_status_p, job_id_t * id, job_context_id context_id, - int timeout_sec) + int timeout_sec, + PVFS_hint hints) { struct job_desc *jd = NULL; int ret = -1; @@ -1188,14 +1200,15 @@ int job_flow(flow_descriptor * flow_d, { return (-ENOMEM); } + jd->hints = hints; + flow_d->hints = hints; jd->job_user_ptr = user_ptr; jd->u.flow.flow_d = flow_d; jd->context_id = context_id; jd->status_user_tag = status_user_tag; flow_d->user_ptr = jd; flow_d->callback = flow_callback; - - JOB_EVENT_START(PVFS_EVENT_FLOW, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_FLOW, jd->job_id, flow_d->hints); /* post the flow */ ret = PINT_flow_post(flow_d); @@ -1203,7 +1216,7 @@ int job_flow(flow_descriptor * flow_d, { out_status_p->error_code = ret; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_FLOW, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_FLOW, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -1214,7 +1227,7 @@ int job_flow(flow_descriptor * flow_d, out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = flow_d->total_transferred; - JOB_EVENT_END(PVFS_EVENT_FLOW, flow_d->total_transferred, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_FLOW, flow_d->total_transferred, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (1); @@ -1268,7 +1281,7 @@ int job_flow_cancel(job_id_t id, job_con /* job_trove_bstream_write_at() * - * storage byte stream write + * storage byte stream write * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -1284,7 +1297,8 @@ int job_trove_bstream_write_at(PVFS_fs_i job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove write. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -1302,6 +1316,7 @@ int job_trove_bstream_write_at(PVFS_fs_i { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.actual_size = size; jd->u.trove.vtag = vtag; @@ -1310,14 +1325,14 @@ int job_trove_bstream_write_at(PVFS_fs_i jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_AT, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_AT, jd->job_id, jd->event_id); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_bstream_write_at(coll_id, handle, buffer, &jd->u.trove.actual_size, offset, flags, - jd->u.trove.vtag, user_ptr_internal, - global_trove_context, - &(jd->u.trove.id)); + jd->u.trove.vtag, user_ptr_internal, + global_trove_context, + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1326,7 +1341,7 @@ int job_trove_bstream_write_at(PVFS_fs_i if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1341,8 +1356,8 @@ int job_trove_bstream_write_at(PVFS_fs_i out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.trove.actual_size; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1360,20 +1375,21 @@ int job_trove_bstream_write_at(PVFS_fs_i int job_trove_bstream_write_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, - TROVE_offset *stream_offset_array, + TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void * user_ptr, job_aint status_user_tag, job_status_s *out_status_p, job_id_t *id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove write. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -1392,16 +1408,17 @@ int job_trove_bstream_write_list(TROVE_c return (-errno); } jd->job_user_ptr = user_ptr; + jd->hints = hints; jd->u.trove.vtag = vtag; jd->context_id = context_id; jd->status_user_tag = status_user_tag; jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_LIST, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_LIST, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ - ret = trove_bstream_write_list(coll_id, handle, + ret = trove_bstream_write_list(coll_id, handle, mem_offset_array, mem_size_array, mem_count, stream_offset_array, stream_size_array, @@ -1411,7 +1428,7 @@ int job_trove_bstream_write_list(TROVE_c vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1420,7 +1437,7 @@ int job_trove_bstream_write_list(TROVE_c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1435,8 +1452,8 @@ int job_trove_bstream_write_list(TROVE_c out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.trove.actual_size; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1471,7 +1488,8 @@ int job_trove_bstream_read_at(PVFS_fs_id job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove read. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -1489,6 +1507,7 @@ int job_trove_bstream_read_at(PVFS_fs_id { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.actual_size = size; jd->u.trove.vtag = vtag; @@ -1497,14 +1516,14 @@ int job_trove_bstream_read_at(PVFS_fs_id jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_READ_AT, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_READ_AT, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_bstream_read_at(coll_id, handle, buffer, &jd->u.trove.actual_size, offset, flags, jd->u.trove.vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1513,7 +1532,7 @@ int job_trove_bstream_read_at(PVFS_fs_id if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1528,8 +1547,8 @@ int job_trove_bstream_read_at(PVFS_fs_id out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.trove.actual_size; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1560,7 +1579,8 @@ int job_trove_bstream_read_list(PVFS_fs_ job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove read. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -1578,6 +1598,7 @@ int job_trove_bstream_read_list(PVFS_fs_ { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -1585,10 +1606,10 @@ int job_trove_bstream_read_list(PVFS_fs_ jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_READ_LIST, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_READ_LIST, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ - ret = trove_bstream_read_list(coll_id, handle, + ret = trove_bstream_read_list(coll_id, handle, mem_offset_array, mem_size_array, mem_count, stream_offset_array, stream_size_array, @@ -1596,7 +1617,7 @@ int job_trove_bstream_read_list(PVFS_fs_ out_size_p, flags, jd->u.trove.vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1605,7 +1626,7 @@ int job_trove_bstream_read_list(PVFS_fs_ if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1620,8 +1641,8 @@ int job_trove_bstream_read_list(PVFS_fs_ out_status_p->status_user_tag = status_user_tag; out_status_p->actual_size = jd->u.trove.actual_size; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, out_status_p->actual_size, - jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, out_status_p->actual_size, + jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1651,8 +1672,9 @@ int job_trove_bstream_flush(PVFS_fs_id c job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) - + job_context_id context_id, + PVFS_hint hints) + { int ret = -1; struct job_desc *jd = NULL; @@ -1672,11 +1694,11 @@ int job_trove_bstream_flush(PVFS_fs_id c jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_FLUSH, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_FLUSH, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_bstream_flush(coll_id, handle, flags, user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1685,7 +1707,7 @@ int job_trove_bstream_flush(PVFS_fs_id c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1697,7 +1719,7 @@ int job_trove_bstream_flush(PVFS_fs_id c /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1729,11 +1751,12 @@ int job_trove_keyval_read(PVFS_fs_id col job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval read. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -1747,6 +1770,7 @@ int job_trove_keyval_read(PVFS_fs_id col { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -1754,12 +1778,12 @@ int job_trove_keyval_read(PVFS_fs_id col jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_read(coll_id, handle, key_p, val_p, flags, - jd->u.trove.vtag, user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + jd->u.trove.vtag, user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1768,7 +1792,7 @@ int job_trove_keyval_read(PVFS_fs_id col if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1782,7 +1806,7 @@ int job_trove_keyval_read(PVFS_fs_id col out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1817,11 +1841,12 @@ int job_trove_keyval_read_list(PVFS_fs_i job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval read. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -1835,6 +1860,7 @@ int job_trove_keyval_read_list(PVFS_fs_i { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -1842,13 +1868,13 @@ int job_trove_keyval_read_list(PVFS_fs_i jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ - ret = trove_keyval_read_list(coll_id, handle, key_array, val_array, - err_array, count, flags, jd->u.trove.vtag, + ret = trove_keyval_read_list(coll_id, handle, key_array, val_array, + err_array, count, flags, jd->u.trove.vtag, user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1857,7 +1883,7 @@ int job_trove_keyval_read_list(PVFS_fs_i if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1871,7 +1897,7 @@ int job_trove_keyval_read_list(PVFS_fs_i out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1889,7 +1915,7 @@ int job_trove_keyval_read_list(PVFS_fs_i /* job_trove_keyval_write() * - * storage key/value write + * storage key/value write * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -1904,11 +1930,12 @@ int job_trove_keyval_write(PVFS_fs_id co job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval write. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -1922,6 +1949,7 @@ int job_trove_keyval_write(PVFS_fs_id co { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -1929,13 +1957,13 @@ int job_trove_keyval_write(PVFS_fs_id co jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_write(coll_id, handle, key_p, val_p, flags, - jd->u.trove.vtag, user_ptr_internal, + jd->u.trove.vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -1944,7 +1972,7 @@ int job_trove_keyval_write(PVFS_fs_id co if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -1958,7 +1986,7 @@ int job_trove_keyval_write(PVFS_fs_id co out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -1976,7 +2004,7 @@ int job_trove_keyval_write(PVFS_fs_id co /* job_trove_keyval_write_list() * - * storage key/value list write + * storage key/value list write * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -1992,11 +2020,12 @@ int job_trove_keyval_write_list(PVFS_fs_ job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval write. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -2010,6 +2039,7 @@ int job_trove_keyval_write_list(PVFS_fs_ { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -2017,15 +2047,15 @@ int job_trove_keyval_write_list(PVFS_fs_ jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_write_list(coll_id, handle, key_array, val_array, count, flags, - jd->u.trove.vtag, user_ptr_internal, + jd->u.trove.vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2034,7 +2064,7 @@ int job_trove_keyval_write_list(PVFS_fs_ if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2048,7 +2078,7 @@ int job_trove_keyval_write_list(PVFS_fs_ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2078,7 +2108,8 @@ int job_trove_keyval_flush(PVFS_fs_id co job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { int ret = -1; struct job_desc *jd = NULL; @@ -2098,11 +2129,11 @@ int job_trove_keyval_flush(PVFS_fs_id co jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_FLUSH, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_FLUSH, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_flush(coll_id, handle, flags, user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2111,7 +2142,7 @@ int job_trove_keyval_flush(PVFS_fs_id co if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2124,7 +2155,7 @@ int job_trove_keyval_flush(PVFS_fs_id co /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2148,7 +2179,8 @@ int job_trove_keyval_get_handle_info(PVF job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove operation keyval get handle info. If it completes (or * fails) immediately, then return and fill in the status @@ -2168,22 +2200,25 @@ int job_trove_keyval_get_handle_info(PVF { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_get_handle_info( coll_id, handle, - flags, + flags, info, - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2192,7 +2227,7 @@ int job_trove_keyval_get_handle_info(PVF if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2205,14 +2240,14 @@ int job_trove_keyval_get_handle_info(PVF /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; trove_pending_count++; @@ -2224,7 +2259,7 @@ int job_trove_keyval_get_handle_info(PVF /* job_trove_dspace_getattr() * - * read generic dspace attributes + * read generic dspace attributes * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2236,7 +2271,8 @@ int job_trove_dspace_getattr(PVFS_fs_id job_aint status_user_tag, job_status_s *out_status_p, job_id_t *id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove operation dspace get attr. If it completes (or * fails) immediately, then return and fill in the status @@ -2262,13 +2298,15 @@ int job_trove_dspace_getattr(PVFS_fs_id jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_getattr(coll_id, handle, out_ds_attr_ptr, 0 /* flags */ , - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2277,7 +2315,7 @@ int job_trove_dspace_getattr(PVFS_fs_id if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2290,14 +2328,14 @@ int job_trove_dspace_getattr(PVFS_fs_id /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; trove_pending_count++; @@ -2322,7 +2360,8 @@ int job_trove_dspace_getattr_list(PVFS_f job_aint status_user_tag, job_status_s *out_status_p, job_id_t *id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove operation dspace get attr list. If it completes (or * fails) immediately, then return and fill in the status @@ -2342,13 +2381,16 @@ int job_trove_dspace_getattr_list(PVFS_f { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_getattr_list(coll_id, @@ -2356,8 +2398,8 @@ int job_trove_dspace_getattr_list(PVFS_f handle_array, out_ds_attr_ptr, out_error_array, 0 /* flags */ , - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2366,7 +2408,7 @@ int job_trove_dspace_getattr_list(PVFS_f if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2379,14 +2421,14 @@ int job_trove_dspace_getattr_list(PVFS_f /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; trove_pending_count++; @@ -2397,7 +2439,7 @@ int job_trove_dspace_getattr_list(PVFS_f /* job_trove_dspace_setattr() * - * write generic dspace attributes + * write generic dspace attributes * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2410,7 +2452,8 @@ int job_trove_dspace_setattr(PVFS_fs_id job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove operation dspace set attr. If it completes (or * fails) immediately, then return and fill in the status @@ -2436,13 +2479,13 @@ int job_trove_dspace_setattr(PVFS_fs_id jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_SETATTR, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_SETATTR, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_setattr(coll_id, handle, ds_attr_p, flags, - user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + user_ptr_internal, global_trove_context, + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2451,7 +2494,7 @@ int job_trove_dspace_setattr(PVFS_fs_id if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2464,14 +2507,14 @@ int job_trove_dspace_setattr(PVFS_fs_id /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; trove_pending_count++; @@ -2482,7 +2525,7 @@ int job_trove_dspace_setattr(PVFS_fs_id /* job_trove_bstream_resize() * - * resize (truncate or preallocate) a storage byte stream + * resize (truncate or preallocate) a storage byte stream * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2496,7 +2539,8 @@ int job_trove_bstream_resize(PVFS_fs_id job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a resize trove operation. If it completes (or * fails) immediately, then return and fill in the status @@ -2522,13 +2566,13 @@ int job_trove_bstream_resize(PVFS_fs_id jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_RESIZE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_RESIZE, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_bstream_resize(coll_id, handle, &size, flags, - vtag, user_ptr_internal, global_trove_context, - &(jd->u.trove.id)); + vtag, user_ptr_internal, global_trove_context, + &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2537,7 +2581,7 @@ int job_trove_bstream_resize(PVFS_fs_id if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2550,14 +2594,14 @@ int job_trove_bstream_resize(PVFS_fs_id /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); } /* if we fall to this point, the job did not immediately complete and - * we must queue up to test it later + * we must queue up to test it later */ *id = jd->job_id; trove_pending_count++; @@ -2568,7 +2612,7 @@ int job_trove_bstream_resize(PVFS_fs_id /* job_trove_bstream_validate() * - * check consistency of a bytestream for a given vtag + * check consistency of a bytestream for a given vtag * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2580,7 +2624,8 @@ int job_trove_bstream_validate(PVFS_fs_i job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { gossip_lerr("Error: unimplemented.\n"); return (-ENOSYS); @@ -2588,7 +2633,7 @@ int job_trove_bstream_validate(PVFS_fs_i /* job_trove_keyval_remove() * - * remove a key/value entry + * remove a key/value entry * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2603,11 +2648,12 @@ int job_trove_keyval_remove(PVFS_fs_id c job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval remove. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -2621,6 +2667,7 @@ int job_trove_keyval_remove(PVFS_fs_id c { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->context_id = context_id; @@ -2628,12 +2675,12 @@ int job_trove_keyval_remove(PVFS_fs_id c jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_REMOVE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_REMOVE, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_remove(coll_id, handle, key_p, val_p, flags, - jd->u.trove.vtag, user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + jd->u.trove.vtag, user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2642,7 +2689,7 @@ int job_trove_keyval_remove(PVFS_fs_id c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2656,7 +2703,7 @@ int job_trove_keyval_remove(PVFS_fs_id c out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->vtag = jd->u.trove.vtag; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2674,7 +2721,7 @@ int job_trove_keyval_remove(PVFS_fs_id c /* job_trove_keyval_validate() * - * check consistency of a key/value pair for a given vtag + * check consistency of a key/value pair for a given vtag * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2686,7 +2733,8 @@ int job_trove_keyval_validate(PVFS_fs_id job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { gossip_lerr("Error: unimplemented.\n"); return (-ENOSYS); @@ -2694,7 +2742,7 @@ int job_trove_keyval_validate(PVFS_fs_id /* job_trove_keyval_iterate() * - * iterate through all of the key/value pairs for a data space + * iterate through all of the key/value pairs for a data space * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2711,11 +2759,12 @@ int job_trove_keyval_iterate(PVFS_fs_id job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval iterate. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -2729,6 +2778,7 @@ int job_trove_keyval_iterate(PVFS_fs_id { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->u.trove.position = position; @@ -2738,14 +2788,14 @@ int job_trove_keyval_iterate(PVFS_fs_id jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_iterate(coll_id, handle, &(jd->u.trove.position), key_array, val_array, &(jd->u.trove.count), flags, jd->u.trove.vtag, - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2754,7 +2804,7 @@ int job_trove_keyval_iterate(PVFS_fs_id if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2770,7 +2820,7 @@ int job_trove_keyval_iterate(PVFS_fs_id out_status_p->vtag = jd->u.trove.vtag; out_status_p->position = jd->u.trove.position; out_status_p->count = jd->u.trove.count; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2788,7 +2838,7 @@ int job_trove_keyval_iterate(PVFS_fs_id /* job_trove_keyval_iterate_keys() * - * iterate through all of the keys for a data space + * iterate through all of the keys for a data space * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2804,11 +2854,12 @@ int job_trove_keyval_iterate_keys(PVFS_f job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove keyval iterate_keys. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -2822,6 +2873,7 @@ int job_trove_keyval_iterate_keys(PVFS_f { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.vtag = vtag; jd->u.trove.position = position; @@ -2831,14 +2883,14 @@ int job_trove_keyval_iterate_keys(PVFS_f jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, jd->job_id, hints); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_keyval_iterate_keys(coll_id, handle, - &(jd->u.trove.position), key_array, + &(jd->u.trove.position), key_array, &(jd->u.trove.count), flags, jd->u.trove.vtag, - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -2847,7 +2899,7 @@ int job_trove_keyval_iterate_keys(PVFS_f if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2863,7 +2915,7 @@ int job_trove_keyval_iterate_keys(PVFS_f out_status_p->vtag = jd->u.trove.vtag; out_status_p->position = jd->u.trove.position; out_status_p->count = jd->u.trove.count; - JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2898,8 +2950,8 @@ int job_trove_dspace_iterate_handles(PVF job_context_id context_id) { /* post a trove keyval iterate_handles. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -2922,13 +2974,13 @@ int job_trove_dspace_iterate_handles(PVF jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, jd->job_id, NULL); #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_iterate_handles(coll_id, &(jd->u.trove.position), handle_array, &(jd->u.trove.count), flags, jd->u.trove.vtag, - user_ptr_internal, + user_ptr_internal, global_trove_context, &(jd->u.trove.id)); #else gossip_err("Error: Trove support not enabled.\n"); @@ -2938,7 +2990,7 @@ int job_trove_dspace_iterate_handles(PVF if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id, NULL); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -2954,7 +3006,7 @@ int job_trove_dspace_iterate_handles(PVF out_status_p->vtag = jd->u.trove.vtag; out_status_p->position = jd->u.trove.position; out_status_p->count = jd->u.trove.count; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id, NULL); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -2973,7 +3025,7 @@ int job_trove_dspace_iterate_handles(PVF /* job_trove_dspace_create() * - * create a new data space object + * create a new data space object * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -2987,7 +3039,8 @@ int job_trove_dspace_create(PVFS_fs_id c job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a dspace create. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -3005,6 +3058,7 @@ int job_trove_dspace_create(PVFS_fs_id c { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->u.trove.handle = PVFS_HANDLE_NULL; jd->context_id = context_id; @@ -3012,7 +3066,9 @@ int job_trove_dspace_create(PVFS_fs_id c jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_create(coll_id, @@ -3020,8 +3076,8 @@ int job_trove_dspace_create(PVFS_fs_id c &(jd->u.trove.handle), type, hint, flags, - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -3030,7 +3086,7 @@ int job_trove_dspace_create(PVFS_fs_id c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -3044,7 +3100,7 @@ int job_trove_dspace_create(PVFS_fs_id c out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; out_status_p->handle = jd->u.trove.handle; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -3062,7 +3118,7 @@ int job_trove_dspace_create(PVFS_fs_id c /* job_trove_dspace_remove() * - * remove an entire data space object (byte stream and key/value) + * remove an entire data space object (byte stream and key/value) * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -3074,7 +3130,8 @@ int job_trove_dspace_remove(PVFS_fs_id c job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a dspace remove. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -3098,13 +3155,15 @@ int job_trove_dspace_remove(PVFS_fs_id c jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_REMOVE, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_REMOVE, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_remove(coll_id, handle, flags, - user_ptr_internal, - global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, + global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -3113,7 +3172,7 @@ int job_trove_dspace_remove(PVFS_fs_id c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; out_status_p->error_code = ret; @@ -3126,7 +3185,7 @@ int job_trove_dspace_remove(PVFS_fs_id c /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -3144,7 +3203,7 @@ int job_trove_dspace_remove(PVFS_fs_id c /* job_trove_dspace_verify() * - * verify that a given dataspace exists and discover its type + * verify that a given dataspace exists and discover its type * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -3156,7 +3215,8 @@ int job_trove_dspace_verify(PVFS_fs_id c job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a dspace verify. If it completes (or fails) immediately, then * return and fill in the status structure. If it needs to be tested @@ -3180,13 +3240,15 @@ int job_trove_dspace_verify(PVFS_fs_id c jd->trove_callback.fn = trove_thread_mgr_callback; jd->trove_callback.data = (void*)jd; user_ptr_internal = &jd->trove_callback; - JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_VERIFY, jd->job_id); + JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_VERIFY, jd->job_id, hints); + + #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_dspace_verify(coll_id, - handle, &jd->u.trove.type, + handle, &jd->u.trove.type, flags, - user_ptr_internal, global_trove_context, &(jd->u.trove.id)); + user_ptr_internal, global_trove_context, &(jd->u.trove.id), hints); #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -3195,7 +3257,7 @@ int job_trove_dspace_verify(PVFS_fs_id c if (ret < 0) { /* error posting trove operation */ - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; /* the trove_method will determine what value is returned in immediate @@ -3210,7 +3272,7 @@ int job_trove_dspace_verify(PVFS_fs_id c /* immediate completion */ out_status_p->error_code = 0; out_status_p->status_user_tag = status_user_tag; - JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id); + JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id, hints); dealloc_job_desc(jd); jd = NULL; return (ret); @@ -3300,7 +3362,7 @@ int job_trove_fs_create(char *collname, user_ptr_internal = &jd->trove_callback; #ifdef __PVFS2_TROVE_SUPPORT__ - ret = trove_collection_create(collname, new_coll_id, user_ptr_internal, + ret = trove_collection_create(collname, new_coll_id, user_ptr_internal, &(jd->u.trove.id)); #else gossip_err("Error: Trove support not enabled.\n"); @@ -3338,7 +3400,7 @@ int job_trove_fs_create(char *collname, /* job_trove_fs_remove() * - * remove an existing file system + * remove an existing file system * * returns 0 on success, 1 on immediate completion, and -errno on * failure @@ -3394,7 +3456,7 @@ int job_trove_fs_lookup(char *collname, #ifdef __PVFS2_TROVE_SUPPORT__ ret = trove_collection_lookup( TROVE_METHOD_DBPF, - collname, &(jd->u.trove.fsid), + collname, &(jd->u.trove.fsid), user_ptr_internal, &(jd->u.trove.id)); #else gossip_err("Error: Trove support not enabled.\n"); @@ -3443,11 +3505,12 @@ int job_trove_fs_seteattr(PVFS_fs_id col job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove collection set eattr. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -3461,6 +3524,7 @@ int job_trove_fs_seteattr(PVFS_fs_id col { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; @@ -3521,11 +3585,12 @@ int job_trove_fs_geteattr(PVFS_fs_id col job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id) + job_context_id context_id, + PVFS_hint hints) { /* post a trove collection get eattr. If it completes (or fails) - * immediately, then return and fill in the status structure. - * If it needs to be tested for completion later, then queue + * immediately, then return and fill in the status structure. + * If it needs to be tested for completion later, then queue * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; @@ -3539,6 +3604,7 @@ int job_trove_fs_geteattr(PVFS_fs_id col { return (-errno); } + jd->hints = hints; jd->job_user_ptr = user_ptr; jd->context_id = context_id; jd->status_user_tag = status_user_tag; @@ -3613,7 +3679,7 @@ int job_null( jd->u.null_info.error_code = error_code; gen_mutex_lock(&completion_mutex); - job_desc_q_add(completion_queue_array[jd->context_id], + job_desc_q_add(completion_queue_array[jd->context_id], jd); /* set completed flag while holding queue lock */ jd->completed_flag = 1; @@ -3630,7 +3696,7 @@ int job_null( /* job_test() * * check for completion of a particular job, don't return until - * either job completes or timeout expires + * either job completes or timeout expires * * returns 0 if nothing done, 1 if something done, -errno on failure */ @@ -3658,7 +3724,7 @@ int job_test(job_id_t id, /* job_testsome() * * check for completion of a set of jobs, don't return until - * either all jobs complete or timeout expires + * either all jobs complete or timeout expires * * returns 0 on success, -errno on failure */ @@ -3715,7 +3781,7 @@ int job_testsome(job_id_t * id_array, if(timeout_ms > 0) { - pthread_ret = pthread_cond_timedwait(&completion_cond, + pthread_ret = pthread_cond_timedwait(&completion_cond, &completion_mutex, &pthread_timeout); } @@ -3740,7 +3806,7 @@ int job_testsome(job_id_t * id_array, EINVAL) && pthread_ret != ETIMEDOUT) { /* pthread_cond_wait() gave a weird return code; pass along to - * caller + * caller */ ret = pthread_ret; } @@ -3754,7 +3820,7 @@ int job_testsome(job_id_t * id_array, /* job_testsome() * * check for completion of a set of jobs, don't return until - * either all jobs complete or timeout expires + * either all jobs complete or timeout expires * * returns 0 if nothing done, 1 if something done, -errno on failure */ @@ -3861,7 +3927,7 @@ int job_testsome(job_id_t * id_array, time_exhaust_flag = 1; } else if(timeout_ms < 0) - { + { time_exhaust_flag = 0; } else @@ -3954,7 +4020,7 @@ int job_testcontext(job_id_t * out_id_ar if(timeout_ms > 0) { - pthread_ret = pthread_cond_timedwait(&completion_cond, + pthread_ret = pthread_cond_timedwait(&completion_cond, &completion_mutex, &pthread_timeout); } @@ -3979,7 +4045,7 @@ int job_testcontext(job_id_t * out_id_ar EINVAL) && pthread_ret != ETIMEDOUT) { /* pthread_cond_wait() gave a weird return code; pass along to - * caller + * caller */ ret = pthread_ret; } @@ -4099,7 +4165,7 @@ int job_testcontext(job_id_t * out_id_ar time_exhaust_flag = 1; } else if(timeout_ms < 0) - { + { time_exhaust_flag = 0; } else @@ -4192,16 +4258,16 @@ static void teardown_queues(void) /* trove_thread_mgr_callback() * - * callback function executed by the thread manager for Trove when a Trove + * callback function executed by the thread manager for Trove when a Trove * job completes * * no return value */ static void trove_thread_mgr_callback( - void* data, + void* data, PVFS_error error_code) { - struct job_desc* tmp_desc = (struct job_desc*)data; + struct job_desc* tmp_desc = (struct job_desc*)data; assert(tmp_desc); gen_mutex_lock(&initialized_mutex); @@ -4218,7 +4284,7 @@ static void trove_thread_mgr_callback( { /* set job descriptor fields and put into completion queue */ tmp_desc->u.trove.state = error_code; - job_desc_q_add(completion_queue_array[tmp_desc->context_id], + job_desc_q_add(completion_queue_array[tmp_desc->context_id], tmp_desc); /* set completed flag while holding queue lock */ tmp_desc->completed_flag = 1; @@ -4241,7 +4307,7 @@ static void trove_thread_mgr_callback( * no return value */ static void bmi_thread_mgr_callback( - void* data, + void* data, PVFS_size actual_size, PVFS_error error_code) { @@ -4280,7 +4346,7 @@ static void bmi_thread_mgr_callback( /* bmi_thread_mgr_unexp_handler() * - * callback function executed by the thread manager for BMI when an unexpected + * callback function executed by the thread manager for BMI when an unexpected * BMI message arrives * * no return value @@ -4288,7 +4354,7 @@ static void bmi_thread_mgr_callback( static void bmi_thread_mgr_unexp_handler( struct BMI_unexpected_info* unexp) { - struct job_desc* tmp_desc = NULL; + struct job_desc* tmp_desc = NULL; gen_mutex_lock(&initialized_mutex); if(initialized == 0) @@ -4315,7 +4381,7 @@ static void bmi_thread_mgr_unexp_handler tmp_desc->completed_flag = 1; if (completion_queue_array[tmp_desc->context_id]) { - job_desc_q_add(completion_queue_array[tmp_desc->context_id], + job_desc_q_add(completion_queue_array[tmp_desc->context_id], tmp_desc); } @@ -4333,14 +4399,14 @@ static void bmi_thread_mgr_unexp_handler /* dev_thread_mgr_unexp_handler() * - * callback function executed by the thread manager for dev when an unexpected + * callback function executed by the thread manager for dev when an unexpected * device message arrives * * no return value */ static void dev_thread_mgr_unexp_handler(struct PINT_dev_unexp_info* unexp) { - struct job_desc* tmp_desc = NULL; + struct job_desc* tmp_desc = NULL; gen_mutex_lock(&dev_unexp_mutex); /* remove the operation from the pending dev_unexp queue */ @@ -4358,7 +4424,7 @@ static void dev_thread_mgr_unexp_handler tmp_desc->completed_flag = 1; if (completion_queue_array[tmp_desc->context_id]) { - job_desc_q_add(completion_queue_array[tmp_desc->context_id], + job_desc_q_add(completion_queue_array[tmp_desc->context_id], tmp_desc); } @@ -4438,7 +4504,8 @@ static void fill_status(struct job_desc } if(jd->event_type) - JOB_EVENT_END(jd->event_type, status->actual_size, jd->job_id); + JOB_EVENT_END(jd->event_type, status->actual_size, jd->job_id, + jd->hints); return; } @@ -4446,7 +4513,7 @@ static void fill_status(struct job_desc /* do_one_test_cycle_req_sched() * * tests the request scheduler to see if anything has completed. - * Does not block at all. + * Does not block at all. * * returns 0 on success, -errno on failure */ @@ -4481,7 +4548,7 @@ static int do_one_test_cycle_req_sched(v gen_mutex_lock(&completion_mutex); /* set completed flag while holding queue lock */ tmp_desc->completed_flag = 1; - job_desc_q_add(completion_queue_array[tmp_desc->context_id], + job_desc_q_add(completion_queue_array[tmp_desc->context_id], tmp_desc); gen_mutex_unlock(&completion_mutex); } @@ -4579,7 +4646,7 @@ static int completion_query_some(job_id_ } /* we better not have lost any ops since the first loop through the job - * list + * list */ assert((*inout_count_p) == done_count); @@ -4677,10 +4744,10 @@ static void do_one_work_cycle_all(int id * don't have a single thing to do. Sleep here to prevent busy * spins. */ - struct timespec ts; - ts.tv_sec = idle_time_ms/1000; - ts.tv_nsec = (idle_time_ms%1000)*1000*1000; - nanosleep(&ts, NULL); + struct timespec ts; + ts.tv_sec = idle_time_ms/1000; + ts.tv_nsec = (idle_time_ms%1000)*1000*1000; + nanosleep(&ts, NULL); } return; @@ -4695,7 +4762,7 @@ static void do_one_work_cycle_all(int id */ static void flow_callback(flow_descriptor* flow_d) { - struct job_desc* tmp_desc = (struct job_desc*)flow_d->user_ptr; + struct job_desc* tmp_desc = (struct job_desc*)flow_d->user_ptr; gen_mutex_lock(&initialized_mutex); if(initialized == 0) @@ -4708,7 +4775,7 @@ static void flow_callback(flow_descripto /* set job descriptor fields and put into completion queue */ gen_mutex_lock(&completion_mutex); - job_desc_q_add(completion_queue_array[tmp_desc->context_id], + job_desc_q_add(completion_queue_array[tmp_desc->context_id], tmp_desc); /* set completed flag while holding queue lock */ tmp_desc->completed_flag = 1; Index: src/io/job/job.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/job/job.h,v retrieving revision 1.54 diff -u -a -p -r1.54 job.h --- src/io/job/job.h 13 Sep 2006 20:22:52 -0000 1.54 +++ src/io/job/job.h 15 Sep 2007 00:27:06 -0000 @@ -46,10 +46,11 @@ enum job_flags JOB_NO_IMMED_COMPLETE = 1 }; + #define JOB_TIMEOUT_INF (-1) /****************************************************************** - * management functions + * management functions */ int job_initialize(int flags); @@ -63,161 +64,167 @@ void job_close_context(job_context_id co int job_reset_timeout(job_id_t id, int timeout_sec); /****************************************************************** - * job posting functions + * job posting functions */ /* network send */ int job_bmi_send(PVFS_BMI_addr_t addr, - void *buffer, - bmi_size_t size, - bmi_msg_tag_t tag, - enum bmi_buffer_type buffer_type, - int send_unexpected, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id, - int timeout_sec); + void *buffer, + bmi_size_t size, + bmi_msg_tag_t tag, + enum bmi_buffer_type buffer_type, + int send_unexpected, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + int timeout_sec, + PVFS_hint hints); /* network send (list of buffers) */ int job_bmi_send_list(PVFS_BMI_addr_t addr, - void **buffer_list, - bmi_size_t * size_list, - int list_count, - bmi_size_t total_size, - bmi_msg_tag_t tag, - enum bmi_buffer_type buffer_type, - int send_unexpected, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id, - int timeout_sec); + void **buffer_list, + bmi_size_t * size_list, + int list_count, + bmi_size_t total_size, + bmi_msg_tag_t tag, + enum bmi_buffer_type buffer_type, + int send_unexpected, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + int timeout_sec, + PVFS_hint hints); /* network receive */ int job_bmi_recv(PVFS_BMI_addr_t addr, - void *buffer, - bmi_size_t size, - bmi_msg_tag_t tag, - enum bmi_buffer_type buffer_type, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id, - int timeout_sec); + void *buffer, + bmi_size_t size, + bmi_msg_tag_t tag, + enum bmi_buffer_type buffer_type, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + int timeout_sec, + PVFS_hint hints); /* network receive (list of buffers) */ int job_bmi_recv_list(PVFS_BMI_addr_t addr, - void **buffer_list, - bmi_size_t * size_list, - int list_count, - bmi_size_t total_expected_size, - bmi_msg_tag_t tag, - enum bmi_buffer_type buffer_type, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id, - int timeout_sec); + void **buffer_list, + bmi_size_t * size_list, + int list_count, + bmi_size_t total_expected_size, + bmi_msg_tag_t tag, + enum bmi_buffer_type buffer_type, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + int timeout_sec, + PVFS_hint hints); /* unexpected network receive */ int job_bmi_unexp(struct BMI_unexpected_info *bmi_unexp_d, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - enum job_flags flags, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + enum job_flags flags, + job_context_id context_id); int job_bmi_cancel(job_id_t id, - job_context_id context_id); + job_context_id context_id); /* unexpected device receive */ int job_dev_unexp(struct PINT_dev_unexp_info* dev_unexp_d, - void* user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t* id, - enum job_flags flags, - job_context_id context_id); + void* user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t* id, + enum job_flags flags, + job_context_id context_id); /* device write */ int job_dev_write(void* buffer, - int size, - PVFS_id_gen_t tag, - enum PINT_dev_buffer_type buffer_type, - void* user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + int size, + PVFS_id_gen_t tag, + enum PINT_dev_buffer_type buffer_type, + void* user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); /* device write list */ int job_dev_write_list(void** buffer_list, - int* size_list, - int list_count, - int total_size, - PVFS_id_gen_t tag, - enum PINT_dev_buffer_type buffer_type, - void* user_ptr, - job_aint status_user_tag, - job_status_s* out_status_p, - job_id_t* id, - job_context_id context_id); + int* size_list, + int list_count, + int total_size, + PVFS_id_gen_t tag, + enum PINT_dev_buffer_type buffer_type, + void* user_ptr, + job_aint status_user_tag, + job_status_s* out_status_p, + job_id_t* id, + job_context_id context_id); /* request scheduler post */ int job_req_sched_post(struct PVFS_server_req *in_request, - int req_index, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + int req_index, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); int job_req_sched_post_timer(int msecs, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); /* request scheduler release */ int job_req_sched_release(job_id_t in_completed_id, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * out_id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * out_id, + job_context_id context_id); /* complex I/O operation (disk, net, or mem) */ int job_flow(flow_descriptor * flow_d, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id, - int timeout_sec); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + int timeout_sec, + PVFS_hint hints); int job_flow_cancel(job_id_t id, job_context_id context_id); /* storage byte stream write */ int job_trove_bstream_write_at(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_offset offset, - void *buffer, - PVFS_size size, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_offset offset, + void *buffer, + PVFS_size size, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); int job_trove_bstream_write_list(PVFS_fs_id coll_id, PVFS_handle handle, @@ -234,22 +241,24 @@ int job_trove_bstream_write_list(PVFS_fs job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id); + job_context_id context_id, + PVFS_hint hints); /* storage byte stream read */ int job_trove_bstream_read_at(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_offset offset, - void *buffer, - PVFS_size size, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_offset offset, + void *buffer, + PVFS_size size, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); int job_trove_bstream_read_list(PVFS_fs_id coll_id, PVFS_handle handle, @@ -266,82 +275,89 @@ int job_trove_bstream_read_list(PVFS_fs_ job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id); + job_context_id context_id, + PVFS_hint hints); /* byte stream flush to storage */ int job_trove_bstream_flush(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); - + PVFS_handle handle, + PVFS_ds_flags flags, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); + /* storage key/value read */ int job_trove_keyval_read(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_keyval * key_p, - PVFS_ds_keyval * val_p, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_keyval * key_p, + PVFS_ds_keyval * val_p, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* storage key/value read list */ int job_trove_keyval_read_list(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_keyval * key_array, - PVFS_ds_keyval * val_array, + PVFS_handle handle, + PVFS_ds_keyval * key_array, + PVFS_ds_keyval * val_array, PVFS_error * err_array, - int count, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + int count, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* storage key/value write */ int job_trove_keyval_write(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_keyval * key_p, - PVFS_ds_keyval * val_p, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_keyval * key_p, + PVFS_ds_keyval * val_p, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* storage key/value write list */ int job_trove_keyval_write_list(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_keyval * key_array, - PVFS_ds_keyval * val_array, - int count, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_keyval * key_array, + PVFS_ds_keyval * val_array, + int count, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* flush keyval data to storage */ int job_trove_keyval_flush(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_flags flags, - void * user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_flags flags, + void * user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* get handle info for a keyval */ int job_trove_keyval_get_handle_info(PVFS_fs_id coll_id, @@ -352,210 +368,225 @@ int job_trove_keyval_get_handle_info(PVF job_aint status_user_tag, job_status_s * out_status_p, job_id_t * id, - job_context_id context_id); + job_context_id context_id, + PVFS_hint hints); /* read generic dspace attributes */ int job_trove_dspace_getattr(PVFS_fs_id coll_id, - PVFS_handle handle, - void *user_ptr, + PVFS_handle handle, + void *user_ptr, PVFS_ds_attributes *out_ds_attr_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* read generic dspace attributes for a set of handles */ int job_trove_dspace_getattr_list(PVFS_fs_id coll_id, - int nhandles, - PVFS_handle *handle_array, - void *user_ptr, - PVFS_error *out_error_array, - PVFS_ds_attributes *out_ds_attr_ptr, - job_aint status_user_tag, - job_status_s *out_status_p, - job_id_t *id, - job_context_id context_id); + int nhandles, + PVFS_handle *handle_array, + void *user_ptr, + PVFS_error *out_error_array, + PVFS_ds_attributes *out_ds_attr_ptr, + job_aint status_user_tag, + job_status_s *out_status_p, + job_id_t *id, + job_context_id context_id, + PVFS_hint hints); /* write generic dspace attributes */ int job_trove_dspace_setattr(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_attributes * ds_attr_p, + PVFS_handle handle, + PVFS_ds_attributes * ds_attr_p, PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* resize (truncate or preallocate) a storage byte stream */ int job_trove_bstream_resize(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_size size, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_size size, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* check consistency of a bytestream for a given vtag */ int job_trove_bstream_validate(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* remove a key/value entry */ int job_trove_keyval_remove(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_keyval * key_p, + PVFS_handle handle, + PVFS_ds_keyval * key_p, PVFS_ds_keyval * val_p, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* check consistency of a key/value pair for a given vtag */ int job_trove_keyval_validate(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* iterate through all of the key/value pairs for a data space */ int job_trove_keyval_iterate(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_position position, - PVFS_ds_keyval * key_array, - PVFS_ds_keyval * val_array, - int count, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_position position, + PVFS_ds_keyval * key_array, + PVFS_ds_keyval * val_array, + int count, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* iterate through all of the keys for a data space */ int job_trove_keyval_iterate_keys(PVFS_fs_id coll_id, - PVFS_handle handle, - PVFS_ds_position position, - PVFS_ds_keyval * key_array, - int count, - PVFS_ds_flags flags, - PVFS_vtag * vtag, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_handle handle, + PVFS_ds_position position, + PVFS_ds_keyval * key_array, + int count, + PVFS_ds_flags flags, + PVFS_vtag * vtag, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* iterates through all handles in a collection */ int job_trove_dspace_iterate_handles(PVFS_fs_id coll_id, - PVFS_ds_position position, - PVFS_handle* handle_array, - int count, - PVFS_ds_flags flags, - PVFS_vtag* vtag, - void* user_ptr, - job_aint status_user_tag, - job_status_s* out_status_p, - job_id_t* id, - job_context_id context_id); + PVFS_ds_position position, + PVFS_handle* handle_array, + int count, + PVFS_ds_flags flags, + PVFS_vtag* vtag, + void* user_ptr, + job_aint status_user_tag, + job_status_s* out_status_p, + job_id_t* id, + job_context_id context_id); /* create a new data space object */ int job_trove_dspace_create(PVFS_fs_id coll_id, - PVFS_handle_extent_array *handle_extent_array, - PVFS_ds_type type, - void *hint, + PVFS_handle_extent_array *handle_extent_array, + PVFS_ds_type type, + void *hint, PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* remove an entire data space object (byte stream and key/value) */ int job_trove_dspace_remove(PVFS_fs_id coll_id, - PVFS_handle handle, + PVFS_handle handle, PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* verify that a given dataspace exists and discover its type */ int job_trove_dspace_verify(PVFS_fs_id coll_id, - PVFS_handle handle, + PVFS_handle handle, PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); int job_trove_dspace_cancel(PVFS_fs_id coll_id, - job_id_t id, - job_context_id context_id); + job_id_t id, + job_context_id context_id); /* create a new file system */ int job_trove_fs_create(char *collname, - PVFS_fs_id new_coll_id, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_fs_id new_coll_id, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); /* remove an existing file system */ int job_trove_fs_remove(char *collname, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); /* lookup a file system based on a string name */ int job_trove_fs_lookup(char *collname, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id); /* set extended attributes for a file system */ int job_trove_fs_seteattr(PVFS_fs_id coll_id, - PVFS_ds_keyval * key_p, - PVFS_ds_keyval * val_p, - PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_ds_keyval * key_p, + PVFS_ds_keyval * val_p, + PVFS_ds_flags flags, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); /* read extended attributes for a file system */ int job_trove_fs_geteattr(PVFS_fs_id coll_id, - PVFS_ds_keyval * key_p, - PVFS_ds_keyval * val_p, - PVFS_ds_flags flags, - void *user_ptr, - job_aint status_user_tag, - job_status_s * out_status_p, - job_id_t * id, - job_context_id context_id); + PVFS_ds_keyval * key_p, + PVFS_ds_keyval * val_p, + PVFS_ds_flags flags, + void *user_ptr, + job_aint status_user_tag, + job_status_s * out_status_p, + job_id_t * id, + job_context_id context_id, + PVFS_hint hints); int job_null( int error_code, @@ -566,30 +597,30 @@ int job_null( job_context_id context_id); /****************************************************************** - * job test/wait for completion functions + * job test/wait for completion functions */ int job_test(job_id_t id, - int *out_count_p, - void **returned_user_ptr_p, - job_status_s * out_status_p, - int timeout_ms, - job_context_id context_id); + int *out_count_p, + void **returned_user_ptr_p, + job_status_s * out_status_p, + int timeout_ms, + job_context_id context_id); int job_testsome(job_id_t * id_array, - int *inout_count_p, - int *out_index_array, - void **returned_user_ptr_array, - job_status_s * out_status_array_p, - int timeout_ms, - job_context_id context_id); + int *inout_count_p, + int *out_index_array, + void **returned_user_ptr_array, + job_status_s * out_status_array_p, + int timeout_ms, + job_context_id context_id); int job_testcontext(job_id_t * out_id_array_p, - int *inout_count_p, - void **returned_user_ptr_array, - job_status_s * out_status_array_p, - int timeout_ms, - job_context_id context_id); + int *inout_count_p, + void **returned_user_ptr_array, + job_status_s * out_status_array_p, + int timeout_ms, + job_context_id context_id); #endif /* __JOB_H */ Index: src/io/trove/trove-internal.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-internal.h,v retrieving revision 1.25 diff -u -a -p -r1.25 trove-internal.h --- src/io/trove/trove-internal.h 18 Oct 2006 16:01:11 -0000 1.25 +++ src/io/trove/trove-internal.h 15 Sep 2007 00:27:06 -0000 @@ -28,7 +28,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *out_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_write_at)( TROVE_coll_id coll_id, @@ -40,7 +41,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_resize)( TROVE_coll_id coll_id, @@ -50,7 +52,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_validate)( TROVE_coll_id coll_id, @@ -59,7 +62,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_read_list)( TROVE_coll_id coll_id, @@ -75,7 +79,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *out_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_write_list)( TROVE_coll_id coll_id, @@ -91,7 +96,8 @@ struct TROVE_bstream_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*bstream_flush)( TROVE_coll_id coll_id, @@ -99,7 +105,8 @@ struct TROVE_bstream_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); }; struct TROVE_keyval_ops @@ -113,7 +120,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *out_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_write)( TROVE_coll_id coll_id, @@ -124,7 +132,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_remove)( TROVE_coll_id coll_id, @@ -135,7 +144,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_validate)( TROVE_coll_id coll_id, @@ -144,7 +154,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *inout_vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_iterate)( TROVE_coll_id coll_id, @@ -157,7 +168,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_iterate_keys)( TROVE_coll_id coll_id, @@ -169,7 +181,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_read_list)( TROVE_coll_id coll_id, @@ -182,7 +195,8 @@ struct TROVE_keyval_ops TROVE_vtag_s *out_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_write_list)( TROVE_coll_id coll_id, @@ -194,14 +208,16 @@ struct TROVE_keyval_ops TROVE_vtag_s *inout_vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_flush)( TROVE_coll_id coll_id, TROVE_handle handle, TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*keyval_get_handle_info)( TROVE_coll_id coll_id, TROVE_handle handle, @@ -209,7 +225,8 @@ struct TROVE_keyval_ops TROVE_keyval_handle_info *info, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); }; struct TROVE_dspace_ops @@ -223,7 +240,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_remove)( TROVE_coll_id coll_id, @@ -231,7 +249,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_iterate_handles)( TROVE_coll_id coll_id, @@ -251,7 +270,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_getattr)( TROVE_coll_id coll_id, @@ -260,7 +280,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_getattr_list)( TROVE_coll_id coll_id, @@ -271,7 +292,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_setattr)( TROVE_coll_id coll_id, @@ -280,7 +302,8 @@ struct TROVE_dspace_ops TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int (*dspace_cancel)( TROVE_coll_id coll_id, Index: src/io/trove/trove.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove.c,v retrieving revision 1.12 diff -u -a -p -r1.12 trove.c --- src/io/trove/trove.c 18 Oct 2006 16:01:11 -0000 1.12 +++ src/io/trove/trove.c 15 Sep 2007 00:27:06 -0000 @@ -48,7 +48,8 @@ int trove_bstream_read_at( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -68,7 +69,8 @@ int trove_bstream_read_at( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate writing from a contiguous region in memory into a @@ -84,7 +86,8 @@ int trove_bstream_write_at( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -104,7 +107,8 @@ int trove_bstream_write_at( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate resizing of a bstream. This may be used to grow or @@ -119,7 +123,8 @@ int trove_bstream_resize( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -137,7 +142,8 @@ int trove_bstream_resize( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_bstream_validate( @@ -147,7 +153,8 @@ int trove_bstream_validate( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -164,7 +171,8 @@ int trove_bstream_validate( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate reading from a list of regions in a bstream into @@ -185,7 +193,8 @@ int trove_bstream_read_list( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -209,7 +218,8 @@ int trove_bstream_read_list( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate writing from a list of regions in memory into a @@ -230,7 +240,8 @@ int trove_bstream_write_list( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -254,7 +265,8 @@ int trove_bstream_write_list( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate movement of all data to storage devices for a specific @@ -266,7 +278,8 @@ int trove_bstream_flush( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -282,7 +295,8 @@ int trove_bstream_flush( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate read of a single keyword/value pair. @@ -296,7 +310,8 @@ int trove_keyval_read( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -321,7 +336,8 @@ int trove_keyval_read( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate write of a single keyword/value pair. @@ -340,7 +356,8 @@ int trove_keyval_write( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -365,7 +382,8 @@ int trove_keyval_write( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate removal of a keyword/value pair from a given data space. @@ -379,7 +397,8 @@ int trove_keyval_remove( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -398,7 +417,8 @@ int trove_keyval_remove( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_keyval_validate( @@ -408,7 +428,8 @@ int trove_keyval_validate( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -425,7 +446,8 @@ int trove_keyval_validate( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_keyval_iterate( @@ -439,7 +461,8 @@ int trove_keyval_iterate( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -460,7 +483,8 @@ int trove_keyval_iterate( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_keyval_iterate_keys( @@ -473,7 +497,8 @@ int trove_keyval_iterate_keys( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -493,7 +518,8 @@ int trove_keyval_iterate_keys( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate read of multiple keyword/value pairs from the same @@ -510,7 +536,8 @@ int trove_keyval_read_list( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; int i; @@ -541,7 +568,8 @@ int trove_keyval_read_list( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate storing of multiple keyword/value pairs to the same @@ -557,7 +585,8 @@ int trove_keyval_write_list( TROVE_vtag_s* vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { int i; TROVE_method_id method_id; @@ -587,7 +616,8 @@ int trove_keyval_write_list( vtag, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate movement of all keyword/value pairs to storage for a given @@ -599,7 +629,8 @@ int trove_keyval_flush( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -615,7 +646,8 @@ int trove_keyval_flush( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_keyval_get_handle_info(TROVE_coll_id coll_id, @@ -624,7 +656,8 @@ int trove_keyval_get_handle_info(TROVE_c TROVE_keyval_handle_info *info, void * user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -641,7 +674,8 @@ int trove_keyval_get_handle_info(TROVE_c info, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate creation of a new data space. @@ -655,7 +689,8 @@ int trove_dspace_create( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -674,7 +709,8 @@ int trove_dspace_create( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate removal of a data space. @@ -685,7 +721,8 @@ int trove_dspace_remove( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -701,7 +738,8 @@ int trove_dspace_remove( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_dspace_iterate_handles( @@ -742,7 +780,8 @@ int trove_dspace_verify( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -759,7 +798,8 @@ int trove_dspace_verify( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate retrieval of attributes for a given data space. @@ -771,7 +811,8 @@ int trove_dspace_getattr( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -788,7 +829,8 @@ int trove_dspace_getattr( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } /** Initiate retrieval of attributes for a list of handles. @@ -802,7 +844,8 @@ int trove_dspace_getattr_list( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { int method_id; @@ -819,7 +862,8 @@ int trove_dspace_getattr_list( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_dspace_setattr( @@ -829,7 +873,8 @@ int trove_dspace_setattr( TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p) + TROVE_op_id* out_op_id_p, + PVFS_hint hints) { TROVE_method_id method_id; @@ -846,7 +891,8 @@ int trove_dspace_setattr( flags, user_ptr, context_id, - out_op_id_p); + out_op_id_p, + hints); } int trove_dspace_cancel( Index: src/io/trove/trove.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove.h,v retrieving revision 1.40 diff -u -a -p -r1.40 trove.h --- src/io/trove/trove.h 18 Oct 2006 16:01:11 -0000 1.40 +++ src/io/trove/trove.h 15 Sep 2007 00:27:06 -0000 @@ -162,7 +162,8 @@ int trove_bstream_read_at( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_write_at( TROVE_coll_id coll_id, @@ -174,7 +175,8 @@ int trove_bstream_write_at( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_resize( TROVE_coll_id coll_id, @@ -184,7 +186,8 @@ int trove_bstream_resize( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_validate( TROVE_coll_id coll_id, @@ -193,7 +196,8 @@ int trove_bstream_validate( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_read_list( TROVE_coll_id coll_id, @@ -209,7 +213,8 @@ int trove_bstream_read_list( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_write_list( TROVE_coll_id coll_id, @@ -225,14 +230,16 @@ int trove_bstream_write_list( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_bstream_flush(TROVE_coll_id coll_id, TROVE_handle handle, TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_read( TROVE_coll_id coll_id, @@ -243,7 +250,8 @@ int trove_keyval_read( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_write( TROVE_coll_id coll_id, @@ -254,7 +262,8 @@ int trove_keyval_write( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_remove( TROVE_coll_id coll_id, @@ -265,7 +274,8 @@ int trove_keyval_remove( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_validate( TROVE_coll_id coll_id, @@ -274,7 +284,8 @@ int trove_keyval_validate( TROVE_vtag_s *vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_iterate( TROVE_coll_id coll_id, @@ -287,7 +298,8 @@ int trove_keyval_iterate( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_iterate_keys( TROVE_coll_id coll_id, @@ -299,7 +311,8 @@ int trove_keyval_iterate_keys( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_read_list(TROVE_coll_id coll_id, TROVE_handle handle, @@ -311,7 +324,8 @@ int trove_keyval_read_list(TROVE_coll_id TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_write_list( TROVE_coll_id coll_id, @@ -323,14 +337,16 @@ int trove_keyval_write_list( TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_flush(TROVE_coll_id coll_id, - TROVE_handle handle, - TROVE_ds_flags flags, - void *user_ptr, - TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_handle handle, + TROVE_ds_flags flags, + void *user_ptr, + TROVE_context_id context_id, + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_keyval_get_handle_info(TROVE_coll_id coll_id, TROVE_handle handle, @@ -338,7 +354,8 @@ int trove_keyval_get_handle_info(TROVE_c TROVE_keyval_handle_info *info, void * user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_create(TROVE_coll_id coll_id, TROVE_handle_extent_array *handle_extent_array, @@ -348,14 +365,16 @@ int trove_dspace_create(TROVE_coll_id co TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_remove(TROVE_coll_id coll_id, TROVE_handle handle, TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_iterate_handles(TROVE_coll_id coll_id, TROVE_ds_position *position_p, @@ -373,7 +392,8 @@ int trove_dspace_verify(TROVE_coll_id co TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_getattr(TROVE_coll_id coll_id, @@ -382,7 +402,8 @@ int trove_dspace_getattr(TROVE_coll_id c TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_getattr_list(TROVE_coll_id coll_id, int nhandles, @@ -392,7 +413,8 @@ int trove_dspace_getattr_list(TROVE_coll TROVE_ds_flags flags, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id* out_op_id_p); + TROVE_op_id* out_op_id_p, + PVFS_hint hints); int trove_dspace_setattr(TROVE_coll_id coll_id, TROVE_handle handle, @@ -400,7 +422,8 @@ int trove_dspace_setattr(TROVE_coll_id c TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int trove_dspace_cancel(TROVE_coll_id coll_id, TROVE_op_id id, Index: src/io/trove/trove-dbpf/dbpf-alt-aio.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-alt-aio.c,v retrieving revision 1.8 diff -u -a -p -r1.8 dbpf-alt-aio.c --- src/io/trove/trove-dbpf/dbpf-alt-aio.c 12 Apr 2007 03:40:41 -0000 1.8 +++ src/io/trove/trove-dbpf/dbpf-alt-aio.c 15 Sep 2007 00:27:06 -0000 @@ -270,68 +270,72 @@ static void* alt_lio_thread(void* foo) static int alt_aio_bstream_read_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, - TROVE_offset *stream_offset_array, + TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return dbpf_bstream_rw_list(coll_id, handle, - mem_offset_array, + mem_offset_array, mem_size_array, mem_count, - stream_offset_array, + stream_offset_array, stream_size_array, stream_count, out_size_p, - flags, + flags, vtag, user_ptr, context_id, out_op_id_p, LIO_READ, - &alt_aio_ops); + &alt_aio_ops, + hints); } static int alt_aio_bstream_write_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, - TROVE_offset *stream_offset_array, + TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return dbpf_bstream_rw_list(coll_id, handle, - mem_offset_array, + mem_offset_array, mem_size_array, mem_count, - stream_offset_array, + stream_offset_array, stream_size_array, stream_count, out_size_p, - flags, + flags, vtag, user_ptr, context_id, out_op_id_p, LIO_WRITE, - &alt_aio_ops); + &alt_aio_ops, + hints); } static struct dbpf_aio_ops alt_aio_ops = Index: src/io/trove/trove-dbpf/dbpf-bstream.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c,v retrieving revision 1.80 diff -u -a -p -r1.80 dbpf-bstream.c --- src/io/trove/trove-dbpf/dbpf-bstream.c 1 Jun 2007 20:58:05 -0000 1.80 +++ src/io/trove/trove-dbpf/dbpf-bstream.c 15 Sep 2007 00:27:06 -0000 @@ -436,10 +436,11 @@ int dbpf_bstream_read_at(TROVE_coll_id c TROVE_size *inout_size_p, TROVE_offset offset, TROVE_ds_flags flags, - TROVE_vtag_s *vtag, + TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_collection *coll_p = NULL; @@ -470,6 +471,7 @@ int dbpf_bstream_read_at(TROVE_coll_id c q_op_p->op.u.b_read_at.offset = offset; q_op_p->op.u.b_read_at.size = *inout_size_p; q_op_p->op.u.b_read_at.buffer = buffer; + q_op_p->op.hints = hints; *out_op_id_p = dbpf_queued_op_queue(q_op_p); @@ -533,11 +535,12 @@ int dbpf_bstream_write_at(TROVE_coll_id TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_collection *coll_p = NULL; - + coll_p = dbpf_collection_find_registered(coll_id); if (coll_p == NULL) { @@ -564,6 +567,7 @@ int dbpf_bstream_write_at(TROVE_coll_id q_op_p->op.u.b_write_at.offset = offset; q_op_p->op.u.b_write_at.size = *inout_size_p; q_op_p->op.u.b_write_at.buffer = buffer; + q_op_p->op.hints = hints; *out_op_id_p = dbpf_queued_op_queue(q_op_p); @@ -627,7 +631,8 @@ int dbpf_bstream_flush(TROVE_coll_id col TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_collection *coll_p = NULL; @@ -653,7 +658,7 @@ int dbpf_bstream_flush(TROVE_coll_id col user_ptr, flags, context_id); - + q_op_p->op.hints = hints; *out_op_id_p = dbpf_queued_op_queue(q_op_p); return 0; } @@ -665,7 +670,7 @@ static int dbpf_bstream_flush_op_svc(str struct open_cache_ref tmp_ref; ret = dbpf_open_cache_get( - op_p->coll_p->coll_id, op_p->handle, + op_p->coll_p->coll_id, op_p->handle, DBPF_FD_BUFFERED_WRITE, &tmp_ref); if (ret < 0) { @@ -697,7 +702,8 @@ int dbpf_bstream_resize(TROVE_coll_id co TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_collection *coll_p = NULL; @@ -723,9 +729,10 @@ int dbpf_bstream_resize(TROVE_coll_id co user_ptr, flags, context_id); - + /* initialize the op-specific members */ q_op_p->op.u.b_resize.size = *inout_size_p; + q_op_p->op.hints = hints; *out_op_id_p = dbpf_queued_op_queue(q_op_p); @@ -782,75 +789,80 @@ int dbpf_bstream_validate(TROVE_coll_id TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return -TROVE_ENOSYS; } static int dbpf_bstream_read_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, - TROVE_offset *stream_offset_array, + TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return dbpf_bstream_rw_list(coll_id, handle, - mem_offset_array, + mem_offset_array, mem_size_array, mem_count, - stream_offset_array, + stream_offset_array, stream_size_array, stream_count, out_size_p, - flags, + flags, vtag, user_ptr, context_id, out_op_id_p, LIO_READ, - &aio_ops); + &aio_ops, + hints); } static int dbpf_bstream_write_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, - TROVE_offset *stream_offset_array, + TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return dbpf_bstream_rw_list(coll_id, handle, - mem_offset_array, + mem_offset_array, mem_size_array, mem_count, - stream_offset_array, + stream_offset_array, stream_size_array, stream_count, out_size_p, - flags, + flags, vtag, user_ptr, context_id, out_op_id_p, LIO_WRITE, - &aio_ops); + &aio_ops, + hints); } /* dbpf_bstream_rw_list() @@ -861,20 +873,21 @@ static int dbpf_bstream_write_list(TROVE */ inline int dbpf_bstream_rw_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, TROVE_op_id *out_op_id_p, int opcode, - struct dbpf_aio_ops * aio_ops) + struct dbpf_aio_ops * aio_ops, + PVFS_hint hints) { int ret = -TROVE_EINVAL; dbpf_queued_op_t *q_op_p = NULL; @@ -924,7 +937,7 @@ inline int dbpf_bstream_rw_list(TROVE_co flags, context_id); - DBPF_EVENT_START(event_type, q_op_p->op.id); + DBPF_EVENT_START(event_type, q_op_p->op.id, hints, 0); if(gossip_debug_enabled(GOSSIP_TROVE_DEBUG)) { @@ -969,6 +982,7 @@ inline int dbpf_bstream_rw_list(TROVE_co q_op_p->op.u.b_rw_list.stream_array_count = stream_count; q_op_p->op.u.b_rw_list.stream_offset_array = stream_offset_array; q_op_p->op.u.b_rw_list.stream_size_array = stream_size_array; + q_op_p->op.hints = hints; q_op_p->op.u.b_rw_list.aio_ops = aio_ops; /* initialize the out size to 0 */ @@ -1004,6 +1018,17 @@ inline int dbpf_bstream_rw_list(TROVE_co return ret; } q_op_p->op.u.b_rw_list.fd = q_op_p->op.u.b_rw_list.open_ref.fd; + + /* record event start and sizes */ + { + PVFS_size count_mem = 0; + for(i = 0; i < mem_count; ++i) + { + count_mem += mem_size_array[i]; + } + DBPF_EVENT_START(event_type, q_op_p->op.id, hints, count_mem); + + } /* if we're doing an i/o write, remove the cached attribute for Index: src/io/trove/trove-dbpf/dbpf-dspace.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-dspace.c,v retrieving revision 1.151 diff -u -a -p -r1.151 dbpf-dspace.c --- src/io/trove/trove-dbpf/dbpf-dspace.c 1 Jun 2007 20:58:05 -0000 1.151 +++ src/io/trove/trove-dbpf/dbpf-dspace.c 15 Sep 2007 00:27:06 -0000 @@ -77,16 +77,18 @@ static inline void organize_post_op_stat UPDATE_PERF_METADATA_READ(); break; case BSTREAM_READ_LIST: - DBPF_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, op_id); + /* FIXME please SAM */ + DBPF_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, op_id, NULL); break; case BSTREAM_WRITE_LIST: - DBPF_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, op_id); + /* FIXME please SAM */ + DBPF_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, op_id, NULL); break; default: break; case DSPACE_CREATE: UPDATE_PERF_METADATA_WRITE(); - DBPF_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, op_id); + DBPF_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, op_id, NULL); break; } } @@ -110,7 +112,8 @@ static int dbpf_dspace_create(TROVE_coll TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -146,7 +149,7 @@ static int dbpf_dspace_create(TROVE_coll return -TROVE_EINVAL; } - DBPF_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, op_p->id); + DBPF_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, op_p->id, hints, 0); /* this array is freed in dbpf-op.c:dbpf_queued_op_free, or * in dbpf_queue_or_service in the case of immediate completion */ @@ -154,6 +157,7 @@ static int dbpf_dspace_create(TROVE_coll extent_array->extent_count; op_p->u.d_create.extent_array.extent_array = malloc(extent_array->extent_count * sizeof(TROVE_extent)); + op_p->hints = hints; if (op_p->u.d_create.extent_array.extent_array == NULL) { @@ -343,7 +347,8 @@ static int dbpf_dspace_remove(TROVE_coll TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -372,6 +377,7 @@ static int dbpf_dspace_remove(TROVE_coll { return ret; } + op_p->hints = hints; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS, 1, PINT_PERF_ADD); @@ -816,7 +822,8 @@ static int dbpf_dspace_verify(TROVE_coll TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -848,6 +855,7 @@ static int dbpf_dspace_verify(TROVE_coll } /* initialize op-specific members */ + op_p->hints = hints; op_p->u.d_verify.type_p = type_p; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); @@ -902,7 +910,8 @@ static int dbpf_dspace_getattr(TROVE_col TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -960,6 +969,7 @@ static int dbpf_dspace_getattr(TROVE_col /* initialize op-specific members */ op_p->u.d_getattr.attr_p = ds_attr_p; + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -972,7 +982,8 @@ static int dbpf_dspace_getattr_list(TROV TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_collection *coll_p = NULL; @@ -1041,6 +1052,7 @@ static int dbpf_dspace_getattr_list(TROV q_op_p->op.u.d_getattr_list.handle_array = &handle_array[i]; q_op_p->op.u.d_getattr_list.attr_p = &ds_attr_p[i]; q_op_p->op.u.d_getattr_list.error_p = &error_array[i]; + q_op_p->op.hints = hints; *out_op_id_p = dbpf_queued_op_queue(q_op_p); @@ -1054,7 +1066,8 @@ static int dbpf_dspace_setattr(TROVE_col TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -1086,6 +1099,7 @@ static int dbpf_dspace_setattr(TROVE_col /* initialize op-specific members */ op_p->u.d_setattr.attr_p = ds_attr_p; + op_p->hints = hints; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS, 1, PINT_PERF_ADD); Index: src/io/trove/trove-dbpf/dbpf-keyval.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-keyval.c,v retrieving revision 1.84 diff -u -a -p -r1.84 dbpf-keyval.c --- src/io/trove/trove-dbpf/dbpf-keyval.c 29 Mar 2007 14:17:48 -0000 1.84 +++ src/io/trove/trove-dbpf/dbpf-keyval.c 15 Sep 2007 00:27:06 -0000 @@ -160,10 +160,11 @@ static int dbpf_keyval_read(TROVE_coll_i TROVE_keyval_s *key_p, TROVE_keyval_s *val_p, TROVE_ds_flags flags, - TROVE_vtag_s *vtag, + TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { int ret; dbpf_queued_op_t *q_op_p = NULL; @@ -220,6 +221,7 @@ static int dbpf_keyval_read(TROVE_coll_i /* initialize the op-specific members */ op_p->u.k_read.key = key_p; op_p->u.k_read.val = val_p; + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -309,7 +311,8 @@ static int dbpf_keyval_write(TROVE_coll_ TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -342,6 +345,7 @@ static int dbpf_keyval_write(TROVE_coll_ /* initialize the op-specific members */ op_p->u.k_write.key = *key_p; op_p->u.k_write.val = *val_p; + op_p->hints = hints; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS, 1, PINT_PERF_ADD); @@ -507,7 +511,8 @@ static int dbpf_keyval_remove(TROVE_coll TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -538,6 +543,7 @@ static int dbpf_keyval_remove(TROVE_coll } /* initialize op-specific members */ + op_p->hints = hints; op_p->u.k_remove.key = *key_p; if(val_p) { @@ -593,7 +599,8 @@ static int dbpf_keyval_validate(TROVE_co TROVE_vtag_s *vtag, void* user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { return -TROVE_ENOSYS; } @@ -608,7 +615,8 @@ static int dbpf_keyval_iterate(TROVE_col TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -643,6 +651,7 @@ static int dbpf_keyval_iterate(TROVE_col op_p->u.k_iterate.val_array = val_array; op_p->u.k_iterate.position_p = position_p; op_p->u.k_iterate.count_p = inout_count_p; + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -752,7 +761,8 @@ static int dbpf_keyval_iterate_keys(TROV TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -786,6 +796,7 @@ static int dbpf_keyval_iterate_keys(TROV op_p->u.k_iterate_keys.key_array = key_array; op_p->u.k_iterate_keys.position_p = position_p; op_p->u.k_iterate_keys.count_p = inout_count_p; + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -880,7 +891,8 @@ static int dbpf_keyval_read_list(TROVE_c TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -915,6 +927,7 @@ static int dbpf_keyval_read_list(TROVE_c op_p->u.k_read_list.val_array = val_array; op_p->u.k_read_list.err_array = err_array; op_p->u.k_read_list.count = count; + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -984,7 +997,8 @@ static int dbpf_keyval_write_list(TROVE_ TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -1018,6 +1032,7 @@ static int dbpf_keyval_write_list(TROVE_ op_p->u.k_write_list.key_array = key_array; op_p->u.k_write_list.val_array = val_array; op_p->u.k_write_list.count = count; + op_p->hints = hints; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS, 1, PINT_PERF_ADD); @@ -1156,7 +1171,8 @@ static int dbpf_keyval_flush(TROVE_coll_ TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -1169,7 +1185,7 @@ static int dbpf_keyval_flush(TROVE_coll_ { return -TROVE_EINVAL; } - + ret = dbpf_op_init_queued_or_immediate( &op, &q_op_p, KEYVAL_FLUSH, @@ -1185,6 +1201,7 @@ static int dbpf_keyval_flush(TROVE_coll_ { return ret; } + op_p->hints = hints; return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p); } @@ -1650,7 +1667,8 @@ static int dbpf_keyval_get_handle_info( TROVE_keyval_handle_info *info, void * user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p) + TROVE_op_id *out_op_id_p, + PVFS_hint hints) { dbpf_queued_op_t *q_op_p = NULL; struct dbpf_op op; @@ -1681,6 +1699,7 @@ static int dbpf_keyval_get_handle_info( } op_p->u.k_get_handle_info.info = info; + op_p->hints = hints; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS, 1, PINT_PERF_ADD); Index: src/io/trove/trove-dbpf/dbpf.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf.h,v retrieving revision 1.82 diff -u -a -p -r1.82 dbpf.h --- src/io/trove/trove-dbpf/dbpf.h 15 Mar 2007 21:45:23 -0000 1.82 +++ src/io/trove/trove-dbpf/dbpf.h 15 Sep 2007 00:27:06 -0000 @@ -73,13 +73,13 @@ extern "C" { (((__id << ((sizeof(__id) - 1) * 8)) | __handle) % \ DBPF_BSTREAM_MAX_NUM_BUCKETS) -#define DBPF_EVENT_START(__op, __id) \ - PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, 0, __id, \ - PVFS_EVENT_FLAG_START) - -#define DBPF_EVENT_END(__op, __id) \ - PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, 0, __id, \ - PVFS_EVENT_FLAG_END) +#define DBPF_EVENT_START(__op, __id, __hint, __value) \ + PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, __id, \ + PVFS_EVENT_FLAG_START, __value) + +#define DBPF_EVENT_END(__op, __id, __hint) \ + PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, __id, \ + PVFS_EVENT_FLAG_END, 0) #define DBPF_GET_STORAGE_DIRNAME(__buf, __path_max, __stoname) \ do { snprintf(__buf, __path_max, "/%s", __stoname); } while (0) @@ -400,20 +400,21 @@ struct dbpf_bstream_rw_list_op inline int dbpf_bstream_rw_list(TROVE_coll_id coll_id, TROVE_handle handle, - char **mem_offset_array, + char **mem_offset_array, TROVE_size *mem_size_array, int mem_count, TROVE_offset *stream_offset_array, TROVE_size *stream_size_array, int stream_count, TROVE_size *out_size_p, - TROVE_ds_flags flags, + TROVE_ds_flags flags, TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, TROVE_op_id *out_op_id_p, int opcode, - struct dbpf_aio_ops * aio_ops); + struct dbpf_aio_ops * aio_ops, + PVFS_hint hints); struct dbpf_keyval_get_handle_info_op { @@ -504,6 +505,7 @@ struct dbpf_op void *user_ptr; TROVE_ds_flags flags; TROVE_context_id context_id; + PVFS_hint hints; union { /* all the op types go in here; structs are all @@ -701,10 +703,11 @@ int dbpf_bstream_read_at(TROVE_coll_id c TROVE_size *inout_size_p, TROVE_offset offset, TROVE_ds_flags flags, - TROVE_vtag_s *vtag, + TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int dbpf_bstream_write_at(TROVE_coll_id coll_id, TROVE_handle handle, @@ -715,7 +718,8 @@ int dbpf_bstream_write_at(TROVE_coll_id TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int dbpf_bstream_resize(TROVE_coll_id coll_id, TROVE_handle handle, @@ -724,7 +728,8 @@ int dbpf_bstream_resize(TROVE_coll_id co TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int dbpf_bstream_validate(TROVE_coll_id coll_id, TROVE_handle handle, @@ -732,14 +737,16 @@ int dbpf_bstream_validate(TROVE_coll_id TROVE_vtag_s *vtag, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); int dbpf_bstream_flush(TROVE_coll_id coll_id, TROVE_handle handle, TROVE_ds_flags flags, void *user_ptr, TROVE_context_id context_id, - TROVE_op_id *out_op_id_p); + TROVE_op_id *out_op_id_p, + PVFS_hint hints); #if defined(__cplusplus) } Index: src/kernel/linux-2.6/upcall.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/upcall.h,v retrieving revision 1.36 diff -u -a -p -r1.36 upcall.h --- src/kernel/linux-2.6/upcall.h 15 Mar 2007 21:45:29 -0000 1.36 +++ src/kernel/linux-2.6/upcall.h 15 Sep 2007 00:27:06 -0000 @@ -230,6 +230,8 @@ typedef struct int32_t type; int32_t __pad1; PVFS_credentials credentials; + int pid; + int tgid; /* currently trailer is used only by readx/writex (iox) */ PVFS_size trailer_size; PVFS2_ALIGN_VAR(char *, trailer_buf); Index: src/kernel/linux-2.6/waitqueue.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/waitqueue.c,v retrieving revision 1.25 diff -u -a -p -r1.25 waitqueue.c --- src/kernel/linux-2.6/waitqueue.c 24 Aug 2006 20:16:31 -0000 1.25 +++ src/kernel/linux-2.6/waitqueue.c 15 Sep 2007 00:27:06 -0000 @@ -55,6 +55,12 @@ int service_operation( { sigset_t orig_sigset; int ret = 0; + op->upcall.pid = current->pid; +#ifdef PVFS2_LINUX_KERNEL_2_4 + op->upcall.tgid = -1; +#else + op->upcall.tgid = current->tgid; +#endif retry_servicing: op->downcall.status = 0; Index: src/proto/PINT-le-bytefield.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/proto/PINT-le-bytefield.c,v retrieving revision 1.52 diff -u -a -p -r1.52 PINT-le-bytefield.c --- src/proto/PINT-le-bytefield.c 17 Aug 2007 04:04:27 -0000 1.52 +++ src/proto/PINT-le-bytefield.c 15 Sep 2007 00:27:06 -0000 @@ -23,6 +23,7 @@ #include "src/io/description/pint-request.h" /* for PINT_Request */ #include "src/io/description/pint-distribution.h" /* for PINT_dist_lookup */ #include "pvfs2-internal.h" +#include "pint-hint.h" /* defined later */ static int check_req_size(struct PVFS_server_req *req); @@ -79,6 +80,14 @@ static void lebf_initialize(void) initializing_sizes = 1; + /* set number of hints in request to the max */ + for(i = 0; i < PVFS_HINT_MAX; ++i) + { + char name[PVFS_HINT_MAX_NAME_LENGTH] = {0}; + char val[PVFS_HINT_MAX_LENGTH] = {0}; + PVFS_hint_add(&req.hints, name, PVFS_HINT_MAX_LENGTH, val); + } + for (i=0; i /* * NOTE - Every macro defined here needs to have a stub defined in @@ -461,6 +462,124 @@ static inline void decode_##name(char ** decode_##t12(pptr, &x->x12); \ } +#define endecode_fields_15_struct(name,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7, \ + t8,x8,t9,x9,t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15) \ +static inline void encode_##name(char **pptr, const struct name *x) { \ + encode_##t1(pptr, &x->x1); \ + encode_##t2(pptr, &x->x2); \ + encode_##t3(pptr, &x->x3); \ + encode_##t4(pptr, &x->x4); \ + encode_##t5(pptr, &x->x5); \ + encode_##t6(pptr, &x->x6); \ + encode_##t7(pptr, &x->x7); \ + encode_##t8(pptr, &x->x8); \ + encode_##t9(pptr, &x->x9); \ + encode_##t10(pptr, &x->x10); \ + encode_##t11(pptr, &x->x11); \ + encode_##t12(pptr, &x->x12); \ + encode_##t13(pptr, &x->x13); \ + encode_##t14(pptr, &x->x14); \ + encode_##t15(pptr, &x->x15); \ +} \ +static inline void decode_##name(char **pptr, struct name *x) { \ + decode_##t1(pptr, &x->x1); \ + decode_##t2(pptr, &x->x2); \ + decode_##t3(pptr, &x->x3); \ + decode_##t4(pptr, &x->x4); \ + decode_##t5(pptr, &x->x5); \ + decode_##t6(pptr, &x->x6); \ + decode_##t7(pptr, &x->x7); \ + decode_##t8(pptr, &x->x8); \ + decode_##t9(pptr, &x->x9); \ + decode_##t10(pptr, &x->x10); \ + decode_##t11(pptr, &x->x11); \ + decode_##t12(pptr, &x->x12); \ + decode_##t13(pptr, &x->x13); \ + decode_##t14(pptr, &x->x14); \ + decode_##t15(pptr, &x->x15); \ +} + +#define endecode_fields_16_struct(name,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7, \ + t8,x8,t9,x9,t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16) \ +static inline void encode_##name(char **pptr, const struct name *x) { \ + encode_##t1(pptr, &x->x1); \ + encode_##t2(pptr, &x->x2); \ + encode_##t3(pptr, &x->x3); \ + encode_##t4(pptr, &x->x4); \ + encode_##t5(pptr, &x->x5); \ + encode_##t6(pptr, &x->x6); \ + encode_##t7(pptr, &x->x7); \ + encode_##t8(pptr, &x->x8); \ + encode_##t9(pptr, &x->x9); \ + encode_##t10(pptr, &x->x10); \ + encode_##t11(pptr, &x->x11); \ + encode_##t12(pptr, &x->x12); \ + encode_##t13(pptr, &x->x13); \ + encode_##t14(pptr, &x->x14); \ + encode_##t15(pptr, &x->x15); \ + encode_##t16(pptr, &x->x16); \ +} \ +static inline void decode_##name(char **pptr, struct name *x) { \ + decode_##t1(pptr, &x->x1); \ + decode_##t2(pptr, &x->x2); \ + decode_##t3(pptr, &x->x3); \ + decode_##t4(pptr, &x->x4); \ + decode_##t5(pptr, &x->x5); \ + decode_##t6(pptr, &x->x6); \ + decode_##t7(pptr, &x->x7); \ + decode_##t8(pptr, &x->x8); \ + decode_##t9(pptr, &x->x9); \ + decode_##t10(pptr, &x->x10); \ + decode_##t11(pptr, &x->x11); \ + decode_##t12(pptr, &x->x12); \ + decode_##t13(pptr, &x->x13); \ + decode_##t14(pptr, &x->x14); \ + decode_##t15(pptr, &x->x15); \ + decode_##t16(pptr, &x->x16); \ +} + + +#define endecode_fields_17_struct(name,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7, \ + t8,x8,t9,x9,t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17) \ +static inline void encode_##name(char **pptr, const struct name *x) { \ + encode_##t1(pptr, &x->x1); \ + encode_##t2(pptr, &x->x2); \ + encode_##t3(pptr, &x->x3); \ + encode_##t4(pptr, &x->x4); \ + encode_##t5(pptr, &x->x5); \ + encode_##t6(pptr, &x->x6); \ + encode_##t7(pptr, &x->x7); \ + encode_##t8(pptr, &x->x8); \ + encode_##t9(pptr, &x->x9); \ + encode_##t10(pptr, &x->x10); \ + encode_##t11(pptr, &x->x11); \ + encode_##t12(pptr, &x->x12); \ + encode_##t13(pptr, &x->x13); \ + encode_##t14(pptr, &x->x14); \ + encode_##t15(pptr, &x->x15); \ + encode_##t16(pptr, &x->x16); \ + encode_##t17(pptr, &x->x17); \ +} \ +static inline void decode_##name(char **pptr, struct name *x) { \ + decode_##t1(pptr, &x->x1); \ + decode_##t2(pptr, &x->x2); \ + decode_##t3(pptr, &x->x3); \ + decode_##t4(pptr, &x->x4); \ + decode_##t5(pptr, &x->x5); \ + decode_##t6(pptr, &x->x6); \ + decode_##t7(pptr, &x->x7); \ + decode_##t8(pptr, &x->x8); \ + decode_##t9(pptr, &x->x9); \ + decode_##t10(pptr, &x->x10); \ + decode_##t11(pptr, &x->x11); \ + decode_##t12(pptr, &x->x12); \ + decode_##t13(pptr, &x->x13); \ + decode_##t14(pptr, &x->x14); \ + decode_##t15(pptr, &x->x15); \ + decode_##t16(pptr, &x->x16); \ + decode_##t17(pptr, &x->x17); \ +} + /* ones with arrays that are allocated in the decode */ /* one field then one array */ @@ -674,6 +793,18 @@ static inline void decode_##name(char ** x->a1 = decode_malloc(x->n1 * sizeof(*x->a1)); \ for (i=0; in1; i++) \ decode_##ta1(pptr, &(x)->a1[i]); \ +} + +#define DEFINE_STATIC_ENDECODE_FUNCS(__name__, __type__) \ +__attribute__((unused)) \ +static void encode_func_##__name__(char **pptr, void *x) \ +{ \ + encode_##__name__(pptr, (__type__ *)x); \ +}; \ +__attribute__((unused)) \ +static void decode_func_##__name__(char **pptr, void *x) \ +{ \ + decode_##__name__(pptr, (__type__ *)x); \ } #endif /* __SRC_PROTO_ENDECODE_FUNCS_H */ Index: src/proto/module.mk.in =================================================================== RCS file: /projects/cvsroot/pvfs2/src/proto/module.mk.in,v retrieving revision 1.5 diff -u -a -p -r1.5 module.mk.in --- src/proto/module.mk.in 7 Jul 2003 00:07:10 -0000 1.5 +++ src/proto/module.mk.in 15 Sep 2007 00:27:06 -0000 @@ -1,7 +1,7 @@ DIR := src/proto LIBSRC += \ $(DIR)/PINT-reqproto-encode.c \ - $(DIR)/PINT-le-bytefield.c + $(DIR)/PINT-le-bytefield.c SERVERSRC += \ $(DIR)/PINT-reqproto-encode.c \ - $(DIR)/PINT-le-bytefield.c + $(DIR)/PINT-le-bytefield.c Index: src/proto/pvfs2-req-proto.h =================================================================== RCS file: /projects/cvsroot/pvfs2/src/proto/pvfs2-req-proto.h,v retrieving revision 1.151 diff -u -a -p -r1.151 pvfs2-req-proto.h --- src/proto/pvfs2-req-proto.h 17 Aug 2007 04:04:27 -0000 1.151 +++ src/proto/pvfs2-req-proto.h 15 Sep 2007 00:27:06 -0000 @@ -17,6 +17,7 @@ #include "pvfs2-request.h" #include "pint-request.h" #include "pvfs2-mgmt.h" +#include "pint-hint.h" /* update PVFS2_PROTO_MAJOR on wire protocol changes that break backwards * compatibility (such as changing the semantics or protocol fields for an @@ -165,12 +166,14 @@ endecode_fields_3_struct( __creds, \ __fsid, \ __objtype, \ - __ext_array) \ + __ext_array, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_CREATE; \ (__req).credentials = (__creds); \ (__req).u.create.fs_id = (__fsid); \ + (__req).hints = (__hints); \ (__req).u.create.object_type = (__objtype); \ (__req).u.create.handle_extent_array.extent_count =\ (__ext_array).extent_count; \ @@ -202,10 +205,12 @@ endecode_fields_2_struct( #define PINT_SERVREQ_REMOVE_FILL(__req, \ __creds, \ __fsid, \ - __handle)\ + __handle,\ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_REMOVE; \ + (__req).hints = (__hints); \ (__req).credentials = (__creds); \ (__req).u.remove.fs_id = (__fsid); \ (__req).u.remove.handle = (__handle); \ @@ -227,10 +232,12 @@ endecode_fields_2_struct( #define PINT_SERVREQ_MGMT_REMOVE_OBJECT_FILL(__req, \ __creds, \ __fsid, \ - __handle)\ + __handle,\ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_REMOVE_OBJECT; \ + (__req).hints = (__hints); \ (__req).credentials = (__creds); \ (__req).u.mgmt_remove_object.fs_id = (__fsid); \ (__req).u.mgmt_remove_object.handle = (__handle); \ @@ -258,10 +265,12 @@ endecode_fields_4_struct( __creds, \ __fsid, \ __handle,\ - __entry) \ + __entry, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_REMOVE_DIRENT; \ + (__req).hints = (__hints); \ (__req).credentials = (__creds); \ (__req).u.mgmt_remove_dirent.fs_id = (__fsid); \ (__req).u.mgmt_remove_dirent.handle = (__handle); \ @@ -283,11 +292,13 @@ endecode_fields_2_struct( #define PINT_SERVREQ_MGMT_GET_DIRDATA_HANDLE_FILL(__req, \ __creds, \ __fsid, \ - __handle)\ + __handle,\ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_GET_DIRDATA_HANDLE; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_get_dirdata_handle.fs_id = (__fsid); \ (__req).u.mgmt_get_dirdata_handle.handle = (__handle); \ } while (0) @@ -317,11 +328,13 @@ endecode_fields_3_struct( #define PINT_SERVREQ_FLUSH_FILL(__req, \ __creds, \ __fsid, \ - __handle)\ + __handle,\ + __hints )\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_FLUSH; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.flush.fs_id = (__fsid); \ (__req).u.flush.handle = (__handle); \ } while (0) @@ -345,11 +358,13 @@ endecode_fields_3_struct( __creds, \ __fsid, \ __handle,\ - __amask) \ + __amask, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_GETATTR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.getattr.fs_id = (__fsid); \ (__req).u.getattr.handle = (__handle); \ (__req).u.getattr.attrmask = (__amask);\ @@ -389,11 +404,13 @@ endecode_fields_4_struct( __handle, \ __objtype, \ __attr, \ - __extra_amask) \ + __extra_amask, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_SETATTR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.setattr.fs_id = (__fsid); \ (__req).u.setattr.handle = (__handle); \ (__attr).objtype = (__objtype); \ @@ -427,11 +444,13 @@ endecode_fields_5_struct( __path, \ __fsid, \ __handle, \ - __amask) \ + __amask, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_LOOKUP_PATH; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.lookup_path.path = (__path); \ (__req).u.lookup_path.fs_id = (__fsid); \ (__req).u.lookup_path.starting_handle = (__handle);\ @@ -489,11 +508,13 @@ endecode_fields_4_struct( __creds, \ __fs_id, \ __ext_array, \ - __attr) \ + __attr, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MKDIR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mkdir.fs_id = __fs_id; \ (__req).u.mkdir.handle_extent_array.extent_count = \ (__ext_array).extent_count; \ @@ -536,11 +557,13 @@ endecode_fields_4_struct( __name, \ __new_handle, \ __parent_handle, \ - __fs_id) \ + __fs_id, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_CRDIRENT; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.crdirent.name = (__name); \ (__req).u.crdirent.new_handle = (__new_handle); \ (__req).u.crdirent.parent_handle = \ @@ -569,11 +592,13 @@ endecode_fields_3_struct( __creds, \ __fsid, \ __handle, \ - __entry) \ + __entry, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_RMDIRENT; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.rmdirent.fs_id = (__fsid); \ (__req).u.rmdirent.parent_handle = (__handle);\ (__req).u.rmdirent.entry = (__entry); \ @@ -611,11 +636,13 @@ endecode_fields_4_struct( __fsid, \ __parent_handle,\ __new_dirent, \ - __entry) \ + __entry, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_CHDIRENT; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.chdirent.fs_id = (__fsid); \ (__req).u.chdirent.parent_handle = \ (__parent_handle); \ @@ -654,11 +681,13 @@ endecode_fields_4_struct( __fsid, \ __handle, \ __token, \ - __dirent_count) \ + __dirent_count, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_READDIR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.readdir.fs_id = (__fsid); \ (__req).u.readdir.handle = (__handle); \ (__req).u.readdir.token = (__token); \ @@ -686,10 +715,11 @@ endecode_fields_3a_struct( /* getconfig ***************************************************/ /* - retrieves initial configuration information from server */ -#define PINT_SERVREQ_GETCONFIG_FILL(__req, __creds)\ +#define PINT_SERVREQ_GETCONFIG_FILL(__req, __creds, __hints)\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_GETCONFIG; \ + (__req).hints = (__hints); \ (__req).credentials = (__creds); \ } while (0); @@ -728,11 +758,13 @@ endecode_fields_5_struct( __creds, \ __fsid, \ __size, \ - __handle) \ + __handle, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_TRUNCATE; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.truncate.fs_id = (__fsid); \ (__req).u.truncate.size = (__size); \ (__req).u.truncate.handle = (__handle);\ @@ -749,11 +781,12 @@ endecode_fields_1_struct( PVFS_servreq_statfs, PVFS_fs_id, fs_id) -#define PINT_SERVREQ_STATFS_FILL(__req, __creds, __fsid)\ +#define PINT_SERVREQ_STATFS_FILL(__req, __creds, __fsid,__hints)\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_STATFS; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.statfs.fs_id = (__fsid); \ } while (0) @@ -836,11 +869,13 @@ struct PVFS_servreq_io __io_dist, \ __file_req, \ __file_req_off, \ - __aggregate_size) \ + __aggregate_size, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_IO; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.io.fs_id = (__fsid); \ (__req).u.io.handle = (__handle); \ (__req).u.io.io_type = (__io_type); \ @@ -851,7 +886,7 @@ do { (__req).u.io.file_req = (__file_req); \ (__req).u.io.file_req_offset = (__file_req_off); \ (__req).u.io.aggregate_size = (__aggregate_size);\ -} while (0) +} while (0) struct PVFS_servresp_io { @@ -962,11 +997,13 @@ struct PVFS_servreq_small_io __filereq, \ __filereq_offset, \ __segments, \ - __memreq_size) \ + __memreq_size, \ + __hints ) \ do { \ int _sio_i; \ (__req).op = PVFS_SERV_SMALL_IO; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.small_io.fs_id = (__fsid); \ (__req).u.small_io.handle = (__handle); \ (__req).u.small_io.io_type = (__io_type); \ @@ -1055,11 +1092,13 @@ endecode_fields_3a_struct( __fsid, \ __amask, \ __nhandles, \ - __handle_array) \ + __handle_array, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_LISTATTR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.listattr.fs_id = (__fsid); \ (__req).u.listattr.attrmask = (__amask);\ (__req).u.listattr.nhandles = (__nhandles); \ @@ -1101,11 +1140,13 @@ endecode_fields_3_struct( __creds,\ __fsid, \ __param,\ - __value)\ + __value,\ + __hints)\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_SETPARAM; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_setparam.fs_id = (__fsid); \ (__req).u.mgmt_setparam.param = (__param); \ (__req).u.mgmt_setparam.value = (__value); \ @@ -1124,11 +1165,12 @@ endecode_fields_1_struct( * to requests */ -#define PINT_SERVREQ_MGMT_NOOP_FILL(__req, __creds)\ +#define PINT_SERVREQ_MGMT_NOOP_FILL(__req, __creds, __hints)\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_NOOP; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ } while (0) @@ -1148,11 +1190,13 @@ endecode_fields_2_struct( #define PINT_SERVREQ_MGMT_PERF_MON_FILL(__req, \ __creds, \ __next_id,\ - __count) \ + __count, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_PERF_MON; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_perf_mon.next_id = (__next_id);\ (__req).u.mgmt_perf_mon.count = (__count); \ } while (0) @@ -1197,11 +1241,13 @@ endecode_fields_3_struct( __creds, \ __fs_id, \ __handle_count, \ - __position) \ + __position, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_ITERATE_HANDLES; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_iterate_handles.fs_id = (__fs_id); \ (__req).u.mgmt_iterate_handles.handle_count = (__handle_count);\ (__req).u.mgmt_iterate_handles.position = (__position); \ @@ -1243,11 +1289,13 @@ endecode_fields_1a_struct( __creds, \ __fs_id, \ __handle_array, \ - __handle_count) \ + __handle_count, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_DSPACE_INFO_LIST; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_dspace_info_list.fs_id = (__fs_id); \ (__req).u.mgmt_dspace_info_list.handle_array = (__handle_array);\ (__req).u.mgmt_dspace_info_list.handle_count = (__handle_count);\ @@ -1278,11 +1326,12 @@ endecode_fields_1_struct( PVFS_servreq_mgmt_event_mon, uint32_t, event_count) -#define PINT_SERVREQ_MGMT_EVENT_MON_FILL(__req, __creds, __event_count)\ +#define PINT_SERVREQ_MGMT_EVENT_MON_FILL(__req, __creds, __event_count, __hints)\ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_MGMT_EVENT_MON; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.mgmt_event_mon.event_count = (__event_count); \ } while (0) @@ -1327,14 +1376,16 @@ endecode_fields_2aa_struct( __handle,\ __nkey,\ __key_array, \ - __size_array) \ + __size_array,\ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ - (__req).op = PVFS_SERV_GETEATTR; \ + (__req).op = PVFS_SERV_GETEATTR; \ (__req).credentials = (__creds); \ - (__req).u.geteattr.fs_id = (__fsid); \ - (__req).u.geteattr.handle = (__handle); \ - (__req).u.geteattr.nkey = (__nkey); \ + (__req).hints = (__hints); \ + (__req).u.geteattr.fs_id = (__fsid); \ + (__req).u.geteattr.handle = (__handle);\ + (__req).u.geteattr.nkey = (__nkey); \ (__req).u.geteattr.key = (__key_array);\ (__req).u.geteattr.valsz = (__size_array);\ } while (0) @@ -1387,11 +1438,13 @@ endecode_fields_4aa_struct( __flags, \ __nkey, \ __key_array, \ - __val_array) \ + __val_array, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_SETEATTR; \ - (__req).credentials = (__creds); \ + (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.seteattr.fs_id = (__fsid); \ (__req).u.seteattr.handle = (__handle); \ (__req).u.seteattr.flags = (__flags); \ @@ -1421,11 +1474,13 @@ endecode_fields_3_struct( __creds, \ __fsid, \ __handle,\ - __key) \ + __key, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_DELEATTR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.deleattr.fs_id = (__fsid); \ (__req).u.deleattr.handle = (__handle); \ (__req).u.deleattr.key.buffer_sz = (__key).buffer_sz;\ @@ -1460,11 +1515,13 @@ endecode_fields_4a_struct( __handle, \ __token, \ __nkey, \ - __size_array) \ + __size_array, \ + __hints) \ do { \ memset(&(__req), 0, sizeof(__req)); \ (__req).op = PVFS_SERV_LISTEATTR; \ (__req).credentials = (__creds); \ + (__req).hints = (__hints); \ (__req).u.listeattr.fs_id = (__fsid); \ (__req).u.listeattr.handle = (__handle); \ (__req).u.listeattr.token = (__token); \ @@ -1495,6 +1552,8 @@ struct PVFS_server_req { enum PVFS_server_op op; PVFS_credentials credentials; + PVFS_hint hints; + union { struct PVFS_servreq_create create; @@ -1531,18 +1590,24 @@ struct PVFS_server_req /* insert padding to ensure the union starts on an aligned boundary */ static inline void encode_PVFS_server_req(char **pptr, const struct PVFS_server_req *x) { + int count; encode_enum(pptr, &x->op); #ifdef HAVE_VALGRIND_H *(int32_t*) *pptr = 0; /* else possible memcpy in BMI sees uninit */ #endif *pptr += 4; encode_PVFS_credentials(pptr, &x->credentials); + encode_PINT_hint(pptr, x->hints); + *pptr +=count; } static inline void decode_PVFS_server_req(char **pptr, struct PVFS_server_req *x) { + int count; decode_enum(pptr, &x->op); *pptr += 4; decode_PVFS_credentials(pptr, &x->credentials); + decode_PINT_hint(pptr, &x->hints); + *pptr +=count; } #endif Index: src/server/chdirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/chdirent.sm,v retrieving revision 1.18 diff -u -a -p -r1.18 chdirent.sm --- src/server/chdirent.sm 30 Aug 2007 00:13:44 -0000 1.18 +++ src/server/chdirent.sm 15 Sep 2007 00:27:06 -0000 @@ -132,7 +132,7 @@ static PINT_sm_action chdirent_verify_pa 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -165,7 +165,7 @@ static PINT_sm_action chdirent_read_dire 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -222,7 +222,7 @@ static PINT_sm_action chdirent_change_di &s_op->key, &s_op->val, TROVE_SYNC | 0, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); s_op->u.chdirent.dir_attr_update_required = 1; return ret; @@ -270,7 +270,7 @@ static PINT_sm_action chdirent_update_di ds_attr, TROVE_SYNC | 0, - smcb, 0, js_p, &j_id, server_job_context); + s_op, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/crdirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/crdirent.sm,v retrieving revision 1.68 diff -u -a -p -r1.68 crdirent.sm --- src/server/crdirent.sm 30 Aug 2007 00:13:44 -0000 1.68 +++ src/server/crdirent.sm 15 Sep 2007 00:27:06 -0000 @@ -202,7 +202,7 @@ static PINT_sm_action crdirent_read_dire 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -279,7 +279,7 @@ static PINT_sm_action crdirent_write_dir s_op->u.crdirent.fs_id, s_op->u.crdirent.dirent_handle, &s_op->key, &s_op->val, keyval_flags, - NULL, smcb, 0, js_p, &i, server_job_context); + NULL, smcb, 0, js_p, &i, server_job_context, s_op->req->hints); /* * creating an entry will cause directory times to be updated. @@ -329,7 +329,7 @@ static PINT_sm_action crdirent_update_di s_op->req->u.crdirent.fs_id, s_op->req->u.crdirent.parent_handle, ds_attr, TROVE_SYNC, - smcb, 0, js_p, &j_id, server_job_context); + smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/create.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/create.sm,v retrieving revision 1.46 diff -u -a -p -r1.46 create.sm --- src/server/create.sm 30 Aug 2007 00:13:44 -0000 1.46 +++ src/server/create.sm 15 Sep 2007 00:27:06 -0000 @@ -83,7 +83,7 @@ static int create_create( 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return(ret); } Index: src/server/del-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/del-eattr.sm,v retrieving revision 1.13 diff -u -a -p -r1.13 del-eattr.sm --- src/server/del-eattr.sm 30 Aug 2007 00:13:44 -0000 1.13 +++ src/server/del-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -166,7 +166,7 @@ static PINT_sm_action deleattr_delobj_ea 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/final-response.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/final-response.sm,v retrieving revision 1.36 diff -u -a -p -r1.36 final-response.sm --- src/server/final-response.sm 30 Aug 2007 00:13:44 -0000 1.36 +++ src/server/final-response.sm 15 Sep 2007 00:27:06 -0000 @@ -128,7 +128,7 @@ static PINT_sm_action final_response_sen PINT_gossip_err_server_resp(&s_op->resp); js_p->error_code = ret; - return SM_ACTION_COMPLETE; + return 1; } /* send the response */ @@ -136,7 +136,8 @@ static PINT_sm_action final_response_sen s_op->addr, s_op->encoded.buffer_list, s_op->encoded.size_list, s_op->encoded.list_count, s_op->encoded.total_size, s_op->tag, s_op->encoded.buffer_type, 0, smcb, 0, js_p, &tmp_id, - server_job_context, user_opts->server_job_bmi_timeout); + server_job_context, user_opts->server_job_bmi_timeout, + s_op->req->hints); return ret; } Index: src/server/flush.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/flush.sm,v retrieving revision 1.22 diff -u -a -p -r1.22 flush.sm --- src/server/flush.sm 30 Aug 2007 00:13:44 -0000 1.22 +++ src/server/flush.sm 15 Sep 2007 00:27:06 -0000 @@ -133,7 +133,7 @@ static PINT_sm_action flush_keyval_flush 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -184,7 +184,7 @@ static PINT_sm_action flush_bstream_flus 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/get-attr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/get-attr.sm,v retrieving revision 1.87 diff -u -a -p -r1.87 get-attr.sm --- src/server/get-attr.sm 30 Aug 2007 00:13:44 -0000 1.87 +++ src/server/get-attr.sm 15 Sep 2007 00:27:06 -0000 @@ -409,10 +409,11 @@ static PINT_sm_action getattr_read_symli ret = job_trove_keyval_read( s_op->u.getattr.fs_id, s_op->u.getattr.handle, - &(s_op->key), &(s_op->val), - 0, + &s_op->key, &s_op->val, + 0, NULL, smcb, 0, js_p, - &i, server_job_context); + &i, server_job_context, s_op->req->hints); + return ret; } @@ -499,7 +500,7 @@ static PINT_sm_action getattr_read_metaf &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, - &i, server_job_context); + &i, server_job_context, s_op->req->hints); return ret; } @@ -590,10 +591,10 @@ static PINT_sm_action getattr_read_metaf ret = job_trove_keyval_read( s_op->u.getattr.fs_id, s_op->u.getattr.handle, - &s_op->key, &s_op->val, - 0, + &s_op->key, &s_op->val, + 0, NULL, smcb, 0, js_p, - &i, server_job_context); + &i, server_job_context, s_op->req->hints); return ret; } @@ -651,10 +652,10 @@ static PINT_sm_action getattr_read_metaf ret = job_trove_keyval_read( s_op->u.getattr.fs_id, s_op->u.getattr.handle, - &(s_op->key), &(s_op->val), - 0, + &(s_op->key), &(s_op->val), + 0, NULL, - smcb, 0, js_p, &i, server_job_context); + smcb, 0, js_p, &i, server_job_context, s_op->req->hints); return ret; } @@ -718,7 +719,7 @@ static PINT_sm_action getattr_setup_resp js_p->error_code = -PVFS_EIO; return SM_ACTION_COMPLETE; } - + gossip_debug(GOSSIP_GETATTR_DEBUG, " also returning dist size of %d\n", resp_attr->u.meta.dist_size); @@ -850,7 +851,7 @@ static PINT_sm_action getattr_get_dirdat 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -880,7 +881,7 @@ static PINT_sm_action getattr_get_dirent 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -1003,11 +1004,11 @@ static PINT_sm_action getattr_get_dir_hi js_p->error_code = 0; ret = job_trove_keyval_read_list( - s_op->req->u.getattr.fs_id, + s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle, s_op->key_a, s_op->val_a, s_op->u.getattr.err_array, NUM_SPECIAL_KEYS, 0, NULL, smcb, 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/get-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/get-eattr.sm,v retrieving revision 1.19 diff -u -a -p -r1.19 get-eattr.sm --- src/server/get-eattr.sm 30 Aug 2007 00:13:44 -0000 1.19 +++ src/server/get-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -166,7 +166,7 @@ static PINT_sm_action geteattr_read_eatt 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/io.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/io.sm,v retrieving revision 1.68 diff -u -a -p -r1.68 io.sm --- src/server/io.sm 30 Aug 2007 00:13:44 -0000 1.68 +++ src/server/io.sm 15 Sep 2007 00:27:06 -0000 @@ -117,7 +117,8 @@ static int io_send_ack( s_op->addr, s_op->encoded.buffer_list, s_op->encoded.size_list, s_op->encoded.list_count, s_op->encoded.total_size, s_op->tag, s_op->encoded.buffer_type, 0, smcb, 0, js_p, - &tmp_id, server_job_context, user_opts->server_job_bmi_timeout); + &tmp_id, server_job_context, user_opts->server_job_bmi_timeout, + s_op->req->hints); return err; } @@ -156,6 +157,8 @@ static PINT_sm_action io_start_flow( return SM_ACTION_COMPLETE; } + s_op->u.io.flow_d->hints = s_op->req->hints; + /* we still have the file size stored in the response structure * that we sent in the previous state, other details come from * request @@ -233,7 +236,8 @@ static PINT_sm_action io_start_flow( } err = job_flow(s_op->u.io.flow_d, smcb, 0, js_p, &tmp_id, - server_job_context, user_opts->server_job_flow_timeout); + server_job_context, user_opts->server_job_flow_timeout + , s_op->req->hints); return err; } @@ -381,7 +385,8 @@ static PINT_sm_action io_send_completion s_op->addr, s_op->encoded.buffer_list, s_op->encoded.size_list, s_op->encoded.list_count, s_op->encoded.total_size, s_op->tag, s_op->encoded.buffer_type, 0, smcb, 0, js_p, &tmp_id, - server_job_context, user_opts->server_job_bmi_timeout); + server_job_context, user_opts->server_job_bmi_timeout, + s_op->req->hints); return err; } Index: src/server/list-attr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/list-attr.sm,v retrieving revision 1.7 diff -u -a -p -r1.7 list-attr.sm --- src/server/list-attr.sm 30 Aug 2007 00:13:44 -0000 1.7 +++ src/server/list-attr.sm 15 Sep 2007 00:27:06 -0000 @@ -387,7 +387,7 @@ static PINT_sm_action listattr_read_syml s_op->u.listattr.fs_id, *handle, &(s_op->key), &(s_op->val), 0, NULL, smcb, 0, js_p, - &i, server_job_context); + &i, server_job_context, s_op->req->hints); return ret; } @@ -482,7 +482,7 @@ static PINT_sm_action listattr_read_meta s_op->u.listattr.fs_id, *handle, &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, - &i, server_job_context); + &i, server_job_context, s_op->req->hints); return ret; } @@ -546,7 +546,7 @@ static PINT_sm_action listattr_read_meta s_op->u.listattr.fs_id, *handle, &(s_op->key), &(s_op->val), 0, NULL, - smcb, 0, js_p, &i, server_job_context); + smcb, 0, js_p, &i, server_job_context, s_op->req->hints); return ret; } @@ -753,7 +753,7 @@ static PINT_sm_action listattr_setup_op( 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -779,7 +779,7 @@ static PINT_sm_action listattr_get_diren 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/list-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/list-eattr.sm,v retrieving revision 1.12 diff -u -a -p -r1.12 list-eattr.sm --- src/server/list-eattr.sm 30 Aug 2007 00:13:44 -0000 1.12 +++ src/server/list-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -141,7 +141,7 @@ static PINT_sm_action listeattr_list_eat 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/lookup.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/lookup.sm,v retrieving revision 1.56 diff -u -a -p -r1.56 lookup.sm --- src/server/lookup.sm 30 Aug 2007 00:13:44 -0000 1.56 +++ src/server/lookup.sm 15 Sep 2007 00:27:06 -0000 @@ -238,7 +238,7 @@ static PINT_sm_action lookup_read_object /* get the dspace attributes/metadata */ ret = job_trove_dspace_getattr( s_op->req->u.lookup_path.fs_id, handle, smcb, ds_attr, - 0, js_p, &j_id, server_job_context); + 0, js_p, &j_id, server_job_context, s_op->req->hints ); return ret; } @@ -407,11 +407,11 @@ static PINT_sm_action lookup_check_acls_ &s_op->val, 0, NULL, - smcb, + s_op, 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return SM_ACTION_COMPLETE; } @@ -520,7 +520,7 @@ static PINT_sm_action lookup_read_direct ret = job_trove_keyval_read( s_op->req->u.lookup_path.fs_id, handle, &s_op->key, &s_op->val, 0, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } @@ -560,7 +560,7 @@ static PINT_sm_action lookup_read_direct &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/mgmt-get-dirdata-handle.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/mgmt-get-dirdata-handle.sm,v retrieving revision 1.9 diff -u -a -p -r1.9 mgmt-get-dirdata-handle.sm --- src/server/mgmt-get-dirdata-handle.sm 30 Aug 2007 00:13:44 -0000 1.9 +++ src/server/mgmt-get-dirdata-handle.sm 15 Sep 2007 00:27:06 -0000 @@ -81,7 +81,7 @@ static int mgmt_get_dirdata_handle_from_ &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/mgmt-remove-dirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/mgmt-remove-dirent.sm,v retrieving revision 1.13 diff -u -a -p -r1.13 mgmt-remove-dirent.sm --- src/server/mgmt-remove-dirent.sm 30 Aug 2007 00:13:44 -0000 1.13 +++ src/server/mgmt-remove-dirent.sm 15 Sep 2007 00:27:06 -0000 @@ -82,7 +82,7 @@ static int mgmt_remove_dirent_get_dirdat &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -114,7 +114,7 @@ static PINT_sm_action mgmt_remove_dirent 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/mgmt-remove-object.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/mgmt-remove-object.sm,v retrieving revision 1.13 diff -u -a -p -r1.13 mgmt-remove-object.sm --- src/server/mgmt-remove-object.sm 30 Aug 2007 00:13:44 -0000 1.13 +++ src/server/mgmt-remove-object.sm 15 Sep 2007 00:27:06 -0000 @@ -66,7 +66,7 @@ static PINT_sm_action mgmt_remove_dspace 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/mkdir.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/mkdir.sm,v retrieving revision 1.50 diff -u -a -p -r1.50 mkdir.sm --- src/server/mkdir.sm 30 Aug 2007 00:13:44 -0000 1.50 +++ src/server/mkdir.sm 15 Sep 2007 00:27:06 -0000 @@ -123,8 +123,8 @@ static PINT_sm_action mkdir_create( s_op->u.mkdir.fs_id, &s_op->u.mkdir.handle_extent_array, PVFS_TYPE_DIRECTORY, NULL, TROVE_SYNC, - smcb, 0, js_p, &i, - server_job_context); + s_op, 0, js_p, &i, + server_job_context, s_op->req->hints); return ret; } @@ -165,13 +165,13 @@ static PINT_sm_action mkdir_setattrib( s_op->u.mkdir.fs_id, s_op->resp.u.mkdir.handle, ds_attr, TROVE_SYNC, - smcb, 0, js_p, &j_id, server_job_context); + s_op, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } -static PINT_sm_action mkdir_create_dirdata_dspace( - struct PINT_smcb *smcb, job_status_s *js_p) +static int mkdir_create_dirdata_dspace( + struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -PVFS_ENOMEM; @@ -196,8 +196,8 @@ static PINT_sm_action mkdir_create_dirda ret = job_trove_dspace_create( s_op->u.mkdir.fs_id, &extent_array, PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, - smcb, 0, js_p, &i, - server_job_context); + s_op, 0, js_p, &i, + server_job_context, s_op->req->hints); free(extent_array.extent_array); extent_array.extent_array = NULL; @@ -242,13 +242,12 @@ static PINT_sm_action mkdir_write_dirdat s_op->u.mkdir.fs_id, s_op->resp.u.mkdir.handle, &s_op->key, &s_op->val, 0, - NULL, smcb, 0, js_p, &i, server_job_context); + NULL, smcb, 0, js_p, &i, server_job_context, s_op->req->hints); return ret; } -static PINT_sm_action mkdir_error( - struct PINT_smcb *smcb, job_status_s *js_p) +static int mkdir_error(struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); s_op->resp.u.mkdir.handle = 0; @@ -257,7 +256,7 @@ static PINT_sm_action mkdir_error( { js_p->error_code = -PVFS_EINVAL; } - return SM_ACTION_COMPLETE; + return 1; } /* Index: src/server/prelude.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/prelude.sm,v retrieving revision 1.70 diff -u -a -p -r1.70 prelude.sm --- src/server/prelude.sm 30 Aug 2007 00:13:44 -0000 1.70 +++ src/server/prelude.sm 15 Sep 2007 00:27:06 -0000 @@ -160,7 +160,7 @@ static PINT_sm_action prelude_getattr_if ret = job_trove_dspace_getattr( s_op->target_fs_id, s_op->target_handle, smcb, &(s_op->ds_attr), - 0, js_p, &tmp_id, server_job_context); + 0, js_p, &tmp_id, server_job_context, s_op->req->hints); return ret; } @@ -709,7 +709,8 @@ static PINT_sm_action prelude_check_acls 0, js_p, &i, - server_job_context); + server_job_context, + s_op->req->hints); return ret; } Index: src/server/proto-error.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/proto-error.sm,v retrieving revision 1.7 diff -u -a -p -r1.7 proto-error.sm --- src/server/proto-error.sm 30 Aug 2007 00:13:44 -0000 1.7 +++ src/server/proto-error.sm 15 Sep 2007 00:27:06 -0000 @@ -79,7 +79,7 @@ static PINT_sm_action proto_error_init( js_p, &tmp_id, server_job_context, - user_opts->server_job_bmi_timeout); + user_opts->server_job_bmi_timeout, s_op->req->hints); return ret; } Index: src/server/pvfs2-server.c =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.c,v retrieving revision 1.246 diff -u -a -p -r1.246 pvfs2-server.c --- src/server/pvfs2-server.c 30 Aug 2007 00:13:44 -0000 1.246 +++ src/server/pvfs2-server.c 15 Sep 2007 00:27:06 -0000 @@ -1982,6 +1982,8 @@ int server_state_machine_complete(PINT_s /* release the decoding of the unexpected request */ if (ENCODING_IS_VALID(s_op->decoded.enc_type)) { + PVFS_hint_free(s_op->decoded.stub_dec.req.hints); + PINT_decode_release(&(s_op->decoded),PINT_DECODE_REQ); } Index: src/server/readdir.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/readdir.sm,v retrieving revision 1.51 diff -u -a -p -r1.51 readdir.sm --- src/server/readdir.sm 30 Aug 2007 00:13:44 -0000 1.51 +++ src/server/readdir.sm 15 Sep 2007 00:27:06 -0000 @@ -124,7 +124,7 @@ static PINT_sm_action readdir_read_dirda &s_op->key, &s_op->val, 0, NULL, smcb, 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -204,8 +204,8 @@ static PINT_sm_action readdir_iterate_on s_op->req->u.readdir.token, s_op->key_a, s_op->val_a, s_op->req->u.readdir.dirent_count, 0, - NULL, smcb, 0, js_p, - &j_id, server_job_context); + NULL, smcb, 0, js_p, + &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/remove.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/remove.sm,v retrieving revision 1.58 diff -u -a -p -r1.58 remove.sm --- src/server/remove.sm 30 Aug 2007 00:13:44 -0000 1.58 +++ src/server/remove.sm 15 Sep 2007 00:27:06 -0000 @@ -241,10 +241,10 @@ static PINT_sm_action remove_read_dirdat ret = job_trove_keyval_read( s_op->u.remove.fs_id, s_op->u.remove.handle, - &s_op->key, &s_op->val, - 0, + &s_op->key, &s_op->val, + 0, NULL, smcb, 0, js_p, - &j_id, server_job_context); + &j_id, server_job_context, s_op->req->hints); return ret; } @@ -275,7 +275,7 @@ static PINT_sm_action remove_get_dirent_ 0, js_p, &tmp_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -331,7 +331,7 @@ static PINT_sm_action remove_remove_dird 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -354,9 +354,9 @@ static PINT_sm_action remove_remove_dspa ret = job_trove_dspace_remove( s_op->u.remove.fs_id, s_op->u.remove.handle, - TROVE_SYNC, + TROVE_SYNC, smcb, 0, js_p, - &j_id, server_job_context); + &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/rmdirent.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/rmdirent.sm,v retrieving revision 1.55 diff -u -a -p -r1.55 rmdirent.sm --- src/server/rmdirent.sm 30 Aug 2007 00:13:44 -0000 1.55 +++ src/server/rmdirent.sm 15 Sep 2007 00:27:06 -0000 @@ -125,7 +125,7 @@ static int rmdirent_verify_parent_metada 0, js_p, &i, - server_job_context); + server_job_context, s_op->req->hints); return ret; } @@ -169,7 +169,7 @@ static int rmdirent_remove_directory_ent &s_op->key, &s_op->val, flags, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); /* * Removing an entry causes an update of directory timestamps @@ -219,7 +219,7 @@ static PINT_sm_action rmdirent_update_di s_op->req->u.rmdirent.fs_id, s_op->req->u.rmdirent.parent_handle, ds_attr, TROVE_SYNC, - smcb, 0, js_p, &j_id, server_job_context); + smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/set-attr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/set-attr.sm,v retrieving revision 1.72 diff -u -a -p -r1.72 set-attr.sm --- src/server/set-attr.sm 30 Aug 2007 00:13:44 -0000 1.72 +++ src/server/set-attr.sm 15 Sep 2007 00:27:06 -0000 @@ -309,7 +309,7 @@ static PINT_sm_action setattr_setobj_att s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle, ds_attr, TROVE_SYNC, - smcb, 0, js_p, &j_id, server_job_context); + smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } @@ -363,7 +363,7 @@ static PINT_sm_action setattr_write_meta s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle, &(s_op->key), &(s_op->val), 0, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } @@ -414,7 +414,7 @@ static PINT_sm_action setattr_write_meta s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle, &(s_op->key), &(s_op->val), TROVE_SYNC, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } @@ -459,7 +459,7 @@ static PINT_sm_action setattr_write_syml s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle, &(s_op->key), &(s_op->val), TROVE_SYNC, - NULL, smcb, 0, js_p, &j_id, server_job_context); + NULL, smcb, 0, js_p, &j_id, server_job_context, s_op->req->hints); return ret; } Index: src/server/set-eattr.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/set-eattr.sm,v retrieving revision 1.19 diff -u -a -p -r1.19 set-eattr.sm --- src/server/set-eattr.sm 30 Aug 2007 00:13:44 -0000 1.19 +++ src/server/set-eattr.sm 15 Sep 2007 00:27:06 -0000 @@ -142,7 +142,7 @@ static int seteattr_setobj_eattribs( 0, js_p, &j_id, - server_job_context); + server_job_context, s_op->req->hints); return ret; } Index: src/server/setparam.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/setparam.sm,v retrieving revision 1.33 diff -u -a -p -r1.33 setparam.sm --- src/server/setparam.sm 30 Aug 2007 00:13:44 -0000 1.33 +++ src/server/setparam.sm 15 Sep 2007 00:27:06 -0000 @@ -95,7 +95,7 @@ static PINT_sm_action setparam_work( ret = job_trove_dspace_verify( s_op->req->u.mgmt_setparam.fs_id, tmp_handle, 0, - smcb, 0, js_p, &tmp_id, server_job_context); + smcb, 0, js_p, &tmp_id, server_job_context, s_op->req->hints); return(ret); case PVFS_SERV_PARAM_EVENT_ON: ret = 0; Index: src/server/small-io.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/small-io.sm,v retrieving revision 1.19 diff -u -a -p -r1.19 small-io.sm --- src/server/small-io.sm 30 Aug 2007 00:13:45 -0000 1.19 +++ src/server/small-io.sm 15 Sep 2007 00:27:06 -0000 @@ -160,7 +160,8 @@ static PINT_sm_action small_io_start_job 0, js_p, &tmp_id, - server_job_context); + server_job_context, + s_op->req->hints); if(ret < 0) { gossip_err("small_io: Failed to post trove bstream write\n"); @@ -194,7 +195,8 @@ static PINT_sm_action small_io_start_job 0, js_p, &tmp_id, - server_job_context); + server_job_context, + s_op->req->hints); if(ret < 0) { gossip_err("small-io: Failed to post trove bstream read\n"); Index: src/server/truncate.sm =================================================================== RCS file: /projects/cvsroot/pvfs2/src/server/truncate.sm,v retrieving revision 1.8 diff -u -a -p -r1.8 truncate.sm --- src/server/truncate.sm 30 Aug 2007 00:13:45 -0000 1.8 +++ src/server/truncate.sm 15 Sep 2007 00:27:06 -0000 @@ -62,7 +62,8 @@ static PINT_sm_action truncate_resize( ret = job_trove_bstream_resize( s_op->req->u.truncate.fs_id, s_op->req->u.truncate.handle, s_op->req->u.truncate.size, s_op->req->u.truncate.flags, - NULL, smcb, 0, js_p, &i, server_job_context); + NULL, smcb, 0, js_p, &i, server_job_context, + s_op->req->hints); return ret; } Index: test/client/mpi-io/mpi-io-test.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/mpi-io/mpi-io-test.c,v retrieving revision 1.13 diff -u -a -p -r1.13 mpi-io-test.c --- test/client/mpi-io/mpi-io-test.c 16 May 2006 02:11:53 -0000 1.13 +++ test/client/mpi-io/mpi-io-test.c 15 Sep 2007 00:27:06 -0000 @@ -36,6 +36,7 @@ /* DEFAULT VALUES FOR OPTIONS */ static int64_t opt_block = 16*1024*1024; static int opt_iter = 1; +static int opt_individual_file = 0; static int opt_coll = 0; static int opt_correct = 0; static int opt_sync = 0; @@ -79,6 +80,7 @@ int main(int argc, char **argv) int nchars=0; int namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; + char file_name[1024]; /* startup MPI and determine the rank of this process */ MPI_Init(&argc,&argv); @@ -91,6 +93,15 @@ int main(int argc, char **argv) if (opt_verbose) fprintf(stdout,"Process %d of %d is on %s\n", mynod, nprocs, processor_name); + + if (opt_individual_file) + { + sprintf(file_name, "%s_%d", opt_file, mynod); + } + else + { + strncpy(file_name, opt_file, 1023); + } if (mynod == 0) printf("# Using mpi-io calls.\n"); @@ -125,7 +136,7 @@ int main(int argc, char **argv) else { comm = MPI_COMM_SELF; } - err = MPI_File_open(comm, opt_file, + err = MPI_File_open(comm, file_name, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); if (err != MPI_SUCCESS) { handle_error(err, "MPI_File_open"); @@ -142,11 +153,22 @@ int main(int argc, char **argv) /* reading and writing to the same block is cheating, but sometimes * we want to measure cached performance of file servers */ if (opt_single == 1) + { seek_position = 0; + } else + { + if (opt_individual_file) + { + seek_position = (j*opt_block); + } + else + { /* seek to an appropriate position depending on the iteration * and rank of the current process */ - seek_position = (j*iter_jump)+(mynod*opt_block); + seek_position = (j*iter_jump)+(mynod*opt_block); + } + } MPI_File_seek(fh, seek_position, MPI_SEEK_SET); @@ -207,14 +229,23 @@ int main(int argc, char **argv) for (j=0; j < opt_iter; j++) { /* reading and writing to the same block is cheating, but sometimes * we want to measure cached performance of file servers */ - if (opt_single == 1) { - seek_position = 0; - } - else { - /* seek to an appropriate position depending on the iteration - * and rank of the current process */ - seek_position = (j*iter_jump)+(mynod*opt_block); - } + if (opt_single == 1) + { + seek_position = 0; + } + else + { + if (opt_individual_file) + { + seek_position = (j*opt_block); + } + else + { + /* seek to an appropriate position depending on the iteration + * and rank of the current process */ + seek_position = (j*iter_jump)+(mynod*opt_block); + } + } MPI_File_seek(fh, seek_position, MPI_SEEK_SET); @@ -350,7 +381,7 @@ static int parse_args(int argc, char **a { int c; - while ((c = getopt(argc, argv, "b:i:f:p:CcyShvrw")) != EOF) { + while ((c = getopt(argc, argv, "b:i:f:p:CcyShvrwI")) != EOF) { switch (c) { case 'b': /* block size */ opt_block = atoi(optarg); @@ -358,6 +389,9 @@ static int parse_args(int argc, char **a case 'i': /* iterations */ opt_iter = atoi(optarg); break; + case 'I': /* individual file per process */ + opt_individual_file = 1; + break; case 'f': /* filename */ strncpy(opt_file, optarg, 255); break; @@ -398,6 +432,13 @@ static int parse_args(int argc, char **a break; } } + + if ( opt_individual_file && opt_coll ) + { + printf("Flags individual file in combination with collective " + "I/O operation not compatible\n"); + exit(1); + } return(0); } @@ -409,6 +450,7 @@ static void usage(void) printf(" -c verify correctness of file data [default: off]\n"); printf(" -C perform operations Collectively [default: off]\n"); printf(" -i iterations [default: 1]\n"); + printf(" -I individual file per process [default: off]\n"); printf(" -f filename [default: /foo/test.out]\n"); printf(" -p path to pvfs2tab file to use [default: notset]\n"); printf(" -S all process write to same Single region of file [default: off]\n"); Index: test/client/sysint/client.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/client.c,v retrieving revision 1.48 diff -u -a -p -r1.48 client.c --- test/client/sysint/client.c 6 Jul 2007 05:23:22 -0000 1.48 +++ test/client/sysint/client.c 15 Sep 2007 00:27:06 -0000 @@ -73,7 +73,7 @@ int main( /* lookup the root handle */ printf("looking up the root handle for fsid = %d\n", fs_id); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); @@ -122,7 +122,11 @@ int main( // call create ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< client.c + &credentials, NULL, resp_create, NULL); +======= &credentials, NULL, NULL, resp_create); +>>>>>>> 1.48 if (ret < 0) { printf("create failed with errcode = %d\n", ret); @@ -203,7 +207,7 @@ int main( memcpy(name + 1, filename, strlen(filename) + 1); ret = PVFS_sys_lookup(fs_id, name, &credentials, - resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); @@ -479,7 +483,7 @@ int main( // call readdir ret = PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount, - &credentials, resp_readdir); + &credentials, resp_readdir, NULL); if (ret < 0) { printf("readdir failed with errcode = %d\n", ret); Index: test/client/sysint/create-with-dist.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/create-with-dist.c,v retrieving revision 1.8 diff -u -a -p -r1.8 create-with-dist.c --- test/client/sysint/create-with-dist.c 6 Jul 2007 05:23:22 -0000 1.8 +++ test/client/sysint/create-with-dist.c 15 Sep 2007 00:27:06 -0000 @@ -102,7 +102,11 @@ int main(int argc, char **argv) /*printf("strip size: %i\n", ((PVFS_simple_stripe_params*)dist->params)->strip_size);*/ ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< create-with-dist.c + &credentials, dist, &resp_create, NULL); +======= &credentials, dist, NULL, &resp_create); +>>>>>>> 1.8 if (ret < 0) { PVFS_perror("create failed with errcode", ret); Index: test/client/sysint/create.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/create.c,v retrieving revision 1.43 diff -u -a -p -r1.43 create.c --- test/client/sysint/create.c 6 Jul 2007 05:23:22 -0000 1.43 +++ test/client/sysint/create.c 15 Sep 2007 00:27:06 -0000 @@ -82,7 +82,11 @@ int main(int argc, char **argv) str_buf, llu(parent_refn.handle)); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< create.c + &credentials, NULL, &resp_create, NULL); +======= &credentials, NULL, NULL, &resp_create); +>>>>>>> 1.43 if (ret < 0) { PVFS_perror("create failed with errcode", ret); Index: test/client/sysint/create.set.get.eattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/create.set.get.eattr.c,v retrieving revision 1.6 diff -u -a -p -r1.6 create.set.get.eattr.c --- test/client/sysint/create.set.get.eattr.c 6 Jul 2007 05:23:22 -0000 1.6 +++ test/client/sysint/create.set.get.eattr.c 15 Sep 2007 00:27:06 -0000 @@ -89,7 +89,11 @@ int main(int argc, char **argv) str_buf, llu(parent_refn.handle)); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< create.set.get.eattr.c + &credentials, NULL, &resp_create, NULL); +======= &credentials, NULL, NULL, &resp_create); +>>>>>>> 1.6 if (ret < 0) { PVFS_perror("create failed with errcode", ret); @@ -106,7 +110,7 @@ int main(int argc, char **argv) key.buffer_sz = strlen(key_s) + 1; val.buffer = val_s; val.buffer_sz = strlen(val_s) + 1; - ret = PVFS_sys_seteattr(resp_create.ref, &credentials, &key, &val, 0); + ret = PVFS_sys_seteattr(resp_create.ref, &credentials, &key, &val, 0, NULL); if (ret < 0) { PVFS_perror("seteattr failed with errcode", ret); @@ -120,7 +124,7 @@ int main(int argc, char **argv) printf("--geteattr--\n"); val.buffer_sz = strlen(val_s) + 10; val.buffer = malloc(val.buffer_sz); - ret = PVFS_sys_geteattr(resp_create.ref, &credentials, &key, &val); + ret = PVFS_sys_geteattr(resp_create.ref, &credentials, &key, &val, NULL); if (ret < 0) { PVFS_perror("geteattr failed with errcode", ret); Index: test/client/sysint/del-eattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/del-eattr.c,v retrieving revision 1.2 diff -u -a -p -r1.2 del-eattr.c --- test/client/sysint/del-eattr.c 21 Jul 2005 16:17:58 -0000 1.2 +++ test/client/sysint/del-eattr.c 15 Sep 2007 00:27:06 -0000 @@ -105,7 +105,7 @@ int pvfs2_deleattr (PVFS_ds_keyval key, memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -144,7 +144,7 @@ int pvfs2_deleattr (PVFS_ds_keyval key, ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -155,7 +155,7 @@ int pvfs2_deleattr (PVFS_ds_keyval key, /* gossip_set_debug_mask(1,0xffffffffffffffffUL); * gossip_enable_stderr(); */ - ret = PVFS_sys_deleattr(resp_lookup.ref, &credentials, &key); + ret = PVFS_sys_deleattr(resp_lookup.ref, &credentials, &key, NULL); if (ret < 0) { PVFS_perror("deleattr failed with errcode", ret); Index: test/client/sysint/dmkdir.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/dmkdir.c,v retrieving revision 1.14 diff -u -a -p -r1.14 dmkdir.c --- test/client/sysint/dmkdir.c 11 Nov 2005 21:31:12 -0000 1.14 +++ test/client/sysint/dmkdir.c 15 Sep 2007 00:27:06 -0000 @@ -86,7 +86,7 @@ int main(int argc,char **argv) attr.atime = attr.ctime = attr.mtime = time(NULL); ret = PVFS_sys_mkdir(entry_name, parent_refn, attr, - &credentials, &resp_mkdir); + &credentials, &resp_mkdir, NULL); if (ret < 0) { printf("mkdir failed\n"); @@ -98,7 +98,7 @@ int main(int argc,char **argv) printf("FSID:%d\n",parent_refn.fs_id); ret = PVFS_sys_mkdir(str_buf2, resp_mkdir.ref, attr, - &credentials, &resp_mkdir); + &credentials, &resp_mkdir, NULL); if (ret < 0) { printf("mkdir failed\n"); @@ -110,7 +110,7 @@ int main(int argc,char **argv) printf("FSID:%d\n",parent_refn.fs_id); ret = PVFS_sys_mkdir(str_buf3, resp_mkdir.ref, attr, - &credentials, &resp_mkdir); + &credentials, &resp_mkdir, NULL); if (ret < 0) { printf("mkdir failed\n"); Index: test/client/sysint/find.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/find.c,v retrieving revision 1.42 diff -u -a -p -r1.42 find.c --- test/client/sysint/find.c 17 May 2006 15:42:58 -0000 1.42 +++ test/client/sysint/find.c 15 Sep 2007 00:27:06 -0000 @@ -52,7 +52,7 @@ int is_directory(PVFS_handle handle, PVF PVFS_util_gen_credentials(&credentials); if (PVFS_sys_getattr(pinode_refn, attrmask, - &credentials, &getattr_response)) + &credentials, &getattr_response, NULL)) { fprintf(stderr,"Failed to get attributes on handle 0x%08llx " "(fs_id is %d)\n",llu(handle),fs_id); @@ -99,7 +99,7 @@ int directory_walk(PVFS_fs_id cur_fs, PVFS_util_gen_credentials(&credentials); if (PVFS_sys_lookup(cur_fs, name, &credentials, - &lk_response, PVFS2_LOOKUP_LINK_FOLLOW)) + &lk_response, PVFS2_LOOKUP_LINK_FOLLOW, NULL)) { fprintf(stderr,"Failed to lookup %s on fs_id %d!\n", name,cur_fs); @@ -119,7 +119,7 @@ int directory_walk(PVFS_fs_id cur_fs, if (PVFS_sys_readdir(pinode_refn, (!token ? PVFS_READDIR_START : token), pvfs_dirent_incount, - &credentials, &rd_response)) + &credentials, &rd_response, NULL)) { fprintf(stderr,"Failed to perform readdir operation\n"); return 1; Index: test/client/sysint/flush-1.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/flush-1.c,v retrieving revision 1.17 diff -u -a -p -r1.17 flush-1.c --- test/client/sysint/flush-1.c 6 Jul 2007 05:23:22 -0000 1.17 +++ test/client/sysint/flush-1.c 15 Sep 2007 00:27:06 -0000 @@ -80,7 +80,11 @@ int main(int argc, char **argv) parent_refn.fs_id = cur_fs; ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< flush-1.c + &credentials, NULL, &resp_create, NULL); +======= &credentials, NULL, NULL, &resp_create); +>>>>>>> 1.17 if (ret < 0) { printf("create failed with errcode = %d\n", ret); @@ -91,7 +95,7 @@ int main(int argc, char **argv) printf("--create--\n"); printf("Handle: %lld\n",lld(resp_create.ref.handle)); - ret = PVFS_sys_flush(resp_create.ref, &credentials); + ret = PVFS_sys_flush(resp_create.ref, &credentials, NULL); if (ret < 0) { PVFS_perror_gossip("flush failed", ret); Index: test/client/sysint/flush-2.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/flush-2.c,v retrieving revision 1.21 diff -u -a -p -r1.21 flush-2.c --- test/client/sysint/flush-2.c 6 Jul 2007 05:23:22 -0000 1.21 +++ test/client/sysint/flush-2.c 15 Sep 2007 00:27:06 -0000 @@ -99,7 +99,7 @@ int main( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); /* TODO: really we probably want to look for a specific error code, * like maybe ENOENT? */ @@ -111,7 +111,7 @@ int main( name = "/"; ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { fprintf(stderr, @@ -130,7 +130,11 @@ int main( entry_name = &(filename[1]); /* leave off slash */ ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< flush-2.c + &credentials, NULL, &resp_cr, NULL); +======= &credentials, NULL, NULL, &resp_cr); +>>>>>>> 1.21 if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_create() failure.\n"); @@ -168,7 +172,7 @@ int main( } ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_write() failure.\n"); @@ -185,7 +189,7 @@ int main( printf("IO-TEST: performing read on handle: %ld, fs: %d\n", (long) pinode_refn.handle, (int) pinode_refn.fs_id); ret = PVFS_sys_read(pinode_refn, file_req, 0, buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_read() failure.\n"); @@ -220,7 +224,7 @@ int main( } /* now that we've done some i/o, flush the data to disk */ - ret = PVFS_sys_flush(pinode_refn, &credentials); + ret = PVFS_sys_flush(pinode_refn, &credentials, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_flush() error.\n"); Index: test/client/sysint/get-eattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/get-eattr.c,v retrieving revision 1.2 diff -u -a -p -r1.2 get-eattr.c --- test/client/sysint/get-eattr.c 21 Jul 2005 16:17:58 -0000 1.2 +++ test/client/sysint/get-eattr.c 15 Sep 2007 00:27:06 -0000 @@ -118,7 +118,7 @@ int pvfs2_geteattr(int nkey, PVFS_ds_key memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -157,7 +157,7 @@ int pvfs2_geteattr(int nkey, PVFS_ds_key ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -167,7 +167,7 @@ int pvfs2_geteattr(int nkey, PVFS_ds_key /* get extended attribute */ resp_geteattr.val_array = val_p; ret = PVFS_sys_geteattr_list(resp_lookup.ref, - &credentials, nkey, key_p, &resp_geteattr); + &credentials, nkey, key_p, &resp_geteattr, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_geteattr failed with errcode", ret); Index: test/client/sysint/get-info.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/get-info.c,v retrieving revision 1.40 diff -u -a -p -r1.40 get-info.c --- test/client/sysint/get-info.c 11 Nov 2005 21:31:12 -0000 1.40 +++ test/client/sysint/get-info.c 15 Sep 2007 00:27:06 -0000 @@ -55,7 +55,7 @@ int main(int argc,char **argv) PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); @@ -73,7 +73,7 @@ int main(int argc,char **argv) pinode_refn.fs_id = fs_id; attrmask = PVFS_ATTR_SYS_ALL; - ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, resp_gattr); + ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, resp_gattr, NULL); if (ret < 0) { printf("getattr failed with errcode = %d\n", ret); Index: test/client/sysint/getparent.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/getparent.c,v retrieving revision 1.18 diff -u -a -p -r1.18 getparent.c --- test/client/sysint/getparent.c 11 Nov 2005 21:31:12 -0000 1.18 +++ test/client/sysint/getparent.c 15 Sep 2007 00:27:06 -0000 @@ -43,7 +43,7 @@ int main(int argc,char **argv) } PVFS_util_gen_credentials(&credentials); - ret = PVFS_sys_getparent(fs_id, argv[1], &credentials, &resp_getparent); + ret = PVFS_sys_getparent(fs_id, argv[1], &credentials, &resp_getparent, NULL); if (ret == 0) { printf("=== getparent data:\n"); Index: test/client/sysint/io-bug.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-bug.c,v retrieving revision 1.8 diff -u -a -p -r1.8 io-bug.c --- test/client/sysint/io-bug.c 6 Jul 2007 05:23:22 -0000 1.8 +++ test/client/sysint/io-bug.c 15 Sep 2007 00:27:06 -0000 @@ -104,7 +104,7 @@ int main( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW, NULL); /* TODO: really we probably want to look for a specific error code, * like maybe ENOENT? */ @@ -115,7 +115,7 @@ int main( /* get root handle */ name = "/"; ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { fprintf(stderr, @@ -136,7 +136,11 @@ int main( entry_name = &(filename[1]); /* leave off slash */ ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< io-bug.c + &credentials, NULL, &resp_cr, NULL); +======= &credentials, NULL, NULL, &resp_cr); +>>>>>>> 1.8 if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_create() failure.\n"); @@ -182,7 +186,7 @@ int main( off_array2, PVFS_BYTE, &file_req); ret = PVFS_sys_write(pinode_refn, file_req, 0, PVFS_BOTTOM, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_write() failure.\n"); Index: test/client/sysint/io-hole.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-hole.c,v retrieving revision 1.4 diff -u -a -p -r1.4 io-hole.c --- test/client/sysint/io-hole.c 6 Jul 2007 05:23:22 -0000 1.4 +++ test/client/sysint/io-hole.c 15 Sep 2007 00:27:06 -0000 @@ -65,7 +65,7 @@ int main(int argc, char **argv) PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret == -PVFS_ENOENT) { PVFS_sysresp_getparent gp_resp; @@ -73,7 +73,7 @@ int main(int argc, char **argv) printf("IO-HOLE: lookup failed; creating new file.\n"); memset(&gp_resp, 0, sizeof(PVFS_sysresp_getparent)); - ret = PVFS_sys_getparent(fs_id, name, &credentials, &gp_resp); + ret = PVFS_sys_getparent(fs_id, name, &credentials, &gp_resp, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_getparent failed", ret); @@ -93,7 +93,11 @@ int main(int argc, char **argv) assert(entry_name); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< io-hole.c + &credentials, NULL, &resp_cr, NULL); +======= &credentials, NULL, NULL, &resp_cr); +>>>>>>> 1.4 if (ret < 0) { PVFS_perror("PVFS_sys_create() failure", ret); @@ -124,7 +128,7 @@ int main(int argc, char **argv) memset(buf, 'A', MAX_BUF_LEN); ret = PVFS_sys_write(pinode_refn, file_req, 0, buf, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if ((ret < 0) || (resp_io.total_completed != MAX_BUF_LEN)) { PVFS_perror("PVFS_sys_write failure", ret); @@ -134,7 +138,7 @@ int main(int argc, char **argv) lld(resp_io.total_completed)); ret = PVFS_sys_write(pinode_refn, file_req, 100000, buf, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if ((ret < 0) || (resp_io.total_completed != MAX_BUF_LEN)) { PVFS_perror("PVFS_sys_write failure", ret); @@ -144,7 +148,7 @@ int main(int argc, char **argv) lld(resp_io.total_completed)); ret = PVFS_sys_read(pinode_refn, file_req, 10, buf, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if ((ret < 0) || (resp_io.total_completed != MAX_BUF_LEN)) { fprintf(stderr, "Failed to read %d bytes at offset 10! %lld " Index: test/client/sysint/io-stress.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-stress.c,v retrieving revision 1.3 diff -u -a -p -r1.3 io-stress.c --- test/client/sysint/io-stress.c 7 Dec 2006 21:47:22 -0000 1.3 +++ test/client/sysint/io-stress.c 15 Sep 2007 00:27:06 -0000 @@ -495,7 +495,7 @@ static int generic_open(file_object *obj (char *) obj->u.pvfs2.pvfs2_path, credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -506,7 +506,7 @@ static int generic_open(file_object *obj memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, - credentials, &resp_getattr); + credentials, &resp_getattr, NULL); if (ret) { fprintf(stderr, "Failed to do pvfs2 getattr on %s\n", @@ -555,7 +555,7 @@ static PVFS_error post_generic_read(io_r } ret = PVFS_isys_io(req->src->u.pvfs2.ref, req->file_req, req->offset, req->buffer, req->mem_req, &req->credentials, &req->resp_io, - PVFS_IO_READ, &req->op_id, req); + PVFS_IO_READ, &req->op_id, NULL, req); if (ret != 0) { PVFS_perror("PVFS_isys_io", ret); @@ -593,7 +593,7 @@ static PVFS_error post_generic_write(io_ } ret = PVFS_isys_io(req->src->u.pvfs2.ref, req->file_req, req->offset, req->buffer, req->mem_req, &req->credentials, &req->resp_io, - PVFS_IO_WRITE, &req->op_id, req); + PVFS_IO_WRITE, &req->op_id, NULL, req); if (ret != 0) { PVFS_perror("PVFS_isys_io", ret); Index: test/client/sysint/io-test-offset.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-test-offset.c,v retrieving revision 1.26 diff -u -a -p -r1.26 io-test-offset.c --- test/client/sysint/io-test-offset.c 6 Jul 2007 05:23:22 -0000 1.26 +++ test/client/sysint/io-test-offset.c 15 Sep 2007 00:27:06 -0000 @@ -104,7 +104,7 @@ int main( PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); /* TODO: really we probably want to look for a specific error code, * like maybe ENOENT? */ @@ -116,7 +116,7 @@ int main( name = "/"; ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { fprintf(stderr, @@ -136,7 +136,11 @@ int main( entry_name = &(filename[1]); /* leave off slash */ ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< io-test-offset.c + &credentials, NULL, &resp_cr, NULL); +======= &credentials, NULL, NULL, &resp_cr); +>>>>>>> 1.26 if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_create() failure.\n"); @@ -182,7 +186,7 @@ int main( } ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_write() failure.\n"); @@ -206,7 +210,7 @@ int main( printf("IO-TEST: performing read on handle: %ld, fs: %d\n", (long) pinode_refn.handle, (int) pinode_refn.fs_id); ret = PVFS_sys_read(pinode_refn, file_req, (5 * sizeof(int)), off_buffer, - mem_req2, &credentials, &resp_io); + mem_req2, &credentials, &resp_io, NULL); if (ret < 0) { fprintf(stderr, "Error: PVFS_sys_read() failure.\n"); Index: test/client/sysint/io-test.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-test.c,v retrieving revision 1.57 diff -u -a -p -r1.57 io-test.c --- test/client/sysint/io-test.c 6 Jul 2007 05:23:22 -0000 1.57 +++ test/client/sysint/io-test.c 15 Sep 2007 00:27:06 -0000 @@ -83,7 +83,7 @@ int main(int argc, char **argv) PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret == -PVFS_ENOENT) { PVFS_sysresp_getparent gp_resp; @@ -91,7 +91,7 @@ int main(int argc, char **argv) printf("IO-TEST: lookup failed; creating new file.\n"); memset(&gp_resp, 0, sizeof(PVFS_sysresp_getparent)); - ret = PVFS_sys_getparent(fs_id, name, &credentials, &gp_resp); + ret = PVFS_sys_getparent(fs_id, name, &credentials, &gp_resp, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_getparent failed", ret); @@ -111,7 +111,11 @@ int main(int argc, char **argv) assert(entry_name); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< io-test.c + &credentials, NULL, &resp_cr, NULL); +======= &credentials, NULL, NULL, &resp_cr); +>>>>>>> 1.57 if (ret < 0) { PVFS_perror("PVFS_sys_create() failure", ret); @@ -155,7 +159,7 @@ int main(int argc, char **argv) } ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_write failure", ret); @@ -173,7 +177,7 @@ int main(int argc, char **argv) (long) pinode_refn.handle, (int) pinode_refn.fs_id); ret = PVFS_sys_read(pinode_refn, file_req, 0, buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_read failure", ret); @@ -209,7 +213,7 @@ int main(int argc, char **argv) /* test out some of the mgmt functionality */ ret = PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL_NOSIZE, - &credentials, &resp_getattr); + &credentials, &resp_getattr, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_getattr", ret); @@ -227,7 +231,7 @@ int main(int argc, char **argv) } ret = PVFS_mgmt_get_dfile_array(pinode_refn, &credentials, - dfile_array, resp_getattr.attr.dfile_count); + dfile_array, resp_getattr.attr.dfile_count, NULL); if (ret < 0) { PVFS_perror("PVFS_mgmt_get_dfile_array", ret); Index: test/client/sysint/list-eattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/list-eattr.c,v retrieving revision 1.1 diff -u -a -p -r1.1 list-eattr.c --- test/client/sysint/list-eattr.c 27 Oct 2005 18:43:12 -0000 1.1 +++ test/client/sysint/list-eattr.c 15 Sep 2007 00:27:06 -0000 @@ -122,7 +122,7 @@ int pvfs2_listeattr(int nkey, PVFS_ds_ke memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -161,7 +161,7 @@ int pvfs2_listeattr(int nkey, PVFS_ds_ke ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -171,7 +171,7 @@ int pvfs2_listeattr(int nkey, PVFS_ds_ke /* list extended attribute */ resp_listeattr.key_array = key_p; ret = PVFS_sys_listeattr(resp_lookup.ref, - token, nkey, &credentials, &resp_listeattr); + token, nkey, &credentials, &resp_listeattr, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_listeattr failed with errcode", ret); Index: test/client/sysint/lookup.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/lookup.c,v retrieving revision 1.31 diff -u -a -p -r1.31 lookup.c --- test/client/sysint/lookup.c 11 Nov 2005 21:31:12 -0000 1.31 +++ test/client/sysint/lookup.c 15 Sep 2007 00:27:06 -0000 @@ -63,7 +63,7 @@ int main(int argc,char **argv) memset(&resp_lk,0,sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(fs_id, filename, &credentials, - &resp_lk, follow_link); + &resp_lk, follow_link, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); Index: test/client/sysint/ls.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/ls.c,v retrieving revision 1.34 diff -u -a -p -r1.34 ls.c --- test/client/sysint/ls.c 17 May 2006 15:42:58 -0000 1.34 +++ test/client/sysint/ls.c 15 Sep 2007 00:27:06 -0000 @@ -112,7 +112,7 @@ void print_entry( pinode_refn.fs_id = fs_id; if (PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL, - &credentials, &getattr_response)) + &credentials, &getattr_response, NULL)) { fprintf(stderr,"Failed to get attributes on handle 0x%08llx " "(fs_id is %d)\n",llu(handle),fs_id); @@ -144,7 +144,7 @@ int do_list( PVFS_util_gen_credentials(&credentials); if (PVFS_sys_lookup(fs_id, name, &credentials, - &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW)) + &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL)) { fprintf(stderr,"Failed to lookup %s on fs_id %d!\n", start_dir,fs_id); @@ -157,7 +157,7 @@ int do_list( PVFS_util_gen_credentials(&credentials); if (PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL, - &credentials, &getattr_response) == 0) + &credentials, &getattr_response, NULL) == 0) { if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) || (getattr_response.attr.objtype == PVFS_TYPE_SYMLINK)) @@ -175,7 +175,7 @@ int do_list( memset(&rd_response,0,sizeof(PVFS_sysresp_readdir)); if (PVFS_sys_readdir(pinode_refn, (!token ? PVFS_READDIR_START : token), - pvfs_dirent_incount, &credentials, &rd_response)) + pvfs_dirent_incount, &credentials, &rd_response, NULL)) { fprintf(stderr,"readdir failed\n"); return -1; Index: test/client/sysint/mkdir.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/mkdir.c,v retrieving revision 1.35 diff -u -a -p -r1.35 mkdir.c --- test/client/sysint/mkdir.c 11 Nov 2005 21:31:12 -0000 1.35 +++ test/client/sysint/mkdir.c 15 Sep 2007 00:27:06 -0000 @@ -80,7 +80,7 @@ int main(int argc,char **argv) time(NULL); ret = PVFS_sys_mkdir(entry_name, parent_refn, attr, - &credentials, &resp_mkdir); + &credentials, &resp_mkdir, NULL); if (ret < 0) { printf("mkdir failed\n"); Index: test/client/sysint/module.mk.in =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/module.mk.in,v retrieving revision 1.53 diff -u -a -p -r1.53 module.mk.in --- test/client/sysint/module.mk.in 13 Sep 2006 22:42:09 -0000 1.53 +++ test/client/sysint/module.mk.in 15 Sep 2007 00:27:06 -0000 @@ -14,6 +14,7 @@ TESTSRC += \ $(DIR)/ls.c \ $(DIR)/path-test.c\ $(DIR)/create.c\ + $(DIR)/create-hints.c\ $(DIR)/create-with-dist.c\ $(DIR)/symlink.c\ $(DIR)/flush-1.c\ @@ -37,7 +38,8 @@ TESTSRC += \ $(DIR)/list-eattr.c \ $(DIR)/test-accesses.c \ $(DIR)/test-hindexed-test.c \ - $(DIR)/io-stress.c + $(DIR)/pvfs2-ping-benchmark.c \ + $(DIR)/io-stress.c MODCFLAGS_$(DIR)/io-stress.c := -D_GNU_SOURCE -MODLDFLAGS_$(DIR) := -lrt +MODLDFLAGS_$(DIR) := -lrt \ No newline at end of file Index: test/client/sysint/readdir.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/readdir.c,v retrieving revision 1.37 diff -u -a -p -r1.37 readdir.c --- test/client/sysint/readdir.c 11 Nov 2005 21:31:12 -0000 1.37 +++ test/client/sysint/readdir.c 15 Sep 2007 00:27:06 -0000 @@ -56,7 +56,7 @@ int main(int argc,char **argv) name = starting_point; PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, name, &credentials, - &resp_look, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror_gossip("Lookup failed", ret); @@ -77,7 +77,7 @@ int main(int argc,char **argv) memset(&resp_readdir,0,sizeof(PVFS_sysresp_readdir)); ret = PVFS_sys_readdir(pinode_refn, (!token ? PVFS_READDIR_START : token), pvfs_dirent_incount, - &credentials, &resp_readdir); + &credentials, &resp_readdir, NULL); if (ret < 0) { PVFS_perror_gossip("readdir failed", ret); Index: test/client/sysint/remove.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/remove.c,v retrieving revision 1.26 diff -u -a -p -r1.26 remove.c --- test/client/sysint/remove.c 14 Jun 2004 21:48:44 -0000 1.26 +++ test/client/sysint/remove.c 15 Sep 2007 00:27:06 -0000 @@ -67,7 +67,7 @@ int main(int argc,char **argv) } parent_refn.fs_id = cur_fs; - ret = PVFS_sys_remove(entry_name, parent_refn, &credentials); + ret = PVFS_sys_remove(entry_name, parent_refn, &credentials, NULL); if (ret < 0) { PVFS_perror("remove failed ", ret); Index: test/client/sysint/rename.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/rename.c,v retrieving revision 1.24 diff -u -a -p -r1.24 rename.c --- test/client/sysint/rename.c 14 Jun 2004 21:48:44 -0000 1.24 +++ test/client/sysint/rename.c 15 Sep 2007 00:27:06 -0000 @@ -94,7 +94,7 @@ int main(int argc,char **argv) new_parent_refn.fs_id = cur_fs; ret = PVFS_sys_rename(old_entry, old_parent_refn, new_entry, - new_parent_refn, &credentials); + new_parent_refn, &credentials, NULL); if (ret < 0) { printf("rename failed with errcode = %d\n",ret); Index: test/client/sysint/set-eattr.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/set-eattr.c,v retrieving revision 1.3 diff -u -a -p -r1.3 set-eattr.c --- test/client/sysint/set-eattr.c 1 Aug 2005 22:49:52 -0000 1.3 +++ test/client/sysint/set-eattr.c 15 Sep 2007 00:27:06 -0000 @@ -110,7 +110,7 @@ int pvfs2_seteattr (int nkey, PVFS_ds_ke memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); ret = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { PVFS_perror("PVFS_sys_lookup", ret); @@ -149,7 +149,7 @@ int pvfs2_seteattr (int nkey, PVFS_ds_ke ret = PVFS_sys_ref_lookup(parent_ref.fs_id, str_buf, parent_ref, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret != 0) { fprintf(stderr, "Target '%s' does not exist!\n", str_buf); @@ -165,7 +165,7 @@ int pvfs2_seteattr (int nkey, PVFS_ds_ke (char *)val[k].buffer); } } - ret = PVFS_sys_seteattr_list(resp_lookup.ref, &credentials, nkey, key, val, 0); + ret = PVFS_sys_seteattr_list(resp_lookup.ref, &credentials, nkey, key, val, 0, NULL); if (ret < 0) { PVFS_perror("seteattr_list failed with errcode", ret); Index: test/client/sysint/set-info.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/set-info.c,v retrieving revision 1.27 diff -u -a -p -r1.27 set-info.c --- test/client/sysint/set-info.c 11 Nov 2005 21:31:12 -0000 1.27 +++ test/client/sysint/set-info.c 15 Sep 2007 00:27:06 -0000 @@ -53,7 +53,7 @@ int main(int argc, char **argv) printf("about to lookup %s\n", filename); ret = PVFS_sys_lookup(fs_id, filename, &credentials, - &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (ret < 0) { fprintf(stderr, "Lookup failed with errcode = %d\n", ret); @@ -66,7 +66,7 @@ int main(int argc, char **argv) printf("about to getattr on %s\n", filename); ret = PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL_SETABLE, - &credentials, &resp_getattr); + &credentials, &resp_getattr, NULL); if (ret < 0) { printf("getattr failed with errcode = %d\n", ret); @@ -103,7 +103,7 @@ int main(int argc, char **argv) printf("about to setattr on %s\n", filename); - ret = PVFS_sys_setattr(pinode_refn, resp_getattr.attr, &credentials); + ret = PVFS_sys_setattr(pinode_refn, resp_getattr.attr, &credentials, NULL); if (ret < 0) { fprintf(stderr, "setattr failed with errcode = %d\n", ret); Index: test/client/sysint/symlink.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/symlink.c,v retrieving revision 1.16 diff -u -a -p -r1.16 symlink.c --- test/client/sysint/symlink.c 11 Nov 2005 21:31:12 -0000 1.16 +++ test/client/sysint/symlink.c 15 Sep 2007 00:27:06 -0000 @@ -81,7 +81,7 @@ int main(int argc, char **argv) parent_refn.fs_id = cur_fs; ret = PVFS_sys_symlink(entry_name, parent_refn, target, - attr, &credentials, &resp_sym); + attr, &credentials, &resp_sym, NULL); if (ret < 0) { printf("symlink failed with errcode = %d\n", ret); Index: test/client/sysint/test-accesses.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/test-accesses.c,v retrieving revision 1.5 diff -u -a -p -r1.5 test-accesses.c --- test/client/sysint/test-accesses.c 6 Jul 2007 05:23:22 -0000 1.5 +++ test/client/sysint/test-accesses.c 15 Sep 2007 00:27:06 -0000 @@ -71,7 +71,7 @@ int main(int argc, char * argv[]) ret = PVFS_util_get_default_fsid(&curfs); if(ret < 0) goto error; - ret = PVFS_sys_lookup(curfs, "/", &creds, &lookup_resp, 0); + ret = PVFS_sys_lookup(curfs, "/", &creds, &lookup_resp, 0, NULL); if(ret < 0) goto error; PVFS_util_gen_credentials(&creds); @@ -84,7 +84,11 @@ int main(int argc, char * argv[]) ret = PVFS_sys_create( (char*)filename, +<<<<<<< test-accesses.c + lookup_resp.ref, attr, &creds, NULL, &create_resp, NULL); +======= lookup_resp.ref, attr, &creds, NULL, NULL, &create_resp); +>>>>>>> 1.5 if(ret < 0) goto error; for(; i < count; ++i) @@ -122,7 +126,7 @@ int main(int argc, char * argv[]) ret = PVFS_sys_io( create_resp.ref, file_req, offset, membuff, mem_req, - &creds, &io_resp, PVFS_IO_WRITE); + &creds, &io_resp, PVFS_IO_WRITE, NULL); if(ret < 0) goto error; printf("Write response: size: %llu\n", llu(io_resp.total_completed)); @@ -141,7 +145,7 @@ error: PVFS_sys_remove( (char*)filename, lookup_resp.ref, - &creds); + &creds, NULL); PVFS_perror_gossip(errormsg, ret); fprintf(stderr, "%s\n", errormsg); Index: test/client/sysint/test-create-scale.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/test-create-scale.c,v retrieving revision 1.6 diff -u -a -p -r1.6 test-create-scale.c --- test/client/sysint/test-create-scale.c 6 Jul 2007 05:23:22 -0000 1.6 +++ test/client/sysint/test-create-scale.c 15 Sep 2007 00:27:06 -0000 @@ -119,13 +119,17 @@ int main(int argc, char **argv) /* do one big one to prime connections if needed */ sprintf(entry_name, "%s%d", str_buf, 0); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< test-create-scale.c + &credentials, NULL, &resp_create, NULL); +======= &credentials, NULL, NULL, &resp_create); +>>>>>>> 1.6 if (ret < 0) { PVFS_perror("PVFS_sys_create", ret); return(-1); } - ret = PVFS_sys_remove(entry_name, parent_refn, &credentials); + ret = PVFS_sys_remove(entry_name, parent_refn, &credentials, NULL); if(ret < 0) { PVFS_perror("PVFS_sys_remove", ret); @@ -140,7 +144,11 @@ int main(int argc, char **argv) attr.dfile_count = i+1; start_time = Wtime(); ret = PVFS_sys_create(entry_name, parent_refn, attr, +<<<<<<< test-create-scale.c + &credentials, NULL, &resp_create, NULL); +======= &credentials, NULL, NULL, &resp_create); +>>>>>>> 1.6 end_time = Wtime(); if (ret < 0) { @@ -153,7 +161,7 @@ int main(int argc, char **argv) for(j=0; j>>>>>> 1.4 if (ret < 0) { PVFS_perror("PVFS_sys_create", ret); @@ -333,7 +337,8 @@ int main(int argc, char **argv) /* write out the data */ ret = PVFS_sys_write(ref, file_req, 0, frame.wr_buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io + , NULL); if(ret < 0) { PVFS_perror("PVFS_sys_write", ret); @@ -370,7 +375,7 @@ int main(int argc, char **argv) printf("********************************************************\n\n"); ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, - &credentials, &resp_getattr); + &credentials, &resp_getattr, NULL); if (ret < 0) { PVFS_perror("Getattr failed", ret); @@ -413,7 +418,8 @@ int main(int argc, char **argv) /* read back the data */ ret = PVFS_sys_read(ref, file_req, 0, frame.rd_buffer, mem_req, - &credentials, &resp_io); + &credentials, &resp_io, + NULL); if(ret < 0) { PVFS_perror("PVFS_sys_read", ret); Index: test/client/sysint/test-pint-bucket.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/test-pint-bucket.c,v retrieving revision 1.37 diff -u -a -p -r1.37 test-pint-bucket.c --- test/client/sysint/test-pint-bucket.c 18 Aug 2006 14:55:57 -0000 1.37 +++ test/client/sysint/test-pint-bucket.c 15 Sep 2007 00:27:06 -0000 @@ -94,7 +94,7 @@ int main(int argc, char **argv) memset(&server_config,0,sizeof(struct server_configuration_s)); for(i=0; imntent_count; i++) { - if (PINT_server_get_config(&server_config, &(tab->mntent_array[i]))) + if (PINT_server_get_config(&server_config, &(tab->mntent_array[i]), NULL)) { fprintf(stderr, "PINT_server_get_config failure.\n"); return(-1); Index: test/client/sysint/truncate.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/client/sysint/truncate.c,v retrieving revision 1.26 diff -u -a -p -r1.26 truncate.c --- test/client/sysint/truncate.c 11 Nov 2005 21:31:12 -0000 1.26 +++ test/client/sysint/truncate.c 15 Sep 2007 00:27:06 -0000 @@ -53,7 +53,7 @@ int main(int argc,char **argv) /* lookup the root handle */ printf("looking up the root handle for fsid = %d\n", fs_id); ret = PVFS_sys_lookup(fs_id, "/", &credentials, - &resp_look, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_look, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); @@ -64,7 +64,7 @@ int main(int argc,char **argv) PVFS_util_gen_credentials(&credentials); ret = PVFS_sys_lookup(fs_id, filename, &credentials, - &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW); + &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { printf("Lookup failed with errcode = %d\n", ret); @@ -76,7 +76,7 @@ int main(int argc,char **argv) pinode_refn.handle = resp_lk.ref.handle; pinode_refn.fs_id = resp_lk.ref.fs_id; - ret = PVFS_sys_truncate(pinode_refn, size, &credentials); + ret = PVFS_sys_truncate(pinode_refn, size, &credentials, NULL); if (ret < 0) { printf("truncate failed with errcode = %d\n",ret); Index: test/common/misc/module.mk.in =================================================================== RCS file: /projects/cvsroot/pvfs2/test/common/misc/module.mk.in,v retrieving revision 1.6 diff -u -a -p -r1.6 module.mk.in --- test/common/misc/module.mk.in 13 Sep 2006 22:42:11 -0000 1.6 +++ test/common/misc/module.mk.in 15 Sep 2007 00:27:06 -0000 @@ -4,4 +4,5 @@ TESTSRC += \ $(DIR)/test-event-parser.c \ $(DIR)/test-event-summary.c \ $(DIR)/test-tcache.c \ - $(DIR)/test-perf-counter.c + $(DIR)/test-hint.c \ + $(DIR)/test-perf-counter.c \ No newline at end of file Index: test/io/description/test-zero-fill.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/io/description/test-zero-fill.c,v retrieving revision 1.4 diff -u -a -p -r1.4 test-zero-fill.c --- test/io/description/test-zero-fill.c 6 Jul 2007 05:23:24 -0000 1.4 +++ test/io/description/test-zero-fill.c 15 Sep 2007 00:27:06 -0000 @@ -209,7 +209,7 @@ int do_smallmem_noncontig_read( reset_buff(); res = PVFS_sys_read( - ref, readreq, 0, buff, memreq, creds, &io_resp); + ref, readreq, 0, buff, memreq, creds, &io_resp, NULL); if(res < 0) { PVFS_perror("read failed with errcode", res); @@ -284,7 +284,7 @@ int do_noncontig_read( reset_buff(); res = PVFS_sys_read( - ref, readreq, 0, buff, memreq, creds, &io_resp); + ref, readreq, 0, buff, memreq, creds, &io_resp, NULL); if(res < 0) { PVFS_perror("read failed with errcode", res); @@ -348,7 +348,7 @@ int do_contig_read( reset_buff(); res = PVFS_sys_read( - ref, readreq, offset, buff, memreq, creds, &io_resp); + ref, readreq, offset, buff, memreq, creds, &io_resp, NULL); if(res < 0) { PVFS_perror("read failed with errcode", res); @@ -402,7 +402,7 @@ int do_write(PVFS_object_ref ref, PVFS_c res = PVFS_sys_write( ref, filereq, - offset, buff, memreq, creds, &io_resp); + offset, buff, memreq, creds, &io_resp, NULL); if(res < 0) { PVFS_perror("write failed with errcode", res); @@ -502,7 +502,7 @@ int main(int argc, char * argv[]) before_len, dashes, after_len, dashes); } - res = PVFS_sys_lookup(curfs, "/", &creds, &lookup_resp, 0); + res = PVFS_sys_lookup(curfs, "/", &creds, &lookup_resp, 0, NULL); if(res < 0) { PVFS_perror("lookup failed with errcode", res); @@ -533,7 +533,11 @@ int main(int argc, char * argv[]) } res = PVFS_sys_create( +<<<<<<< test-zero-fill.c + zerofill_fname, lookup_resp.ref, attr, &creds, dist, &create_resp, NULL); +======= zerofill_fname, lookup_resp.ref, attr, &creds, dist, NULL, &create_resp); +>>>>>>> 1.4 if(res < 0) { PVFS_perror("create failed with errcode", res); @@ -796,7 +800,7 @@ int main(int argc, char * argv[]) PVFS_sys_remove( zerofill_fname, lookup_resp.ref, - &creds); + &creds, NULL); exit: Index: test/shared/test-common.c =================================================================== RCS file: /projects/cvsroot/pvfs2/test/shared/test-common.c,v retrieving revision 1.8 diff -u -a -p -r1.8 test-common.c --- test/shared/test-common.c 6 Jul 2007 05:23:24 -0000 1.8 +++ test/shared/test-common.c 15 Sep 2007 00:27:06 -0000 @@ -339,7 +339,7 @@ int stat_file( szPvfsPath, &credentials, &lk_response, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); } else { @@ -347,7 +347,7 @@ int stat_file( szPvfsPath, &credentials, &lk_response, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); } if(ret < 0) @@ -362,7 +362,7 @@ int stat_file( ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, &credentials, - &getattr_response); + &getattr_response, NULL); if(ret < 0) { @@ -1001,7 +1001,7 @@ int pvfs2_open( szPvfsPath, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); } else { @@ -1009,7 +1009,7 @@ int pvfs2_open( szPvfsPath, &credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_NO_FOLLOW); + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); } if( (ret < 0) && @@ -1090,7 +1090,7 @@ int pvfs2_create_file(const char parentDirectory, (PVFS_credentials *) credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { @@ -1115,8 +1115,12 @@ int pvfs2_create_file(const char attr, (PVFS_credentials *) credentials, NULL, /* Accept default distribution for fs */ +<<<<<<< test-common.c + &resp_create, NULL); +======= NULL, &resp_create); +>>>>>>> 1.8 if (ret < 0) { @@ -1174,7 +1178,7 @@ int lookup_parent(char * fil szSegment, credentials, &resp_look, - PVFS2_LOOKUP_LINK_FOLLOW); + PVFS2_LOOKUP_LINK_FOLLOW, NULL); if (ret < 0) { if(verbose) @@ -1548,4 +1552,3 @@ void display_common_usage(char* exeName) * * vim: ts=8 sts=4 sw=4 expandtab */ -