Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

From: Bart Van Assche
Date: Tue Feb 26 2019 - 12:48:17 EST


On Tue, 2019-02-26 at 18:24 +-0100, Peter Zijlstra wrote:
+AD4 On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote:
+AD4 +AD4 +AEAAQA -472,7 +-473,8 +AEAAQA struct blk+AF8-flush+AF8-queue +ACo-blk+AF8-alloc+AF8-flush+AF8-queue(struct request+AF8-queue +ACo-q,
+AD4 +AD4 if (+ACE-fq)
+AD4 +AD4 goto fail+ADs
+AD4 +AD4
+AD4 +AD4 - spin+AF8-lock+AF8-init(+ACY-fq-+AD4-mq+AF8-flush+AF8-lock)+ADs
+AD4 +AD4 +- lockdep+AF8-register+AF8-key(+ACY-fq-+AD4-key)+ADs
+AD4 +AD4 +- spin+AF8-lock+AF8-init+AF8-key(+ACY-fq-+AD4-mq+AF8-flush+AF8-lock, +ACY-fq-+AD4-key)+ADs
+AD4
+AD4 What's wrong with:
+AD4
+AD4 spin+AF8-lock+AF8-init(+ACY-fq-+AD4-wq+AF8-flush+AF8-lock)+ADs
+AD4 lockdep+AF8-register+AF8-key(+ACY-fq-+AD4-key)+ADs
+AD4 lockdep+AF8-set+AF8-class(+ACY-fq-+AD4-wq+AF8-flush+AF8-lock, +ACY-fq-+AD4-key)+ADs
+AD4
+AD4 ?

Hi Peter,

That's an approach that I had not yet considered. I'm fine with the
lockdep+AF8-set+AF8-class() version.

Bart.