Re: [PATCH] hw/nvme: fix control flow statement

2022-04-15 Thread Dmitry Tikhov
On Fri, Apr 15, 2022 at 21:42:05, Klaus Jensen wrote: > On Apr 15 13:35, Keith Busch wrote: > > On Fri, Apr 15, 2022 at 10:27:21PM +0300, Dmitry Tikhov wrote: > > > Since there is no else after nvme_dsm_cb invocation, metadata associated > > > with non-zero block range is currently zeroed. Also thi

[PATCH] hw/nvme: fix control flow statement

2022-04-15 Thread Dmitry Tikhov
Since there is no else after nvme_dsm_cb invocation, metadata associated with non-zero block range is currently zeroed. Also this behaviour leads to segfault since we schedule iocb->bh two times. First when entering nvme_dsm_cb with iocb->idx == iocb->nr and second on call stack unwinding by callin

Re: [PATCH] hw/nvme: fix control flow statement

2022-04-15 Thread Klaus Jensen
On Apr 15 23:23, Dmitry Tikhov wrote: > On Fri, Apr 15, 2022 at 21:42:05, Klaus Jensen wrote: > > On Apr 15 13:35, Keith Busch wrote: > > > On Fri, Apr 15, 2022 at 10:27:21PM +0300, Dmitry Tikhov wrote: > > > > Since there is no else after nvme_dsm_cb invocation, metadata associated > > > > with no

Re: [PATCH] hw/nvme: fix control flow statement

2022-04-15 Thread Klaus Jensen
On Apr 15 13:35, Keith Busch wrote: > On Fri, Apr 15, 2022 at 10:27:21PM +0300, Dmitry Tikhov wrote: > > Since there is no else after nvme_dsm_cb invocation, metadata associated > > with non-zero block range is currently zeroed. Also this behaviour leads > > to segfault since we schedule iocb->bh t

Re: [PATCH] hw/nvme: fix control flow statement

2022-04-15 Thread Keith Busch
On Fri, Apr 15, 2022 at 10:27:21PM +0300, Dmitry Tikhov wrote: > Since there is no else after nvme_dsm_cb invocation, metadata associated > with non-zero block range is currently zeroed. Also this behaviour leads > to segfault since we schedule iocb->bh two times. First when entering > nvme_dsm_cb