On 10/01/2018 19:33, Stefan Hajnoczi wrote: >> + >> + /* Fields protected by @lock */ > Does this lock serve any purpose? I didn't see a place where these > fields is accessed from multiple threads. Perhaps you're trying to > prepare for multiqueue, but then other things like the > BDRVNVMeState->inflight counter aren't protected so it doesn't make > sense. >
Other drivers are already thread safe (e.g. block/vdi.c since commit 1e88663979, "vdi: make it thread-safe", 2017-07-17). So I'd be in favor of (fixing and) keeping the lock. Paolo