summaryrefslogtreecommitdiff
path: root/src/vhost_user/slave_fs_cache.rs
AgeCommit message (Collapse)Author
2021-03-03Fix clippy erros and warningsKeiichi Watanabe
Make `cargo clippy --all-features --all-targets` pass. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-03-01vhost_user: add more negative unit test casesLiu Jiang
Add more negative unit test cases to improve code coverage. Also add two helper functions to simplify code. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-03-01vhost_user: refine the SlaveFsCacheReq structLiu Jiang
Refine the SlaveFsCacheReq struct by: 1) honoring the negotiation result of VHOST_USER_PROTOCOL_F_REPLY_ACK, 2) better documentation, 3) adding unit test cases. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2020-09-04vhost-user: preserve master req handler's resultEryu Guan
HandlerResult is mapped to either 0 or 1 in send_ack_message() and the actual result (e.g. fs_slave_io()'s I/O count or error number) is lost when sending result back to slave. And slave doesn't know how much data has been read/written nor the real error. Fix it by perserving the real result and send it back to slave in send_ack_message(). Fixes: #15 Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2020-09-04vhost-user: add SlaveFsCacheReq handle map/unmapLiu Bo
This introduces SlaveFsCacheReq which implements VhostUserMasterReqHandler to handle map/unmap requests. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>