From nobody Tue Apr 4 20:53:19 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Prg2t24jfz449Ph; Tue, 4 Apr 2023 20:53:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Prg2r6Vyxz4Sl1; Tue, 4 Apr 2023 20:53:24 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id jiKmpvksFjvm1jneepkGg3; Tue, 04 Apr 2023 20:53:24 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id jneapbfBd3fOSjnecpLzbg; Tue, 04 Apr 2023 20:53:24 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=642c8e44 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=dKHAf1wccvYA:10 a=hF2rLc1pAAAA:8 a=cOLrLDMxAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=xJ719ULDljcP4xed_N4A:9 a=CjuIK1q_8ugA:10 a=O9OM7dhJW_8Hj9EqqvKN:22 a=P0s3qUPvOpV5zndjNR8V:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 430BF4AC; Tue, 4 Apr 2023 13:53:20 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 0D805141; Tue, 4 Apr 2023 13:53:19 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Rick Macklem cc: Cy Schubert , "Pokala, Ravi" , Martin Matuska , Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: 8ee579abe09e - main - zfs: fall back if block_cloning feature is disabled In-reply-to: References: <202304041145.334Bjx6l035872@gitrepo.freebsd.org> <20230404141717.B976D31C@slippy.cwsent.com> <98c71e6f-5b48-79f3-e7b0-95d674949624@FreeBSD.org> <20230404091844.639cb1c1@slippy> <5B7F71CC-5BE6-4938-A29E-E10B01A4E4ED@panasas.com> <20230404123054.6cf5fb6b@slippy> Comments: In-reply-to Rick Macklem message dated "Tue, 04 Apr 2023 13:44:55 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Apr 2023 13:53:19 -0700 Message-Id: <20230404205320.0D805141@slippy.cwsent.com> X-CMAE-Envelope: MS4xfASnUkROGZfOoqOJyPzrcMdpwtk9EHEF3yBoeQ2AVYE5e0a3b606JfCuhZ///QyQvHSeXMwVZ09Of5o29a45vdLJLDvrd8b93CMrU2ihrsuJcCCYmzrp HuuSDSw0LY09jHFn7MTYMtJp38nIqe0cnk3HaDikjo7jxdoRU6dQ4WqvRhl6VvsJKthDg6SdifkuOCujCGXtNfyZaVSxO4k+PlTmhnbyA2a5xNY7hnaCDU2X FzoB0dRn1zuNpeJcXia69tE7wGxrvI5kw9muy0ZMGfMnmRRU4V2N4mlLH8TkWEBRXwZiKqv4HXN7XzHx1eCFcapFrwo7dXji26pq8EWdN1Jr8JZ/A2jvm40K MWewkuWyHNb71AHGmtGqIdmbs9osmZex/BSX3db5yUPD6evhvVBixcokvtcuHpWEYD7r2RY7 X-Spamd-Result: default: False [3.20 / 15.00]; R_BAD_CTE_7BIT(3.50)[7bit]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[3.97.99.33:from]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; FREEMAIL_CC(0.00)[cschubert.com,panasas.com,freebsd.org,gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCPT_COUNT_SEVEN(0.00)[8]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; GREYLIST(0.00)[pass,meta]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com] X-Rspamd-Queue-Id: 4Prg2r6Vyxz4Sl1 X-Spamd-Bar: +++ X-ThisMailContainsUnwantedMimeParts: N In message , Rick Macklem writes: > On Tue, Apr 4, 2023 at 12:31=E2=80=AFPM Cy Schubert com> wrote: > > > > CAUTION: This email originated from outside of the University of Guelph. = > Do not click links or open attachments unless you recognize the sender and = > know the content is safe. If in doubt, forward suspicious emails to IThelp@= > uoguelph.ca > > > > > > On Tue, 4 Apr 2023 17:54:28 +0000 > > "Pokala, Ravi" wrote: > > > > > Cy, > > > > > > The patch adds 'bool done_outvp', unconditionally sets it to 'true', an= > d then later has a check for 'if (!done_outvp)'. Since there is no interven= > ing place where 'done_outvp' could be set to 'false', that check will never= > succeed and that branch is unreachable. > > > > It's set to false at line 6454, in the loop locking vnodes. > > > > > > > > Or am I mis-reading something? > > > > Maybe Rick can explain but all we're doing is ensuring that the first > > part of the loop is executed only first time through. We could invert it > > and save setting it to false every loop. > Yep. All I did was copy the first lines in the loop up to before the loop > so that it would be done once to lock outvp before the check on it. > The bool just avoids doing those lines for the first loop iteration. > > And, yes, you could reorganize the loop to avoid using the bool > to skip the lines on the first iteration, but I think the code would be > more confusing with the loop reorganized. > However, if someone wants to re-write it, I have no problem with that. Agreed. Having looked at refactoring it, what did result was more confusing with no meaningful saving of cycles spent. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0