ewmscp  ..
outputHandlerDaosFs.cpp
Go to the documentation of this file.
1 #include <OptionsChrono.h>
2 #include "outputHandlerDaosFs.h"
3 #include "block.h"
4 #include "copyRequestTypes.h"
5 #include "ewmscp.h"
6 #include "timer.h"
7 #include "throwcall.h"
8 #include "errMsgQueue.h"
9 #include <fcntl.h>
10 #include <libgen.h>
11 #include <sys/stat.h>
12 #include <sys/types.h>
13 #include <sys/statvfs.h>
14 #include <unistd.h>
15 #include <vector>
16 
17 
18 namespace outputHandler {
19  decltype(daosFs::factory) daosFs::factory("daosFs");
20  std::unique_ptr<base::writer> daosFs::newWriter(const std::string& path,
21  bool mightAppend,
22  size_t sourceSize,
23  size_t readBlockSize,
25  bool noWrite,
26  std::unique_ptr<ioHandle::attrDataType> attrData,
27  std::unique_ptr<acl::list> aclData) {
28  return std::unique_ptr<base::writer>(new writerDaosFs(path, mightAppend,
29  sourceSize, readBlockSize,
30  state, noWrite,
31  std::move(attrData),
32  std::move(aclData),
33  *this));
34  }
35 
36  std::unique_ptr<base::writer> daosFs::newTmpWriter(std::string& path,
37  size_t /*sourceSize*/,
38  bool noWrite,
39  std::unique_ptr<ioHandle::attrDataType> attrData,
40  std::unique_ptr<acl::list> aclData) {
41  return std::unique_ptr<base::writer>(new writerDaosFs(path,
42  noWrite,
43  std::move(attrData),
44  std::move(aclData),
45  *this));
46  }
47 
48 
49  static options::single<timer::clock_type::duration> slownessThreshold('\0',"daosFsSlownessThreshold",
50  "duration after which file operations are considered slow",
51  std::chrono::milliseconds(10));
52 
53  void daosFs::ensureParentDirs(const std::string& path,
54  const std::string& srcPath,
55  inputHandler::base* InputHandler) {
56  std::vector<std::remove_reference<decltype(path)>::type::value_type> disposable_buffer(path.c_str(), path.c_str() + path.size() + 1);
57  std::string dir(dirname(disposable_buffer.data()));
58  struct stat statbuf;
59 
60  if (stat(dir.c_str(), &statbuf)) {
61  if (errno == ENOENT || errno == ENOTDIR) {
62  ensureParentDirs(dir, srcPath, InputHandler);
63  static timer::anchor A("mkdir");
65  auto result = mkdir(dir.c_str(), 0777u);
66  I.stop(slownessThreshold, dir);
67 
68  if (result != 0 && errno == EEXIST) {
69  return; // we lost a race with another copy process...
70  }
71 
72  throwcall::good0(result, "can't create directory ", dir);
73 
74  if (gid != -1 || uid != -1) {
75  timerInst(chown);
76  throwcall::good0(chown(dir.c_str(), uid, gid), "can't set owner/group (", uid, ",", gid, ") on ", dir);
77  }
78  }
79  } else if (! S_ISDIR(statbuf.st_mode)) {
81  dir, "ensure parents",
82  "is not a directory (st_mode is ", statbuf.st_mode, ") but should be");
83  }
84  if (requiredFsid != 0) {
85  struct statvfs fsstat;
86  timerInst(statvfs);
87  throwcall::good0(statvfs(dir.c_str(), &fsstat), "can't statvfs ", dir);
88  if ((fsstat.f_fsid & fsidMask) != requiredFsid) {
89  throw fatalException("wrong fs id 0x", std::hex, fsstat.f_fsid, " instead of ", requiredFsid);
90  }
91  }
92  }
93 
94 
95  void daosFs::remove(const std::string& path, copyRequest::stateType& state) {
96  struct stat dsttat;
97  {
98  timerInst(lstat);
99  auto retval = lstat(path.c_str(), &dsttat);
100 
101  if (retval && errno == ENOENT) {
103  return;
104  }
105  }
106  if (S_ISDIR(dsttat.st_mode)) {
107  timerInst(rmdir);
108  auto retval = rmdir(path.c_str());
109  if (retval) {
110  switch (errno) {
111  case ENOENT:
113  return;
114  case ENOTEMPTY:
115  case EEXIST: // POSIX.1 allows this also
117  path, "remove", "directory not empty but should be removed");
119  return;
120  }
121  throwcall::good0(retval, "can't remove directory ", path);
122  } else {
124  return;
125  }
126  } else {
127  timerInst(unlink);
128  auto retval = unlink(path.c_str());
129 
130  if (retval && errno == ENOENT) {
132  } else {
133  throwcall::good0(retval, "can't unlink ", path);
134  }
136  }
137  }
138 
139  bool daosFs::renameSimple(const std::string& fromPath,
140  const std::string& toPath) {
142  auto retval = std::rename(fromPath.c_str(), toPath.c_str());
143  if (retval && (errno == ENOENT || errno == ENOTDIR)) {
144  return false;
145  }
146  throwcall::good0(retval, "can't rename '", fromPath, "' to '", toPath, "'");
147  return true;
148  }
149 
150 
151  base::renameRetvalType daosFs::rename(const std::string& fromPath,
152  const std::unique_ptr<const genericStat>& readInitialStat,
153  const std::string& toPath,
154  copyRequest::stateType& state) {
155  struct stat fromPathStatBuf;
156  static timer::anchor A("stat");
158  auto statRetVal = stat(fromPath.c_str(), &fromPathStatBuf);
159  I.stop();
160  if (statRetVal && (errno == ENOENT || errno == ENOTDIR)) {
161  if (readInitialStat && readInitialStat->isDir()) { // no need to act, dirs are created on the fly
165  }
167  } else if (statRetVal) { // curious error
168  throwcall::good0(statRetVal, "can't stat '", fromPath, "'");
169  return base::renameRetvalType::cantHappen; // never reached
170  }
171  genericStat fromPathStat(fromPathStatBuf, std::chrono::nanoseconds(1));
172  if (!readInitialStat || (! readInitialStat->isDir() &&
173  (fromPathStat.size != readInitialStat->size
174  || !fromPathStat.isSameMtimeAs(*readInitialStat)))) {
175  // the copy on fromPath is not up to date, create a new copy
176  if (readInitialStat) {
177  std::string initialTime;
178  std::string finalTime;
179  readInitialStat->getMtime(initialTime);
180  fromPathStat.getMtime(finalTime);
182  fromPath, "move"
183  "file (", toPath, ") changed unexpectedly ("
184  , initialTime, " -> ", finalTime, ", "
185  , readInitialStat->size, " -> ", fromPathStat.size
186  , ", doing fresh copy");
187  } else {
189  fromPath, "move",
190  "file (", toPath, ") has no initial stat, doing fresh copy");
191  }
193  } else { // try to move the existing copy
194  timerInst(rename);
195  auto retval = std::rename(fromPath.c_str(), toPath.c_str());
196 
197  if (retval && (errno == ENOENT || errno == ENOTDIR)) {
198  if (readInitialStat->isDir()) { // no need to act, dirs are created on the fly
201  }
203  fromPath, "move",
204  "vanished unexpectedly, doing fresh copy");
205  // file was probably not copied yet, try to copy it from the move target
207  } else {
208  throwcall::good0(retval, "can't rename '", fromPath, "' to '", toPath, "'");
211  }
212  }
213  }
214 
215  void daosFs::createSymlink(const std::vector<char>& target,
216  const std::string& path,
217  uid_t uid, gid_t gid) {
218  timerInst(symlink);
219  auto retval = symlink(target.data(), path.c_str());
220  if (retval != 0 && errno != EEXIST) {
221  throwcall::good0(retval, "can't create link at ", path);
222  }
223  if (static_cast<std::make_signed<decltype(gid)>::type>(gid) != -1
224  || static_cast<std::make_signed<decltype(uid)>::type>(uid) != -1) {
225  throwcall::good0(lchown(path.c_str(), uid, gid), "can't set owner/group (", uid, ",", gid, ") on ", path);
226  }
227  }
228 
229  daosFs::writerDaosFs::writerDaosFs(const std::string& aPath,
230  bool mightAppend,
231  size_t sourceSize,
232  size_t readBlockSize,
233  copyRequest::stateType &state,
234  bool noWrite,
235  std::unique_ptr<ioHandle::attrDataType> aAttrData,
236  std::unique_ptr<acl::list> aAclData,
237  daosFs& aHandler):
238  daosFsIoCommon(aPath, aHandler),
239  attrData(std::move(aAttrData)),
240  aclData(std::move(aAclData)) {
241  bool haveWriteStat = false;
242  if (noWrite) {
243  obj = nullptr;
244  blockSize = 4096;
245  } else {
246  auto openMode = O_CREAT | O_TRUNC | O_WRONLY;
247  state.clear(copyRequest::stateBitType::append); // clear any old append bits, may be left over from former attempts
249  fd = throwcall::badval(open(path.c_str(), openMode, S_IWUSR),
250  -1, "can't open ", path, " for writing");
251  if (!haveWriteStat) {
252  throwcall::good0(fstat(fd, &writeInitialStat), "can't stat destination file ", path);
253  }
254  blockSize = writeInitialStat.st_blksize;
255  throwcall::good0(posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL),
256  "can't advise ", path, " as sequential");
257  throwcall::good0(posix_fadvise(fd, 0, 0, POSIX_FADV_NOREUSE),
258  "can't advise ", path, " as use only once");
259  }
260  };
261  daosFs::writerDaosFs::writerDaosFs(std::string& aPath,
262  bool noWrite,
263  std::unique_ptr<ioHandle::attrDataType> aAttrData,
264  std::unique_ptr<acl::list> aAclData,
265  base& handler):
266  daosFsIoCommon(aPath),
267  attrData(std::move(aAttrData)),
268  aclData(std::move(aAclData)) {
269  if (noWrite) {
270  fd = -1;
271  blockSize = 4096;
272  } else {
273  static const std::string pattern("XXXXXX.tmp");
274  std::vector<char> tmpName;
275  tmpName.reserve(path.size() + pattern.size() + 1);
276  tmpName.insert(tmpName.end(), path.cbegin(), path.cend());
277  handler.shortenNameToMax(path,tmpName,pattern);
278  tmpName.insert(tmpName.end(), pattern.cbegin(), pattern.cend());
279  tmpName.push_back('\0');
280  timerInstTO(mkstemps,slownessThreshold,tmpName);
281  fd = throwcall::badval(mkstemps(tmpName.data(), 4),
282  -1, "can't open ", tmpName.data(), " for writing");
283  aPath.replace(0, path.size(), tmpName.data(), tmpName.size());
284  throwcall::good0(fstat(fd, &writeInitialStat), "can't stat destination file ", path);
285  blockSize = writeInitialStat.st_blksize;
286  throwcall::good0(posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL),
287  "can't advise ", path, " as sequential");
288  throwcall::good0(posix_fadvise(fd, 0, 0, POSIX_FADV_NOREUSE),
289  "can't advise ", path, " as use only once");
290  }
291  };
293  if (close(fd) != 0) {
295  path, "close during unwind ",
296  std::system_category().default_error_condition(errno).message());
297  }
299  path, "unlink failed copy", "due to exception");
300  auto retval = unlink(path.c_str());
301  if (retval && errno != ENOENT) {
303  path, "can't remove bad copy ",
304  std::system_category().default_error_condition(errno).message());
305  }
306  }
307 
309  if (fd != -1) {
310  if (isUnwinding()) {
311  closeAndRemoveBadCopy();
312  return;
313  } else {
314  if (attrData) {
315  try {
316  attrData->set(this);
317  } catch (const std::exception& e) {
319  path, "set attr at close ",
320  e.what());
321  closeAndRemoveBadCopy();
322  throw;
323  }
324  }
325  timerInstTO(close,slownessThreshold,path);
326  throwcall::good0(close(fd), "can't close ", path);
327  }
328  }
329  };
330 
331  void daosFs::writerDaosFs::seek(size_t position) {
332  timerInst(lseek);
333  throwcall::badval(lseek(fd, position, SEEK_SET),
334  -1, "can't seek ", path, " to ", position);
335  }
337  return writeInitialStat.st_size == 0;
338  }
340  return writeInitialStat.st_size;
341  }
342 
344  if (b.isHole()) { // just write a hole...
345  static timer::anchor a("lseek");
347  auto currentPosition = throwcall::badval(lseek(fd, 0, SEEK_CUR), -1, "lseek to determine position on", path);
348  i.stop();
349  auto holeEnd = currentPosition + b.size();
350  {
351  timerInst(ftruncate);
352  throwcall::good0(ftruncate(fd, holeEnd),
353  "fruncate ", path, " to ", holeEnd);
354  }
355  timerInst(lseek);
356  throwcall::badval(lseek(fd, holeEnd, SEEK_SET), -1,
357  "can't seek to hole end (", holeEnd, ") in ", path);
358  return;
359  }
360 
361  size_t bytes_writen_so_far = 0;
362 
363  while (bytes_writen_so_far < b.size()) {
364  auto count = b.size() - bytes_writen_so_far;
365 
366  if (count > blockSize) {
367  count = blockSize;
368  }
370  timerInst(write);
371  auto bytes_writen = throwcall::badval(write(fd, b.bufferAt(bytes_writen_so_far), count),
372  -1, "write failed on ", path);
373  writeRateLimit.update(bytes_writen);
374  bytes_writen_so_far += bytes_writen;
375  }
376  }
377 
378 
380  size_t bytes_writen_so_far = 0;
381 
382  while (bytes_writen_so_far < b.size()) {
383  auto count = b.size() - bytes_writen_so_far;
384 
385  if (count > blockSize) {
386  count = blockSize;
387  }
388  timerInst(pwrite);
389  auto bytes_writen = throwcall::badval(pwrite(fd, b.bufferAt(bytes_writen_so_far), count, b.offset() + bytes_writen_so_far),
390  -1, "write failed on ", path);
391  bytes_writen_so_far += bytes_writen;
392  }
393  }
394 
396  if (preserve.timestamps) {
397  struct timespec times[2];
398  readInitialStat.getAtime(times[0]);
399  readInitialStat.getMtime(times[1]);
400  timerInst(futimens);
401  throwcall::good0(futimens(fd, times), "can't set time stamp of ", path);
402  }
403 
404  if (preserve.mode) {
405  timerInst(fchmod);
406  throwcall::good0(fchmod(fd, readInitialStat.mode), "can't set mode of ", path);
407  } else {
408  auto oldmask = umask(0);
409  timerInst(fchmod);
410  throwcall::good0(fchmod(fd, modeBits & ~oldmask), "can't set mode of ", path);
411  umask(oldmask);
412  }
413 
414  if (gid != -1 || uid != -1) {
415  timerInst(fchown);
416  throwcall::good0(fchown(fd, uid, gid), "can't set owner/group (", uid, ",", gid, ") of ", path);
417  } else if (preserve.ownership) {
418  timerInst(fchown);
419  throwcall::good0(fchown(fd, readInitialStat.ownerUid, readInitialStat.ownerGid),
420  "can't set owner/group (", readInitialStat.ownerUid, ",", readInitialStat.ownerGid, ") of ",
421  path);
422  }
423  }
424 
425  void daosFs::doAttributePreservations(const std::string& path,
426  const genericStat& stat) {
427  if (preserve.timestamps) {
428  struct timespec times[2];
429  times[0].tv_nsec = UTIME_OMIT; // leave atime unchanged
430  stat.getMtime(times[1]);
431  timerInst(utimensat);
432  throwcall::good0(utimensat(0, path.c_str(), times, 0), "can't set mtime on ", path);
433  }
434  if (preserve.mode) {
435  timerInst(chmod);
436  throwcall::good0(chmod(path.c_str(), stat.mode), "can't set mode of ", path);
437  } else {
438  auto oldmask = umask(0);
439  timerInst(chmod);
440  throwcall::good0(chmod(path.c_str(), modeBits & ~oldmask), "can't set mode of ", path);
441  umask(oldmask);
442  }
443 
444  if (gid != -1 || uid != -1) {
445  timerInst(chown);
446  throwcall::good0(chown(path.c_str(), uid, gid), "can't set owner/group (", uid, ",", gid, ") of ", path);
447  } else if (preserve.ownership) {
448  timerInst(chown);
449  throwcall::good0(chown(path.c_str(), stat.ownerUid, stat.ownerGid),
450  "can't set owner/group (", stat.ownerUid, ",", stat.ownerGid, ") of ",
451  path);
452  }
453  }
454 
455  size_t daosFs::getMaxNameLength(const std::string& dirPath) {
456  errno = 0;
457  timerInst(pathconf);
458  return throwcall::badval(pathconf(dirPath.c_str(), _PC_NAME_MAX), -1,"can't get max name lenght on", dirPath);
459  }
460 
461 
463  timerInst(fsync);
464  throwcall::good0(fsync(fd), "can't sync ", path);
465  }
466 
467 }; // end namespace outputHandler
genericStat::ownerGid
gid_t ownerGid
Definition: genericStat.h:24
daosFsIoCommon::obj
dfs_obj_t * obj
Definition: daosFsCommon.h:53
outputHandler::daosFs::writerDaosFs::seek
void seek(size_t position) override
Definition: outputHandlerDaosFs.cpp:331
outputHandler::requiredFsid
static options::single< unsigned long > requiredFsid('\0', "requiredFsid", "required fsid of output file system", 0)
block.h
genericStat::mode
mode_t mode
Definition: genericStat.h:22
options::single
generic option class with any type that can be used with std::istream and std::ostream
Definition: Options.h:533
outputHandler::daosFs::writerDaosFs::closeAndRemoveBadCopy
void closeAndRemoveBadCopy() override
Definition: outputHandlerDaosFs.cpp:292
outputHandler::fsidMask
static options::single< unsigned long > fsidMask('\0', "fsidMask", "bit mask for required fsid of output file system", 0)
errMsgQueue.h
block::offset
size_t offset() const
Definition: block.h:25
errMsg::location
class for defining the location of a error message in the source code.
Definition: errMsgQueue.h:14
genericStat::getAtime
void getAtime(struct timespec &spec) const
Definition: genericStat.cpp:62
throwcall::badval
T badval(T call, t badvalue, const Args &... args)
template function to wrap system calls that return a special bad value on failure
Definition: throwcall.h:54
outputHandlerDaosFs.h
outputHandler::daosFs::writerDaosFs::writeInitialStat
struct stat writeInitialStat
Definition: outputHandlerDaosFs.h:15
genericStat
generic stat abstraction class Used to abstract the variants of the stat structure.
Definition: genericStat.h:12
outputHandler::daosFs::factory
static factoryTemplate< daosFs > factory
Definition: outputHandlerDaosFs.h:11
copyRequestTypes.h
fatalException
class for exceptions that should result in program termination
Definition: copyRequestTypes.h:11
outputHandler::daosFs::writerDaosFs::doAttributePreservations
void doAttributePreservations(const genericStat &readInitialStat) override
Definition: outputHandlerDaosFs.cpp:395
copyRequest::stateBitType::ignore
@ ignore
errMsg::level::info
@ info
outputHandler::slownessThreshold
static options::single< timer::clock_type::duration > slownessThreshold('\0',"daosFsSlownessThreshold", "duration after which file operations are considered slow", std::chrono::milliseconds(10))
outputHandler::base::renameRetvalType::cantHappen
@ cantHappen
outputHandler::daosFs::writerDaosFs::~writerDaosFs
~writerDaosFs() noexcept(false) override
Definition: outputHandlerDaosFs.cpp:308
outputHandler::daosFs::newWriter
std::unique_ptr< writer > newWriter(const std::string &path, bool mightAppend, size_t sourceSize, size_t readBlockSize, copyRequest::stateType &state, bool noWrite, std::unique_ptr< ioHandle::attrDataType > attrData, std::unique_ptr< acl::list > aclData) override
Definition: outputHandlerDaosFs.cpp:20
outputHandler::daosFs::getMaxNameLength
size_t getMaxNameLength(const std::string &dirPath) override
Definition: outputHandlerDaosFs.cpp:455
copyRequest::stateBitType::done
@ done
outputHandler::base::renameRetvalType::fileChanged
@ fileChanged
copyRequest::stateBitType::failed
@ failed
outputHandler
Definition: ioHandle.h:9
genericStat::getMtime
void getMtime(struct timespec &spec) const
Definition: genericStat.cpp:65
gid
options::single< int > gid
copyRequest::stateBitType::vanished
@ vanished
outputHandler::daosFs::rename
base::renameRetvalType rename(const std::string &fromPath, const std::unique_ptr< const genericStat > &readInitialStat, const std::string &toPath, copyRequest::stateType &state) override
Definition: outputHandlerDaosFs.cpp:151
outputHandler::daosFs::ensureParentDirs
void ensureParentDirs(const std::string &path, const std::string &srcPath, inputHandler::base *InputHandler) override
Definition: outputHandlerDaosFs.cpp:53
copyRequest::stateType
Definition: copyRequestTypes.h:66
outputHandler::daosFs::newTmpWriter
std::unique_ptr< writer > newTmpWriter(std::string &path, size_t sourceSize, bool noWrite, std::unique_ptr< ioHandle::attrDataType > attrData, std::unique_ptr< acl::list > aclData) override
Definition: outputHandlerDaosFs.cpp:36
block::isHole
bool isHole() const
Definition: block.h:36
genericStat::isSameMtimeAs
bool isSameMtimeAs(const genericStat &that) const
Definition: genericStat.cpp:87
errMsg::level::debug
@ debug
genericStat::isDir
bool isDir() const
Definition: genericStat.cpp:92
outputHandler::daosFs::writerDaosFs::parallelizable
bool parallelizable() const override
tell if this handler is capable of parallel IO. Unsually not the case
Definition: outputHandlerDaosFs.cpp:336
ioHandle::blockSize
size_t blockSize
in bytes, block size to be used when reading or writing
Definition: ioHandle.h:17
outputHandler::daosFs::writerDaosFs::writerDaosFs
writerDaosFs(const std::string &aPath, bool mightAppend, size_t sourceSize, size_t readBlockSize, copyRequest::stateType &state, bool noWrite, std::unique_ptr< ioHandle::attrDataType > aAttrData, std::unique_ptr< acl::list > aAclData, daosFs &aHandler)
Definition: outputHandlerDaosFs.cpp:229
genericStat::size
size_t size
Definition: genericStat.h:16
outputHandler::base::renameRetvalType::fileVanished
@ fileVanished
timer::instanceUnscoped::stop
void stop()
Definition: timer.h:107
OptionsChrono.h
outputHandler::base
Definition: outputHandler.h:17
block::bufferAt
void * bufferAt(size_t offset)
only way to access the data in the block
Definition: block.cpp:28
outputHandler::base::renameRetvalType::ok
@ ok
timer.h
outputHandler::base::renameRetvalType
renameRetvalType
Definition: outputHandler.h:106
throwcall.h
block
data block, used to hold the data that are being copied (or checksummed).
Definition: block.h:7
timer::instanceUnscoped
Definition: timer.h:95
outputHandler::daosFs::writerDaosFs::sync
void sync() override
Definition: outputHandlerDaosFs.cpp:462
outputHandler::daosFs::writerDaosFs::writeBlock
void writeBlock(const block &b) override
Definition: outputHandlerDaosFs.cpp:343
outputHandler::daosFs::renameSimple
bool renameSimple(const std::string &fromPath, const std::string &toPath) override
Definition: outputHandlerDaosFs.cpp:139
timer::anchor
Definition: timer.h:22
preserve
decltype(preserve) preserve
set of properties to preserve in the copy
Definition: ewmscp.cpp:111
outputHandler::daosFs::writerDaosFs
Definition: outputHandlerDaosFs.h:13
uid
options::single< int > uid
outputHandler::daosFs::createSymlink
void createSymlink(const std::vector< char > &target, const std::string &path, uid_t uid, gid_t gid) override
Definition: outputHandlerDaosFs.cpp:215
inputHandler::base
class for handling input This is the (abstract) base class for handling input, both reading a file vi...
Definition: inputHandler.h:35
errMsg::level::err
@ err
throttle::watch::wait
void wait()
Definition: throttle.h:50
daosFsIoCommon
base class for daosFs reader and writer class with the common stuff like fd, path and xattr handling
Definition: daosFsCommon.h:50
errMsg::emit
void emit(level aLogLevel, const location &loc, const std::string &aObject, const std::string &aAction, const Args &... args)
function to create and enqueue a message, this is the only way that messages should be created!
Definition: errMsgQueue.h:148
timerInst
#define timerInst(subfunc)
Definition: timer.h:157
block::size
size_t size() const
Definition: block.h:16
writeRateLimit
throttle::watch writeRateLimit
outputHandler::daosFs::writerDaosFs::getSize
size_t getSize() const override
Definition: outputHandlerDaosFs.cpp:339
timerInstTO
#define timerInstTO(subfunc, timeout, object)
Definition: timer.h:158
outputHandler::daosFs::writerDaosFs::writeBlockP
void writeBlockP(const block &b) override
Definition: outputHandlerDaosFs.cpp:379
throwcall::good0
void good0(T call, const Args &... args)
template function to wrap system calls that return 0 on success
Definition: throwcall.h:40
daosFsIoCommon::path
const std::string & path
Definition: daosFsCommon.h:52
enumAsBitmask::clear
void clear(const T aBits)
Definition: enumAsBitmask.h:31
outputHandler::daosFs::doAttributePreservations
void doAttributePreservations(const std::string &path, const genericStat &stat) override
Definition: outputHandlerDaosFs.cpp:425
throttle::watch::update
void update(double units=1.0)
Definition: throttle.h:35
daosFsIoCommon::handler
daosFsCommon & handler
Definition: daosFsCommon.h:54
ewmscp.h
copyRequest::stateBitType::append
@ append
outputHandler::daosFs
Definition: outputHandlerDaosFs.h:10
genericStat::ownerUid
uid_t ownerUid
Definition: genericStat.h:23
modeBits
options::single< modeBitType > modeBits
outputHandler::daosFs::remove
void remove(const std::string &path, copyRequest::stateType &state) override
Definition: outputHandlerDaosFs.cpp:95