mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
*** empty log message ***
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@303 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
10e38fa815
commit
fba2d5da32
@ -38,7 +38,7 @@ int SyntheticClient::run()
|
||||
full_walk(sarg1);
|
||||
break;
|
||||
case SYNCLIENT_MODE_WRITEFILE:
|
||||
write_file(sarg1, iarg1);
|
||||
write_file(sarg1, iarg1, iarg2);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
@ -165,11 +165,11 @@ int SyntheticClient::make_dirs(const char *basedir, int dirs, int files, int dep
|
||||
|
||||
|
||||
|
||||
int SyntheticClient::write_file(string& fn, int size) // size is in MB
|
||||
int SyntheticClient::write_file(string& fn, int size, int wrsize) // size is in MB
|
||||
{
|
||||
__uint64_t wrsize = 1024*256;
|
||||
//__uint64_t wrsize = 1024*256;
|
||||
char *buf = new char[wrsize]; // 1 MB
|
||||
__uint64_t chunks = (__uint64_t)size * (uint64_t)(1024*1024) / wrsize;
|
||||
__uint64_t chunks = (__uint64_t)size * (uint64_t)(1024*1024) / (__uint64_t)wrsize;
|
||||
|
||||
int fd = client->open(fn.c_str(), O_WRONLY|O_CREAT);
|
||||
dout(5) << "writing to " << fn << " fd " << fd << endl;
|
||||
|
@ -88,7 +88,8 @@ class SyntheticClient {
|
||||
int full_walk(string& fromdir);
|
||||
int random_walk(int n);
|
||||
int make_dirs(const char *basedir, int dirs, int files, int depth);
|
||||
int write_file(string& fn, int mb);
|
||||
int write_file(string& fn, int mb, int chunk);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user