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 C1FC8C64EC4 for ; Thu, 9 Mar 2023 15:21:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjCIPVM (ORCPT ); Thu, 9 Mar 2023 10:21:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjCIPVK (ORCPT ); Thu, 9 Mar 2023 10:21:10 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89A16E683C for ; Thu, 9 Mar 2023 07:21:09 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id F03C368AA6; Thu, 9 Mar 2023 16:21:06 +0100 (CET) Date: Thu, 9 Mar 2023 16:21:06 +0100 From: Christoph Hellwig To: Johannes Thumshirn Cc: Christoph Hellwig , Chris Mason , Josef Bacik , David Sterba , "linux-btrfs@vger.kernel.org" Subject: Re: [PATCH 03/20] btrfs: merge verify_parent_transid and btrfs_buffer_uptodate Message-ID: <20230309152106.GC17952@lst.de> References: <20230309090526.332550-1-hch@lst.de> <20230309090526.332550-4-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 Thu, Mar 09, 2023 at 11:17:47AM +0000, Johannes Thumshirn wrote: > On 09.03.23 10:07, Christoph Hellwig wrote: > > verify_parent_transid is only called by btrfs_buffer_uptodate, which > > confusingly inverts the return value. Merge the two functions and > > reflow the parent_transid so that error handling is in a branch. > > This would be a good chance to make btrfs_buffer_uptodate() a bool > function. It still can return 0/1/-EAGAIN.