[PVFS2-CVS]
commit by slang in pvfs2/src/io/trove/trove-dbpf: dbpf-attr-cache.c
dbpf-bstream.c dbpf-dspace.c dbpf-keyval.c dbpf-mgmt.c
dbpf-open-cache.c dbpf.h
CVS commit program
cvs at parl.clemson.edu
Fri Nov 11 17:19:08 EST 2005
Update of /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf
In directory parlweb:/tmp/cvs-serv2348/src/io/trove/trove-dbpf
Modified Files:
Tag: slang-sio-branch
dbpf-attr-cache.c dbpf-bstream.c dbpf-dspace.c dbpf-keyval.c
dbpf-mgmt.c dbpf-open-cache.c dbpf.h
Log Message:
fixes to small io stuff to get test-zero-fill working again. Also committing updates from HEAD to make things easier for merge.
Index: dbpf-attr-cache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-attr-cache.c,v
diff -p -u -r1.17 -r1.17.2.1
--- dbpf-attr-cache.c 29 Sep 2005 19:23:14 -0000 1.17
+++ dbpf-attr-cache.c 11 Nov 2005 22:19:08 -0000 1.17.2.1
@@ -10,6 +10,7 @@
#include "dbpf-attr-cache.h"
#include "gen-locks.h"
#include "str-utils.h"
+#include "pvfs2-internal.h"
/* public mutex lock */
gen_mutex_t dbpf_attr_cache_mutex = GEN_MUTEX_INITIALIZER;
@@ -195,8 +196,8 @@ dbpf_attr_cache_elem_t *dbpf_attr_cache_
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG,
"dbpf_cache_elem_lookup: cache "
- "elem matching %Lu returned (num_elems=%d)\n",
- Lu(key.handle), s_current_num_cache_elems);
+ "elem matching %llu returned (num_elems=%d)\n",
+ llu(key.handle), s_current_num_cache_elems);
}
}
return cache_elem;
@@ -216,8 +217,8 @@ int dbpf_attr_cache_ds_attr_update_cache
memcpy(&cache_elem->attr, src_ds_attr,
sizeof(TROVE_ds_attributes));
gossip_debug(GOSSIP_DBPF_ATTRCACHE_DEBUG, "Updating "
- "cached attributes for key %Lu\n",
- Lu(key.handle));
+ "cached attributes for key %llu\n",
+ llu(key.handle));
ret = 0;
}
}
@@ -237,8 +238,8 @@ int dbpf_attr_cache_ds_attr_update_cache
{
cache_elem->attr.k_size = k_size;
gossip_debug(GOSSIP_DBPF_ATTRCACHE_DEBUG, "Updating "
- "cached k_size for key %Lu\n",
- Lu(key.handle));
+ "cached k_size for key %llu\n",
+ llu(key.handle));
ret = 0;
}
}
@@ -258,8 +259,8 @@ int dbpf_attr_cache_ds_attr_update_cache
{
cache_elem->attr.b_size = b_size;
gossip_debug(GOSSIP_DBPF_ATTRCACHE_DEBUG, "Updating "
- "cached b_size for key %Lu\n",
- Lu(key.handle));
+ "cached b_size for key %llu\n",
+ llu(key.handle));
ret = 0;
}
}
@@ -304,9 +305,9 @@ dbpf_keyval_pair_cache_elem_t *dbpf_attr
{
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG, "Returning data %p "
- "based on key %Lu and key_str %s (data_sz=%d)\n",
+ "based on key %llu and key_str %s (data_sz=%d)\n",
cache_elem->keyval_pairs[i].data,
- Lu(cache_elem->key.handle), key,
+ llu(cache_elem->key.handle), key,
cache_elem->keyval_pairs[i].data_sz);
return &cache_elem->keyval_pairs[i];
}
@@ -335,8 +336,8 @@ int dbpf_attr_cache_elem_set_data_based_
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG,
"Setting data %p based on key "
- "%Lu and key_str %s (data_sz=%d)\n", data,
- Lu(key.handle), key_str, data_sz);
+ "%llu and key_str %s (data_sz=%d)\n", data,
+ llu(key.handle), key_str, data_sz);
if (cache_elem->keyval_pairs[i].data)
{
@@ -425,8 +426,8 @@ int dbpf_attr_cache_insert(
assert(sacrificial_lamb_key.handle != TROVE_HANDLE_NULL);
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG, "*** Cache is full -- "
- "removing key %Lu to insert key %Lu\n",
- Lu(sacrificial_lamb_key.handle), Lu(key.handle));
+ "removing key %llu to insert key %llu\n",
+ llu(sacrificial_lamb_key.handle), llu(key.handle));
dbpf_attr_cache_remove(sacrificial_lamb_key);
}
@@ -473,10 +474,10 @@ int dbpf_attr_cache_insert(
s_current_num_cache_elems++;
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG,
- "dbpf_attr_cache_insert: inserting %Lu "
- "(k_size is %Lu | b_size is %Lu)\n", Lu(key.handle),
- Lu(cache_elem->attr.k_size),
- Lu(cache_elem->attr.b_size));
+ "dbpf_attr_cache_insert: inserting %llu "
+ "(k_size is %llu | b_size is %llu)\n", llu(key.handle),
+ llu(cache_elem->attr.k_size),
+ llu(cache_elem->attr.b_size));
}
ret = 0;
}
@@ -501,7 +502,7 @@ int dbpf_attr_cache_remove(TROVE_object_
gossip_debug(
GOSSIP_DBPF_ATTRCACHE_DEBUG, "dbpf_attr_cache_remove: "
- "removing %Lu\n", Lu(key.handle));
+ "removing %llu\n", llu(key.handle));
/* free any keyval data cached as well */
if (s_cacheable_keyword_array)
Index: dbpf-bstream.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c,v
diff -p -u -r1.56.2.1 -r1.56.2.2
--- dbpf-bstream.c 4 Nov 2005 07:14:20 -0000 1.56.2.1
+++ dbpf-bstream.c 11 Nov 2005 22:19:08 -0000 1.56.2.2
@@ -9,7 +9,10 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include <assert.h>
#include <errno.h>
@@ -65,6 +68,7 @@ static int dbpf_bstream_resize_op_svc(st
#ifdef __PVFS2_TROVE_AIO_THREADED__
#include "dbpf-thread.h"
+#include "pvfs2-internal.h"
extern pthread_cond_t dbpf_op_completed_cond;
extern dbpf_op_queue_p dbpf_completion_queue_array[TROVE_MAX_CONTEXTS];
@@ -86,7 +90,7 @@ static void aio_progress_notification(si
gossip_debug(
GOSSIP_TROVE_DEBUG," --- aio_progress_notification called "
- "with handle %Lu\n", Lu(op_p->handle));
+ "with handle %llu\n", llu(op_p->handle));
aiocb_p = op_p->u.b_rw_list.aiocb_array;
assert(aiocb_p);
@@ -123,7 +127,7 @@ static void aio_progress_notification(si
(op_p->type == BSTREAM_WRITE_AT) ?
"WRITE" : "READ"), ret, op_p->u.b_rw_list.fd);
- *(op_p->u.b_rw_list.out_size_p) = ret;
+ *(op_p->u.b_rw_list.out_size_p) += ret;
/* mark as a NOP so we ignore it from now on */
aiocb_p[i].aio_lio_opcode = LIO_NOP;
@@ -299,8 +303,8 @@ static void start_delayed_ops_if_any(int
s_dbpf_ios_in_progress++;
gossip_debug(GOSSIP_TROVE_DEBUG, "%s: lio_listio posted %p "
- "(handle %Lu, ret %d))\n", __func__, cur_op,
- Lu(cur_op->op.handle), ret);
+ "(handle %llu, ret %d))\n", __func__, cur_op,
+ llu(cur_op->op.handle), ret);
#ifndef __PVFS2_TROVE_AIO_THREADED__
/*
@@ -375,8 +379,8 @@ static int issue_or_delay_io_operation(
return -trove_errno_to_trove_error(errno);
}
gossip_debug(GOSSIP_TROVE_DEBUG, "%s: lio_listio posted %p "
- "(handle %Lu, ret %d)\n", __func__, cur_op,
- Lu(cur_op->op.handle), ret);
+ "(handle %llu, ret %d)\n", __func__, cur_op,
+ llu(cur_op->op.handle), ret);
}
return 0;
}
@@ -699,9 +703,9 @@ static int dbpf_bstream_resize_op_svc(st
goto return_error;
}
- gossip_debug(GOSSIP_TROVE_DEBUG, " RESIZED bstream %Lu [fd = %d] "
- "to %Ld \n", Lu(op_p->handle), tmp_ref.fd,
- Ld(op_p->u.b_resize.size));
+ gossip_debug(GOSSIP_TROVE_DEBUG, " RESIZED bstream %llu [fd = %d] "
+ "to %lld \n", llu(op_p->handle), tmp_ref.fd,
+ lld(op_p->u.b_resize.size));
dbpf_open_cache_put(&tmp_ref);
@@ -877,6 +881,9 @@ static inline int dbpf_bstream_rw_list(T
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;
+
+ /* initialize the out size to 0 */
+ *out_size_p = 0;
q_op_p->op.u.b_rw_list.out_size_p = out_size_p;
q_op_p->op.u.b_rw_list.aiocb_array_count = 0;
q_op_p->op.u.b_rw_list.aiocb_array = NULL;
@@ -1119,7 +1126,7 @@ static int dbpf_bstream_rw_list_op_svc(s
/* we need to set the out size for the caller of write_list or
* read_list
*/
- *(op_p->u.b_rw_list.out_size_p) = ret;
+ *(op_p->u.b_rw_list.out_size_p) += ret;
/* mark as a NOP so we ignore it from now on */
aiocb_p[i].aio_lio_opcode = LIO_NOP;
Index: dbpf-dspace.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-dspace.c,v
diff -p -u -r1.124.2.1 -r1.124.2.2
--- dbpf-dspace.c 4 Nov 2005 07:14:21 -0000 1.124.2.1
+++ dbpf-dspace.c 11 Nov 2005 22:19:08 -0000 1.124.2.2
@@ -10,7 +10,10 @@
#include <string.h>
#include <db.h>
#include <time.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include <assert.h>
#include "gossip.h"
@@ -29,6 +32,7 @@
#ifdef __PVFS2_TROVE_THREADED__
#include <pthread.h>
#include "dbpf-thread.h"
+#include "pvfs2-internal.h"
extern gen_mutex_t dbpf_attr_cache_mutex;
extern pthread_cond_t dbpf_op_completed_cond;
@@ -190,7 +194,7 @@ static int dbpf_dspace_create_op_svc(str
new_handle = cur_extent.first;
trove_handle_set_used(op_p->coll_p->coll_id, new_handle);
gossip_debug(GOSSIP_TROVE_DEBUG, "new_handle was FORCED "
- "to be %Lu\n", Lu(new_handle));
+ "to be %llu\n", llu(new_handle));
}
else if (cur_extent.first == TROVE_HANDLE_NULL)
{
@@ -211,11 +215,11 @@ static int dbpf_dspace_create_op_svc(str
op_p->coll_p->coll_id, &op_p->u.d_create.extent_array);
}
- gossip_debug(GOSSIP_TROVE_DEBUG, "[%d extents] -- new_handle is %Lu "
- "(cur_extent is %Lu - %Lu)\n",
+ gossip_debug(GOSSIP_TROVE_DEBUG, "[%d extents] -- new_handle is %llu "
+ "(cur_extent is %llu - %llu)\n",
op_p->u.d_create.extent_array.extent_count,
- Lu(new_handle), Lu(cur_extent.first),
- Lu(cur_extent.last));
+ llu(new_handle), llu(cur_extent.first),
+ llu(cur_extent.last));
/*
if we got a zero handle, we're either completely out of handles
-- or else something terrible has happened
@@ -360,7 +364,7 @@ static int dbpf_dspace_remove_op_svc(str
goto return_error;
case 0:
gossip_debug(GOSSIP_TROVE_DEBUG, "removed dataspace with "
- "handle %Lu\n", Lu(op_p->handle));
+ "handle %llu\n", llu(op_p->handle));
break;
}
@@ -507,8 +511,8 @@ static int dbpf_dspace_iterate_handles_o
else if (ret != 0)
{
ret = -dbpf_db_error_to_trove_error(ret);
- gossip_err("failed to set cursor position at %Lu\n",
- Lu(dummy_handle));
+ gossip_err("failed to set cursor position at %llu\n",
+ llu(dummy_handle));
goto return_error;
}
}
@@ -718,17 +722,17 @@ static int dbpf_dspace_getattr(TROVE_col
#if 0
gossip_debug(
GOSSIP_TROVE_DEBUG, "ATTRIB: retrieved "
- "attributes from CACHE for key %Lu\n uid = %d, mode = %d, "
+ "attributes from CACHE for key %llu\n uid = %d, mode = %d, "
"type = %d, dfile_count = %d, dist_size = %d\n",
- Lu(handle), (int)ds_attr_p->uid, (int)ds_attr_p->mode,
+ llu(handle), (int)ds_attr_p->uid, (int)ds_attr_p->mode,
(int)ds_attr_p->type, (int)ds_attr_p->dfile_count,
(int)ds_attr_p->dist_size);
#endif
gossip_debug(GOSSIP_DBPF_ATTRCACHE_DEBUG, "dspace_getattr fast "
- "path attr cache hit on %Lu\n (dfile_count=%d | "
- "dist_size=%d | data_size=%Ld)\n", Lu(handle),
+ "path attr cache hit on %llu\n (dfile_count=%d | "
+ "dist_size=%d | data_size=%lld)\n", llu(handle),
ds_attr_p->dfile_count, ds_attr_p->dist_size,
- Ld(ds_attr_p->b_size));
+ lld(ds_attr_p->b_size));
UPDATE_PERF_METADATA_READ();
gen_mutex_unlock(&dbpf_attr_cache_mutex);
@@ -833,9 +837,9 @@ static int dbpf_dspace_setattr_op_svc(st
#if 0
gossip_debug(GOSSIP_TROVE_DEBUG, "ATTRIB: dspace_setattr storing "
- "attributes (2) on key %Lu\n uid = %d, mode = %d, "
+ "attributes (2) on key %llu\n uid = %d, mode = %d, "
"type = %d, dfile_count = %d, dist_size = %d\n",
- Lu(op_p->handle), (int) s_attr.uid, (int) s_attr.mode,
+ llu(op_p->handle), (int) s_attr.uid, (int) s_attr.mode,
(int) s_attr.type, (int) s_attr.dfile_count,
(int) s_attr.dist_size);
#endif
@@ -934,8 +938,8 @@ static int dbpf_dspace_getattr_op_svc(st
}
else
{
- gossip_err("Error: unable to stat handle %Lu (%Lx).\n",
- Lu(op_p->handle), Lu(op_p->handle));
+ gossip_err("Error: unable to stat handle %llu (%llx).\n",
+ llu(op_p->handle), llu(op_p->handle));
ret = -TROVE_EIO;
goto return_error;
}
@@ -968,11 +972,11 @@ static int dbpf_dspace_getattr_op_svc(st
gossip_debug(
GOSSIP_TROVE_DEBUG, "ATTRIB: retrieved attributes "
- "from DISK for key %Lu\n\tuid = %d, mode = %d, type = %d, "
- "dfile_count = %d, dist_size = %d\n\tb_size = %Ld, k_size = %Ld\n",
- Lu(op_p->handle), (int)s_attr.uid, (int)s_attr.mode,
+ "from DISK for key %llu\n\tuid = %d, mode = %d, type = %d, "
+ "dfile_count = %d, dist_size = %d\n\tb_size = %lld, k_size = %lld\n",
+ llu(op_p->handle), (int)s_attr.uid, (int)s_attr.mode,
(int)s_attr.type, (int)s_attr.dfile_count, (int)s_attr.dist_size,
- Lu(b_size), Lu(k_size));
+ llu(b_size), llu(k_size));
attr = op_p->u.d_getattr.attr_p;
trove_ds_stored_to_attr(s_attr, *attr, b_size, k_size);
@@ -1013,7 +1017,7 @@ static int dbpf_dspace_cancel(
#endif
gossip_debug(GOSSIP_TROVE_DEBUG, "dbpf_dspace_cancel called for "
- "id %Lu.\n", Lu(id));
+ "id %llu.\n", llu(id));
#ifdef __PVFS2_TROVE_THREADED__
Index: dbpf-keyval.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-keyval.c,v
diff -p -u -r1.53 -r1.53.2.1
--- dbpf-keyval.c 27 Oct 2005 18:43:08 -0000 1.53
+++ dbpf-keyval.c 11 Nov 2005 22:19:08 -0000 1.53.2.1
@@ -23,7 +23,10 @@
#include <string.h>
#include <db.h>
#include <time.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include "trove.h"
#include "trove-internal.h"
@@ -31,6 +34,7 @@
#include "dbpf-op-queue.h"
#include "dbpf-attr-cache.h"
#include "gossip.h"
+#include "pvfs2-internal.h"
extern gen_mutex_t dbpf_attr_cache_mutex;
@@ -144,8 +148,8 @@ static int dbpf_keyval_read_op_svc(struc
if (ret != 0)
{
gossip_debug(GOSSIP_TROVE_DEBUG,
- "warning: keyval read error on handle %Lu and "
- "key=%s (%s)\n", Lu(op_p->handle),
+ "warning: keyval read error on handle %llu and "
+ "key=%s (%s)\n", llu(op_p->handle),
(char *)key.data, db_strerror(ret));
/* if data buffer is too small returns a memory error */
Index: dbpf-mgmt.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-mgmt.c,v
diff -p -u -r1.63 -r1.63.2.1
--- dbpf-mgmt.c 18 Oct 2005 18:37:28 -0000 1.63
+++ dbpf-mgmt.c 11 Nov 2005 22:19:08 -0000 1.63.2.1
@@ -15,10 +15,44 @@
#include <string.h>
#include <db.h>
#include <time.h>
+#include <stdlib.h>
+#include "trove.h"
+
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
+
+#ifdef HAVE_SYS_VFS_H
+
+#include <sys/vfs.h>
+#define PINT_statfs_t struct statfs
+#define PINT_statfs_lookup(_path, _statfs) statfs(_path, (_statfs))
+#define PINT_statfs_bsize(_statfs) (_statfs)->f_bsize
+#define PINT_statfs_bavail(_statfs) (_statfs)->f_bavail
+#define PINT_statfs_bfree(_statfs) (_statfs)->f_bfree
+#define PINT_statfs_blocks(_statfs) (_statfs)->f_blocks
+
+#elif HAVE_SYS_MOUNT_H
+
+#include <sys/param.h>
+#include <sys/mount.h>
+
+#define PINT_statfs_t struct statfs
+#define PINT_statfs_lookup(_path, _statfs) statfs(_path, (_statfs))
+#define PINT_statfs_bsize(_statfs) (_statfs)->f_iosize
+#define PINT_statfs_bavail(_statfs) (_statfs)->f_bavail
+#define PINT_statfs_bfree(_statfs) (_statfs)->f_bfree
+#define PINT_statfs_blocks(_statfs) (_statfs)->f_blocks
+
+#else
+
+#error OS does not have sys/vfs.h or sys/mount.h.
+#error Cant stat mounted filesystems
+
+#endif
+
#include <errno.h>
#include <limits.h>
-#include <sys/vfs.h>
#include <dirent.h>
#include "trove.h"
@@ -95,11 +129,11 @@ static int dbpf_collection_getinfo(TROVE
case PVFS_COLLECTION_STATFS:
{
char path_name[PATH_MAX] = {0};
- struct statfs tmp_statfs;
+ PINT_statfs_t tmp_statfs;
TROVE_statfs *tmp_trove_statfs = (TROVE_statfs *)parameter;
DBPF_GET_STORAGE_DIRNAME(path_name, PATH_MAX, sto_p->name);
- ret = statfs(path_name, &tmp_statfs);
+ ret = PINT_statfs_lookup(path_name, &tmp_statfs);
if (ret < 0)
{
ret = -trove_errno_to_trove_error(errno);
@@ -113,11 +147,13 @@ static int dbpf_collection_getinfo(TROVE
both so that the client can properly compute all values.
*/
tmp_trove_statfs->bytes_available =
- (tmp_statfs.f_bsize * tmp_statfs.f_bavail);
+ (PINT_statfs_bsize(&tmp_statfs) *
+ PINT_statfs_bavail(&tmp_statfs));
tmp_trove_statfs->bytes_total =
- (tmp_statfs.f_bsize *
- (tmp_statfs.f_blocks -
- (tmp_statfs.f_bfree - tmp_statfs.f_bavail)));
+ (PINT_statfs_bsize(&tmp_statfs) *
+ (PINT_statfs_blocks(&tmp_statfs) -
+ (PINT_statfs_bfree(&tmp_statfs) -
+ PINT_statfs_bavail(&tmp_statfs))));
return 1;
}
Index: dbpf-open-cache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-open-cache.c,v
diff -p -u -r1.13 -r1.13.18.1
--- dbpf-open-cache.c 17 Sep 2004 21:15:43 -0000 1.13
+++ dbpf-open-cache.c 11 Nov 2005 22:19:08 -0000 1.13.18.1
@@ -27,6 +27,7 @@
#include "gossip.h"
#include "quicklist.h"
#include "dbpf-open-cache.h"
+#include "pvfs2-internal.h"
#define OPEN_CACHE_SIZE 64
@@ -487,7 +488,7 @@ int dbpf_open_cache_remove(
tmp_error = 0;
DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX,
- my_storage_p->name, coll_id, Lu(handle));
+ my_storage_p->name, coll_id, llu(handle));
ret = DBPF_UNLINK(filename);
if ((ret != 0) && (errno != ENOENT))
@@ -529,11 +530,11 @@ static int open_fd(
char filename[PATH_MAX] = {0};
gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
- "dbpf_open_cache open_fd: opening fd %Lu, create: %d\n",
- Lu(handle), create_flag);
+ "dbpf_open_cache open_fd: opening fd %llu, create: %d\n",
+ llu(handle), create_flag);
DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX,
- my_storage_p->name, coll_id, Lu(handle));
+ my_storage_p->name, coll_id, llu(handle));
*fd = DBPF_OPEN(filename, O_RDWR, 0);
@@ -554,8 +555,8 @@ static int open_db(
char filename[PATH_MAX] = {0};
gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
- "dbpf_open_cache open_db: opening db %Lu (%Lx).\n",
- Lu(handle), Lu(handle));
+ "dbpf_open_cache open_db: opening db %llu (%llx).\n",
+ llu(handle), llu(handle));
/* special case; ds attrib database */
if (handle == TROVE_HANDLE_NULL)
@@ -567,7 +568,7 @@ static int open_db(
{
/* normal case; keyval db */
DBPF_GET_KEYVAL_DBNAME(filename, PATH_MAX,
- my_storage_p->name, coll_id, Lu(handle));
+ my_storage_p->name, coll_id, llu(handle));
}
ret = db_create(db_pp, NULL, 0);
Index: dbpf.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf.h,v
diff -p -u -r1.56.2.1 -r1.56.2.2
--- dbpf.h 4 Nov 2005 07:14:21 -0000 1.56.2.1
+++ dbpf.h 11 Nov 2005 22:19:08 -0000 1.56.2.2
@@ -16,6 +16,7 @@ extern "C" {
#include "trove.h"
#include "gen-locks.h"
#include "dbpf-open-cache.h"
+#include "pvfs2-internal.h"
#define TROVE_DBPF_VERSION_KEY "trove-dbpf-version"
#define TROVE_DBPF_VERSION_VALUE "0.0.1"
@@ -119,17 +120,17 @@ do {
/* arguments are: buf, path_max, stoname, collid, handle */
#define DBPF_GET_BSTREAM_FILENAME(__b, __pm, __stoname, __cid, __handle) \
do { \
- snprintf(__b, __pm, "/%s/%08x/%s/%.8Lu/%08Lx.bstream", \
+ snprintf(__b, __pm, "/%s/%08x/%s/%.8llu/%08llx.bstream", \
__stoname, __cid, BSTREAM_DIRNAME, \
- Lu(DBPF_BSTREAM_GET_BUCKET(__handle, __cid)), Lu(__handle)); \
+ llu(DBPF_BSTREAM_GET_BUCKET(__handle, __cid)), llu(__handle)); \
} while (0)
/* arguments are: buf, path_max, stoname, collid, handle */
#define DBPF_GET_KEYVAL_DBNAME(__b, __pm, __stoname, __cid, __handle) \
do { \
- snprintf(__b, __pm, "/%s/%08x/%s/%.8Lu/%08Lx.keyval", __stoname, \
+ snprintf(__b, __pm, "/%s/%08x/%s/%.8llu/%08llx.keyval", __stoname, \
__cid, KEYVAL_DIRNAME, \
- Lu(DBPF_KEYVAL_GET_BUCKET(__handle, __cid)), Lu(__handle)); \
+ llu(DBPF_KEYVAL_GET_BUCKET(__handle, __cid)), llu(__handle)); \
} while (0)
extern struct TROVE_bstream_ops dbpf_bstream_ops;
More information about the PVFS2-CVS
mailing list