lkml.org 
[lkml]   [2019]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint
From
Date
On Tue, 2019-02-26 at 18:24 +0100, Peter Zijlstra wrote:
> On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote:
> > @@ -472,7 +473,8 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
> > if (!fq)
> > goto fail;
> >
> > - spin_lock_init(&fq->mq_flush_lock);
> > + lockdep_register_key(&fq->key);
> > + spin_lock_init_key(&fq->mq_flush_lock, &fq->key);
>
> What's wrong with:
>
> spin_lock_init(&fq->wq_flush_lock);
> lockdep_register_key(&fq->key);
> lockdep_set_class(&fq->wq_flush_lock, &fq->key);
>
> ?

Hi Peter,

That's an approach that I had not yet considered. I'm fine with the
lockdep_set_class() version.

Bart.

\
 
 \ /
  Last update: 2019-02-26 18:48    [W:0.158 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site