From 5792669a15b6e1ba37bc788609f4f4f96024e644 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 8 Jun 2009 11:35:57 -0700 Subject: [PATCH] A properly working testradoscio.c. For the moment it just takes a number of writes to make and does that number in a loop. --- src/testradoscio.c | 127 ++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 65 deletions(-) diff --git a/src/testradoscio.c b/src/testradoscio.c index e68a334a639d4..8fb338c195694 100644 --- a/src/testradoscio.c +++ b/src/testradoscio.c @@ -1,15 +1,15 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* -* Ceph - scalable distributed file system - * - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * -*/ + * Ceph - scalable distributed file system + * + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ #include "include/librados.h" @@ -17,69 +17,66 @@ #include #include - int main(int argc, const char **argv) { - if (argc<2) { - printf("need to assign # of concurrent ios to perform!\n"); - exit(1); - } +int main(int argc, const char **argv) { + if (argc<2) { + printf("need to assign # of concurrent ios to perform!\n"); + exit(1); + } - int concurrentios = atoi(argv[1]); - printf("Performing %d ios\n", concurrentios); + int concurrentios = atoi(argv[1]); + printf("Performing %d ios\n", concurrentios); - if (rados_initialize(argc, argv) < 0) { - printf("error initializing\n"); - exit(1); - } + if (rados_initialize(argc, argv) < 0) { + printf("error initializing\n"); + exit(1); + } - rados_pool_t pool; - int r = rados_open_pool("data", &pool); - printf("open pool result = %d, pool = %d\n", r, pool); + rados_pool_t pool; + int r = rados_open_pool("data", &pool); + printf("open pool result = %d, pool = %d\n", r, pool); - rados_completion_t* completions[concurrentios]; - char* name[concurrentios]; - char contents[128]; -// char* buffers[concurrentios]; - int i; - for (i=0; i