Am 10.12.2018 um 13:14 hat Denis Plotnikov geschrieben: > >> @@ -491,9 +506,17 @@ int64_t aio_compute_timeout(AioContext *ctx); > >> */ > >> static inline void aio_disable_external(AioContext *ctx) > >> { > >> + aio_context_acquire(ctx); > >> atomic_inc(&ctx->external_disable_cnt); > >> + aio_context_release(ctx); > >> } > > > > This acquire/release pair looks rather useless? > > I'm not sure that I understand everything correctly... > but can a thread (context) try to disable external in another context?
Yes, that can happen. For example, think of bdrv_drain_all(). Kevin