From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8987FC433DB for ; Tue, 26 Jan 2021 18:39:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B1C522240 for ; Tue, 26 Jan 2021 18:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391221AbhAZRWJ (ORCPT ); Tue, 26 Jan 2021 12:22:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:37182 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730115AbhAZHEK (ORCPT ); Tue, 26 Jan 2021 02:04:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 95337AD4E; Tue, 26 Jan 2021 07:03:17 +0000 (UTC) Date: Mon, 25 Jan 2021 23:03:11 -0800 From: Davidlohr Bueso To: dsterba@suse.cz, Su Yue , linux-btrfs@vger.kernel.org, stable@vger.kernel.org, Erhard F , dave@stgolabs.net Subject: Re: [PATCH] btrfs: fix lockdep warning due to seqcount_mutex_init() with wrong address Message-ID: <20210126070311.wusdu3sfi6ywdrzb@offworld> References: <20210121113910.14681-1-l@damenly.su> <20210121170756.GE6430@twin.jikos.cz> <20210125165346.GM1993@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210125165346.GM1993@twin.jikos.cz> User-Agent: NeoMutt/20201120 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Mon, 25 Jan 2021, David Sterba wrote: >IMO it's not, though some kind of annotation could be useful. The patch >introducing the seqcount mutex does not mention any warning so it's >probably meant only for clarity of the lock nesting or maybe real-time >related as there are some comments regarding that in seqlock.h. That lockdep_assert_held() is just to verify the writer side is properly serialized. The real-time aspects here does not apply in that the mutex is always preemptible. > >Even for a dynamic allocation we'd need a way to synchronize setting the >variable, it could be possible, but the lockdep report needs to be >fixed. Right now I don't see another way than the revert. Agreed, let's revert this until a proper workaround is found. Thanks, Davidlohr