Class ChunkTruncateOperation
Defined in File data.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public gkfs::data::ChunkOperation< ChunkTruncateOperation >
(Template Class ChunkOperation)
Class Documentation
-
class gkfs::data::ChunkTruncateOperation : public gkfs::data::ChunkOperation<ChunkTruncateOperation>
Chunk operation class for truncate operations.
Note, a truncate operation is a special case and forced to only use a single task.
Public Functions
-
explicit ChunkTruncateOperation(const std::string &path)
-
~ChunkTruncateOperation() = default
-
void truncate(size_t size)
Truncate request called by RPC handler function and launches a non-blocking tasklet.
- Parameters
size – GekkoFS file offset (NOT chunk file) to truncate to
- Throws
-
int wait_for_task()
Wait for the truncate tasklet to finish.
- Returns
Error code for success (0) or failure
Private Functions
-
void clear_task_args()
Resets the task_arg_ struct.
Private Static Functions
-
static void truncate_abt(void *_arg)
Exclusively used by the Argobots tasklet.
- Parameters
_arg – Pointer to input struct of type <chunk_truncate_args>. Error code<int> is placed into eventual to signal its failure or success.
Friends
- friend class ChunkOperation< ChunkTruncateOperation >
-
struct chunk_truncate_args
Struct for a truncate operation.
-
struct task_arg_
tasklet input struct
-
explicit ChunkTruncateOperation(const std::string &path)