ublksrv_tgt: exchange data between control and io task via pid file & json
io task and control task are run in different task space, so data can't
be shared easily.
Originally one shared memory file is created for this purpose, but it
isn't very handy to use:
1) there isn't generic format for communication, so hard to extend, such
as passing complicated target data, then json format is added
2) target device recovery needs target setting stored somewhere, since
ublk_drv doesn't store any target specific info, so resue pid file to
store whole device info with json format fits this requirement.
With this kind of change, we can remove shared memory communication
now.
Signed-off-by: Ming Lei <[email protected]>
4 files changed