Re: [PATCH v2 6/6] libvduse: Add support for reconnecting

2022-03-15 Thread Yongji Xie
On Tue, Mar 15, 2022 at 9:48 PM Stefan Hajnoczi wrote: > > On Tue, Feb 15, 2022 at 06:59:43PM +0800, Xie Yongji wrote: > > +static int vduse_queue_inflight_get(VduseVirtq *vq, int desc_idx) > > +{ > > +vq->log->inflight.desc[desc_idx].counter = vq->counter++; > > +vq->log->inflight.desc[de

Re: [PATCH v2 6/6] libvduse: Add support for reconnecting

2022-03-15 Thread Stefan Hajnoczi
On Tue, Feb 15, 2022 at 06:59:43PM +0800, Xie Yongji wrote: > +static int vduse_queue_inflight_get(VduseVirtq *vq, int desc_idx) > +{ > +vq->log->inflight.desc[desc_idx].counter = vq->counter++; > +vq->log->inflight.desc[desc_idx].inflight = 1; Is a barrier needed between these two lines t

[PATCH v2 6/6] libvduse: Add support for reconnecting

2022-02-15 Thread Xie Yongji
To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji --- block/export/vduse-