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
@@ -129,6 +129,11 @@ namespace Block {
|
||||
Genode::size_t *blk_size,
|
||||
Operations *ops) = 0;
|
||||
|
||||
/**
|
||||
* Synchronize with block device, like ensuring data to be written
|
||||
*/
|
||||
virtual void sync() = 0;
|
||||
|
||||
/**
|
||||
* Request packet-transmission channel
|
||||
*/
|
||||
@@ -146,7 +151,8 @@ namespace Block {
|
||||
|
||||
GENODE_RPC(Rpc_info, void, info, Genode::size_t *, Genode::size_t *, Operations *);
|
||||
GENODE_RPC(Rpc_tx_cap, Genode::Capability<Tx>, _tx_cap);
|
||||
GENODE_RPC_INTERFACE(Rpc_info, Rpc_tx_cap);
|
||||
GENODE_RPC(Rpc_sync, void, sync);
|
||||
GENODE_RPC_INTERFACE(Rpc_info, Rpc_tx_cap, Rpc_sync);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace Block {
|
||||
|
||||
Tx *tx_channel() { return &_tx; }
|
||||
Tx::Source *tx() { return _tx.source(); }
|
||||
void sync() { call<Rpc_sync>(); }
|
||||
|
||||
/*
|
||||
* Wrapper for alloc_packet, allocates 2KB aligned packets
|
||||
|
||||
Reference in New Issue
Block a user