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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F092FC05027 for ; Fri, 20 Jan 2023 08:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbjATIOC (ORCPT ); Fri, 20 Jan 2023 03:14:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjATIN5 (ORCPT ); Fri, 20 Jan 2023 03:13:57 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5756B891EC for ; Fri, 20 Jan 2023 00:13:47 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 2E4D168D07; Fri, 20 Jan 2023 09:13:43 +0100 (CET) Date: Fri, 20 Jan 2023 09:13:42 +0100 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs: the raid56 code does not need irqsafe locking Message-ID: <20230120081342.GA27851@lst.de> References: <20230120074657.1095829-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Fri, Jan 20, 2023 at 04:05:07PM +0800, Qu Wenruo wrote: > And thanks to the patch, I exposed that for read/write endio, we lacks > spinlocks for bitmap operations. > > As we still have chances to have multiple bios for the same stripe, and > bitmap operations themselves are not atomic. So, bitmap_set is indeed not atomic. But if you switch to the set_bit that should be enough here.