mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 22:58:26 +00:00
block_session: extend interface with sync() call
To support components, which implement the block session's server side rpc object, and which doesn't write data to their device backend immediately, an additional synchronization call is needed. Thereby, clients like for instance a file system can tell these components, when a synchronization is required. Ref #113
This commit is contained in:
committed by
Norman Feske
parent
44c7d64fb3
commit
50d73e7890
@ -35,7 +35,7 @@ namespace Partition {
|
||||
Partition *partition(int num) { return (num < MAX_PARTITIONS) ? _part_list[num] : 0; }
|
||||
size_t blk_size() { return _blk_size; }
|
||||
inline unsigned long max_packets() { return (MAX_PACKET_SIZE / _blk_size); }
|
||||
|
||||
void sync() { _blk.sync(); }
|
||||
|
||||
/**
|
||||
* Partition table entry format
|
||||
|
@ -137,6 +137,8 @@ namespace Block {
|
||||
ops->set_operation(Packet_descriptor::WRITE);
|
||||
}
|
||||
|
||||
void sync() { Partition::sync(); }
|
||||
|
||||
Partition::Partition *partition() { return _partition; }
|
||||
};
|
||||
|
||||
|
@ -72,6 +72,11 @@ namespace Partition {
|
||||
* Returns block size of back end
|
||||
*/
|
||||
Genode::size_t blk_size();
|
||||
|
||||
/**
|
||||
* Synchronize with backend device
|
||||
*/
|
||||
void sync();
|
||||
}
|
||||
|
||||
#endif /* _PART_BLK_H_ */
|
||||
|
@ -173,6 +173,8 @@ namespace Block {
|
||||
*blk_size = _block_size;
|
||||
ops->set_operation(Block::Packet_descriptor::READ);
|
||||
}
|
||||
|
||||
void sync() {}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user