X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Fold%2Ftest_seek_read.c;fp=src%2Fceph%2Fsrc%2Ftest%2Fold%2Ftest_seek_read.c;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=c63ed34d77eba6b6136c3b986480c96d117a2260;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/test/old/test_seek_read.c b/src/ceph/src/test/old/test_seek_read.c deleted file mode 100644 index c63ed34..0000000 --- a/src/ceph/src/test/old/test_seek_read.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "include/types.h" -#include "common/Clock.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - char *fn = argv[1]; - - int fd = ::open(fn, O_RDWR|O_DIRECT);//|O_SYNC|O_DIRECT); - if (fd < 0) return 1; - - uint64_t bytes = 0; - int r = ioctl(fd, BLKGETSIZE64, &bytes); - uint64_t numblocks = bytes / 4096; - - //uint64_t numblocks = atoll(argv[2]) * 4;// / 4096; - int count = 1000; - - cout << "fn " << fn << endl; - cout << "numblocks " << numblocks << endl; - - int blocks = 1; - while (blocks <= 1024) { - //cout << "fd is " << fd << endl; - - void *buf; - ::posix_memalign(&buf, 4096, 4096*blocks); - - int s = blocks*4096; - - utime_t start = ceph_clock_now(); - for (int i=0; i