From nobody Tue Apr 4 20:44:55 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 4PrfsJ1GK0z4493r; Tue, 4 Apr 2023 20:45:08 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PrfsH6gzbz4S00; Tue, 4 Apr 2023 20:45:07 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42d.google.com with SMTP id cm5so16472837pfb.0; Tue, 04 Apr 2023 13:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680641107; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iER6/rihj6jWMwFadeDYCrumwc+zjSNVLStH7+lDHwE=; b=kIGIPddfMCemwcI9IKgVUutRpxiNJSECzj9Pcl3kbRnDBLiZeZWOR0YgFLkd1YQaxk n+0THju9AWlnvwQDyO7TEZZtFbyh6RGkV3d4U5V1pWuHPrpeUZiQRCKLPSi2okNvGJs1 EHaiaX1rfWKPzFLaUJ85XPg398EOpXmqo0EkB6tE02EIQvw7sq1GalUMvaKDcFNScu76 646kheGQ3WcItKOReNh0daFhcUDh7rPHBGjXmjjkNgmKTSFojdryBTJWNtu2vogHDURt eeLfa0OIQCc+0kZ3XqM1spVJSnCotc/ALE+Z7/UpnWbLjOIty9SVbI8dzrEoavha20X9 um5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680641107; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iER6/rihj6jWMwFadeDYCrumwc+zjSNVLStH7+lDHwE=; b=BPGIz1Ly/CLBOMJiB1op1ELqJbRTg2JbMFULfBwqV4NfnPR7hZCHPOZIgLdmx3PNr2 6iQH4YN3b+ewYRTCFCPCsX7Nr75l5uq6Vmva7vQJrwwkK6XTloAgd6D1+nEaJDfHxuvY nYMNQy2C8gekfUY7V6r1Y0Bv7iNk/4Z6r+77ZMBOcub6zR+mSp0PEOd/xaFYx4YLludd l1RIDVVuZmY8bUmlwJ+eWMvTwKASrJ3kSFc17i0pF+8MMGlpv3IzeAcxha6ns5ul3jcN jRqnfYv/aNCMyX1cLKQesadW9/g5w+bb/cMHHjyyIANA9J51uEo5QtYigpKuCBYVCPYR HXcg== X-Gm-Message-State: AAQBX9dyPfetijVdoLhWmAfh0HchQ9FOHHIi6sYCFrJixjPvtooc4BUq FfmHNH0JhVI7oVhOAd3+HgqW7lPS0CopIvgpxg== X-Google-Smtp-Source: AKy350ZR/Fo4TmXMbhGKgYNIGg82fHJEkIMnNg7FXvi/Qt1DGrPAWuhzVPuUtCaybkvmQH8lM8/kYMN4i9vSdSpf+PA= X-Received: by 2002:a63:4f21:0:b0:514:1418:72f0 with SMTP id d33-20020a634f21000000b00514141872f0mr1182733pgb.0.1680641106684; Tue, 04 Apr 2023 13:45:06 -0700 (PDT) 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 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> In-Reply-To: <20230404123054.6cf5fb6b@slippy> From: Rick Macklem Date: Tue, 4 Apr 2023 13:44:55 -0700 Message-ID: Subject: Re: 8ee579abe09e - main - zfs: fall back if block_cloning feature is disabled To: Cy Schubert Cc: "Pokala, Ravi" , Martin Matuska , Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PrfsH6gzbz4S00 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Apr 4, 2023 at 12:31=E2=80=AFPM Cy Schubert 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. rick > > > > > Thanks, > > > > Ravi (rpokala@) > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > > =EF=BB=BF-----Original Message----- > > From: > on behalf of Cy Schubert > > > Organization: KOMQUATS > > Date: Tuesday, April 4, 2023 at 09:18 > > To: Martin Matuska > > > Cc: Rick Macklem >, Mateusz Guzik >, >, >, > > > Subject: Re: git: 8ee579abe09e - main - zfs: fall back if block_cloning= feature is disabled > > > > > > On Tue, 4 Apr 2023 17:30:25 +0200 > > Martin Matuska > wrote: > > > > > > > So I am now a little bit confused - what is the consensus? :-) > > > > > > My exmh email client made a mess of that. Let's try this again. > > > > > > Rick has posted a patch. Your patch should also be incorporated to work > > around other EXDEV errors, but a few lines earlier so it is protected b= y > > the lock. > > > > > > There were a couple of typos in Rick's patch (a missing keystroke; > > s/ojset/objset/). > > > > > > The patch (Rick's null pointer dereference fix, Rick's copy file range > > patch plus your copy file range patch) builds fine on amd64 and i386. > > Installing and testing it now. > > > > > > A combination of all three patches is attached. It's compile tested but= is > > currently being installed and will be tested when install is completed. > > > >