MCPcopy Create free account
hub / github.com/apache/mesos / scheduleProjectRoot

Method scheduleProjectRoot

src/slave/containerizer/mesos/isolators/xfs/disk.cpp:893–918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891
892
893Try<Nothing> XfsDiskIsolatorProcess::scheduleProjectRoot(
894 prid_t projectId,
895 const string& rootDir)
896{
897 Try<string> devname = xfs::getDeviceForPath(rootDir);
898
899 if (devname.isError()) {
900 return Error(devname.error());
901 }
902
903 if (!scheduledProjects.contains(projectId)) {
904 scheduledProjects.put(projectId, ProjectRoots{devname.get(), {rootDir}});
905 } else {
906 ProjectRoots& roots = scheduledProjects.at(projectId);
907
908 if (roots.deviceName != devname.get()) {
909 return Error(strings::format(
910 "Conflicting device names '%s' and '%s' for project ID %s",
911 roots.deviceName, devname.get(), projectId).get());
912 }
913
914 roots.directories.insert(rootDir);
915 }
916
917 return Nothing();
918}
919
920void XfsDiskIsolatorProcess::reclaimProjectIds()
921{

Callers

nothing calls this directly

Calls 11

getDeviceForPathFunction · 0.85
formatFunction · 0.85
NothingClass · 0.85
atMethod · 0.80
insertMethod · 0.80
errorMethod · 0.65
ErrorFunction · 0.50
isErrorMethod · 0.45
containsMethod · 0.45
putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected