Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp849499rwl; Fri, 7 Apr 2023 06:29:16 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3wcA/p5etD4BU/RbwtqE+cMRmt98e98bD2dphJ0IfIYD6YlimlenW1utpg+IBGGv2wlut X-Received: by 2002:a17:90b:4b0a:b0:23f:10ee:feef with SMTP id lx10-20020a17090b4b0a00b0023f10eefeefmr2627138pjb.19.1680874156126; Fri, 07 Apr 2023 06:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680874156; cv=none; d=google.com; s=arc-20160816; b=p6pttArmZT5SliSjUe0TCScAa0gZa99nVvOGmIt38FlJXNt+N+9SiE/aT9XpUFrswS BsepBr6lfhE3MYpmMVd6zN3pfV6zD9TXO1hsqvvoCb5ZPJhRGxB67cbmdQIGqr95Neqg yraRu/k1PPUFv0ycUrbmrPBWDG23z7mM6gM6Zfqtj4fSSMwtwcmDN79Ra/nRUQ7OatBh 0xfPq/XDCMbPfWJQxxpl++lbpmeJeHd2F1XZet7pl1K87t+WkWtVpvCz+R3mc31sC3es kSuvUymubtMo4jZ6xKw/569m00oOMPFwMQjUVO2H6yoW0TS73LyKGStwNznLaZNvthvL HjyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XKDIBL9ZgU2suXqR2LBWE+OsH1u5fAyap/1Lc5R3SHE=; b=ZUWOXLwaFws+JZD8Wbkn0oafhdTW8FvhXFY24CP+Rvq9o6kCFG4JGQRlQgI2FDtzja UxxQxbvenXP+48ZzdOxh7XLxv5KjcbgXzmrao4voaW0qa+LXDE13RGbVnimrpR6q72Ub OywrmEicRyEy3HwaLH+zUSeCw4EWM60gpJZf51WewAgRUXwTWcIk/nZuAmzdSzbqC6Js DHyOKvL4B54N0rMLnCK1WZ1rTTzZSoJZoRfqqLfBbO7wQ2mGWKn85K7p2teEgJZteRjk OzxSMcSYsovqeVNezTJT6lx93A+Yin5XeSHd5Bueaj7afpciFXME0+uBOm38SS08nTBN lQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e2RvxqHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a17090a5d9100b0023b4158aaf1si3553957pji.62.2023.04.07.06.28.56; Fri, 07 Apr 2023 06:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e2RvxqHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240464AbjDGNZF (ORCPT + 99 others); Fri, 7 Apr 2023 09:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbjDGNZD (ORCPT ); Fri, 7 Apr 2023 09:25:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF4D7A8F for ; Fri, 7 Apr 2023 06:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680873856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XKDIBL9ZgU2suXqR2LBWE+OsH1u5fAyap/1Lc5R3SHE=; b=e2RvxqHU1xxpr0Il5yKiEDwwGxzThIG73ynsWA/IIyhwUTQReVkRJdM9s09ZQxo2QHzT8b W+PxKk4vAGJ+map3G6c2098CCSD+Kmv2fgO1AnP86EYfmvqyU8rZ4YFfkBITS/bSN6Tkyx rETZ1/9CKB4GHyaFDWexdHMWFGs9/0o= Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-529-5uAmcJyBN6SOg5RjpZR_kg-1; Fri, 07 Apr 2023 09:24:14 -0400 X-MC-Unique: 5uAmcJyBN6SOg5RjpZR_kg-1 Received: by mail-io1-f70.google.com with SMTP id d204-20020a6bb4d5000000b00758cfdd36c3so25890216iof.0 for ; Fri, 07 Apr 2023 06:24:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680873854; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XKDIBL9ZgU2suXqR2LBWE+OsH1u5fAyap/1Lc5R3SHE=; b=6Niq4JdEbkXrW+hkEKwsd7dz2ulk6H0asuL4iBBX9svRsj85Kc+YPI+n4OebBX78Z9 tVmDFxXGVDFdIfZqSmlwRKIWO9Da4IfHj1rrbG1PiuZ3do2viGWI9BGzzSXt7j9B+Nz8 qzlGtoW2++mK35/ANGsdszg/2LZhf0iI1nDvI/jxCVlrCR125D+SMcz4O/WKOl2THmzb hnFJOnTPP1IfZt8nm65LDOH1xqhfhZqq8gU1G0fVamc3S2KaE6EnT0XNG+YlPscnXyPs HCyWA5GfNBAQ5AFmt3o9y4YqlaOptayXh8xNtLscNS5RRMENpRm8bmADVyMAmHOBxNyr htow== X-Gm-Message-State: AAQBX9deRYcemIRwGMkzINn1yTFvrLt7GAB3Sgiq7z6qhHbYMUix52AJ 8npJs/Gu0XV3LMnP9bXlRZUrUxY1tgz7vK4/YcCmdDCdjxkIU3meKMR/jcKVF1Dael61P1OqBsa x0xp06prYnwJUhwAsQiDfEpIX X-Received: by 2002:a92:c534:0:b0:325:ce6b:fc88 with SMTP id m20-20020a92c534000000b00325ce6bfc88mr1409786ili.9.1680873854111; Fri, 07 Apr 2023 06:24:14 -0700 (PDT) X-Received: by 2002:a92:c534:0:b0:325:ce6b:fc88 with SMTP id m20-20020a92c534000000b00325ce6bfc88mr1409775ili.9.1680873853862; Fri, 07 Apr 2023 06:24:13 -0700 (PDT) Received: from [10.0.0.146] (sandeen.net. [63.231.237.45]) by smtp.gmail.com with ESMTPSA id x6-20020a923006000000b0031798b87a14sm988373ile.19.2023.04.07.06.24.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Apr 2023 06:24:13 -0700 (PDT) Message-ID: <3eaa1264-2ab4-fd1d-8871-47c2414cbc29@redhat.com> Date: Fri, 7 Apr 2023 08:24:12 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] xfs: Use for_each_perag() to iterate all available AGs To: Ryosuke Yasuoka , Eric Sandeen Cc: djwong@kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230404084701.2791683-1-ryasuoka@redhat.com> Content-Language: en-US From: Eric Sandeen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/6/23 11:03 AM, Ryosuke Yasuoka wrote: > Eric, > > I failed to reply to you since I got some mistakes. > Let me re-send my reply just in case. > > Thank you for reviewing my requests. > >> Can you explain what goes wrong if it is zero? Is there a test for this? >> >> If it's a general problem, what if the other 2 callers pass in the variable >> start_agno with a value of 0? > Sorry I couldn't prepare any tests to confirm what happens if it is zero > because it is a kind of general problem. > > IIUC, passing zero to for_each_perag_wrap() is not problematic. ... > OTOH, since we have already a for_each_perag() macro, which just iterates all AG > from 0 and doesn't wrap, I think it is simpler to use for_earch_perag(). > > Regards, > Ryosuke Ok - I couldn't tell from the original email if this was a bugfix or a cleanup, and wanted to be sure. Thanks! -Eric