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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 A9FE8C433E0 for ; Tue, 9 Feb 2021 01:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AEDA64E42 for ; Tue, 9 Feb 2021 01:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230483AbhBIB6e (ORCPT ); Mon, 8 Feb 2021 20:58:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:35330 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbhBIB6a (ORCPT ); Mon, 8 Feb 2021 20:58:30 -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 393C6AB71; Tue, 9 Feb 2021 01:57:49 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 3145ADA7C8; Tue, 9 Feb 2021 02:55:56 +0100 (CET) Date: Tue, 9 Feb 2021 02:55:55 +0100 From: David Sterba To: Naohiro Aota Cc: linux-btrfs@vger.kernel.org, dsterba@suse.com, hare@suse.com, linux-fsdevel@vger.kernel.org, Johannes Thumshirn , Filipe Manana Subject: Re: [PATCH v15.1 43/43] btrfs: zoned: deal with holes writing out tree-log pages Message-ID: <20210209015555.GQ1993@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Naohiro Aota , linux-btrfs@vger.kernel.org, dsterba@suse.com, hare@suse.com, linux-fsdevel@vger.kernel.org, Johannes Thumshirn , Filipe Manana References: <20210205092635.i6w3c7brawlv6pgs@naota-xeon> <20210205145836.gtty4r6a4ftolehj@naota-xeon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210205145836.gtty4r6a4ftolehj@naota-xeon> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Fri, Feb 05, 2021 at 11:58:36PM +0900, Naohiro Aota wrote: > Since the zoned filesystem requires sequential write out of metadata, we > cannot proceed with a hole in tree-log pages. When such a hole exists, > btree_write_cache_pages() will return -EAGAIN. This happens when someone, > e.g., a concurrent transaction commit, writes a dirty extent in this > tree-log commit. > > If we are not going to wait for the extents, we can hope the concurrent > writing fills the hole for us. So, we can ignore the error in this case and > hope the next write will succeed. > > If we want to wait for them and got the error, we cannot wait for them > because it will cause a deadlock. So, let's bail out to a full commit in > this case. > > Signed-off-by: Naohiro Aota Inserted before the last patch, thanks.