From e4dc829185307cea6eeeb9c450ddcf6ed7b29f02 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 9 Sep 2008 15:42:11 -0700 Subject: [PATCH] synclient: loff_t in write_file --- src/client/SyntheticClient.cc | 6 +++--- src/client/SyntheticClient.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/SyntheticClient.cc b/src/client/SyntheticClient.cc index 4713ef02e422f..c5a94133bb33f 100644 --- a/src/client/SyntheticClient.cc +++ b/src/client/SyntheticClient.cc @@ -1895,12 +1895,12 @@ int SyntheticClient::rm_file(string& fn) return client->unlink(fn.c_str()); } -int SyntheticClient::write_file(string& fn, int size, int wrsize) // size is in MB, wrsize in bytes +int SyntheticClient::write_file(string& fn, int size, loff_t wrsize) // size is in MB, wrsize in bytes { //uint64_t wrsize = 1024*256; char *buf = new char[wrsize+100]; // 1 MB memset(buf, 7, wrsize); - uint64_t chunks = (uint64_t)size * (uint64_t)(1024*1024) / (uint64_t)wrsize; + int64_t chunks = (uint64_t)size * (uint64_t)(1024*1024) / (uint64_t)wrsize; int fd = client->open(fn.c_str(), O_RDWR|O_CREAT); dout(5) << "writing to " << fn << " fd " << fd << dendl; @@ -1911,7 +1911,7 @@ int SyntheticClient::write_file(string& fn, int size, int wrsize) // size is i __u64 bytes = 0, total = 0; - for (unsigned i=0; i