A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename a field for clarity: that's not a signal
[simgrid.git]
/
src
/
s4u
/
s4u_file.cpp
diff --git
a/src/s4u/s4u_file.cpp
b/src/s4u/s4u_file.cpp
index
8c90137
..
af4a32d
100644
(file)
--- a/
src/s4u/s4u_file.cpp
+++ b/
src/s4u/s4u_file.cpp
@@
-45,7
+45,7
@@
File::File(std::string fullpath, sg_host_t host, void* userdata) : path_(fullpat
pimpl_ =
simgrid::simix::kernelImmediate([this, st, path] { return new simgrid::surf::FileImpl(st, path, mount_point); });
pimpl_ =
simgrid::simix::kernelImmediate([this, st, path] { return new simgrid::surf::FileImpl(st, path, mount_point); });
-
on
Storage = st;
+
local
Storage = st;
}
File::~File()
}
File::~File()
@@
-55,28
+55,28
@@
File::~File()
sg_size_t File::read(sg_size_t size)
{
sg_size_t File::read(sg_size_t size)
{
- XBT_DEBUG("READ %s on disk '%s'", getPath(),
on
Storage->getCname());
+ XBT_DEBUG("READ %s on disk '%s'", getPath(),
local
Storage->getCname());
// if the current position is close to the end of the file, we may not be able to read the requested size
// if the current position is close to the end of the file, we may not be able to read the requested size
- sg_size_t read_size =
on
Storage->read(std::min(size, this->size() - this->tell()));
+ sg_size_t read_size =
local
Storage->read(std::min(size, this->size() - this->tell()));
pimpl_->incrPosition(read_size);
return read_size;
}
sg_size_t File::write(sg_size_t size)
{
pimpl_->incrPosition(read_size);
return read_size;
}
sg_size_t File::write(sg_size_t size)
{
- XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", getPath(),
on
Storage->getCname(), size, this->size());
+ XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", getPath(),
local
Storage->getCname(), size, this->size());
// If the storage is full before even starting to write
// If the storage is full before even starting to write
- if (
onStorage->getSizeUsed() >= on
Storage->getSize())
+ if (
localStorage->getSizeUsed() >= local
Storage->getSize())
return 0;
/* Substract the part of the file that might disappear from the used sized on the storage element */
return 0;
/* Substract the part of the file that might disappear from the used sized on the storage element */
-
on
Storage->decrUsedSize(this->size() - this->tell());
+
local
Storage->decrUsedSize(this->size() - this->tell());
- sg_size_t write_size =
on
Storage->write(size);
+ sg_size_t write_size =
local
Storage->write(size);
pimpl_->incrPosition(write_size);
pimpl_->setSize(this->tell());
pimpl_->incrPosition(write_size);
pimpl_->setSize(this->tell());
-
on
Storage->getContent()->erase(pimpl_->getName());
-
on
Storage->getContent()->insert({pimpl_->getName(), this->size()});
+
local
Storage->getContent()->erase(pimpl_->getName());
+
local
Storage->getContent()->insert({pimpl_->getName(), this->size()});
return write_size;
}
return write_size;
}