On Thu, 10 Jan 2019 at 18:25, Stefan Hajnoczi <stefa...@gmail.com> wrote: > > On Wed, Jan 09, 2019 at 07:27:21PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji <xieyon...@baidu.com> > > > > This patchset is aimed at supporting qemu to reconnect > > vhost-user-blk backend after vhost-user-blk backend crash or > > restart. > > > > The patch 1 uses exisiting wait/nowait options to make QEMU not > > do a connect on client sockets during initialization of the chardev. > > > > The patch 2 introduces two new messages VHOST_USER_GET_INFLIGHT_FD > > and VHOST_USER_SET_INFLIGHT_FD to support providing shared > > memory to backend. > > Can you describe the problem that the inflight I/O shared memory region > solves? >
The backend need to get inflight I/O and do I/O replay after restart. Now we can only get used_idx in used_ring. It's not enough. Because we might not process descriptors in the same order which they have been made available sometimes. A simple example: https://patchwork.kernel.org/cover/10715305/#22375607. So we need a shared memory to track inflight I/O. Thanks, Yongji