syn_sargs.push_back(args[++i]);
syn_sargs.push_back(args[++i]);
syn_iargs.push_back(atoi(args[++i]));
+
+ } else if (strcmp(args[i], "chunkfile") == 0) {
+ syn_modes.push_back(SYNCLIENT_MODE_CHUNK);
+ syn_sargs.push_back(args[++i]);
} else {
cerr << "unknown syn arg " << args[i] << std::endl;
assert(0);
}
+
+int SyntheticClient::chunk_file(string &filename)
+{
+ int fd = client->open(filename.c_str(), O_RDONLY);
+ if (fd < 0) return fd;
+
+ struct stat st;
+ client->fstat(fd, &st);
+ __u64 size = st.st_size;
+
+ dout(0) << "file " << filename << " size is " << size << dendl;
+
+
+
+
+
+ client->close(fd);
+ return 0;
+}
#define SYNCLIENT_MODE_IMPORTFIND 300
+#define SYNCLIENT_MODE_CHUNK 400
+
void parse_syn_options(vector<const char*>& args);
void import_find(const char *basedir, const char *find, bool writedata);
+ int chunk_file(string &filename);
};
#endif