From nobody Mon Sep 18 22:01:53 2023 X-Original-To: stable@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 4RqJfq5p7Vz4tpSv for ; Mon, 18 Sep 2023 22:01:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqJfq46tVz3G9d for ; Mon, 18 Sep 2023 22:01:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695074515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yoee9yRerSQ5Cknvvc4haJpH34Gh6xa8Y0fecK5JyfA=; b=Uo7/8KiXmJ+z5PNWEw5CDUzwFdqAK8hONv6oGSiLsn4sQaB9JSCrjSn7ekDGN6cA+U7xXi 1MIbJrslPoA5/9eb+xKopWvV0D0AkEdC9t8KlCUw+FueA64IUYtUvh3n0TolQUysYo2/NW bwkl3UqMvCCEcoiP0KmhljUeyiti5nRt+Em/4xi9kZrPYM4k6/ms3nrAPVQTpWKixvvhIJ BnU1OfG1zcqaQd41uTJCvssyEXED7OktWHhQBMsPToMbLlv3TncAaexJEO7gSwVFSJgty3 gq0TCwhCBEs+dKcoFhliWG8qy3mBv1F8pevJXKlpy6pb84YKD02Zi7PsfMjNvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695074515; a=rsa-sha256; cv=none; b=DuGCs0bjQNhTRJCP+nanA2z8kVPhID7ZgyygilUA96zRY+ethYU4Gaj+F6z62pn0Tpc2PS LxZ3K+xxW7xyujwKRTBaMS2Gi9HvlkW9flr46/K3Qh/vq5Ib9PVvGSg6kH0Dng8KaICSjv zw7DfUGvFinidd7cSln9dFveOqINHnUY8Q3cZilmrLKQnLWcADUtOS+AtlfpQ/XtrN9bVn WDcVfu95Dg1pc0dunJKTE7NqngWZggZVlA+/VhydlmtVNVFokdEQ1FcphIDVBlK2krKdy/ 9jYrY4RS5Ba6wdxHd2GkTjE4QfIRvFjjEXT4d9QAtnYXxvXJaVKtz8ROQpICGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695074515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yoee9yRerSQ5Cknvvc4haJpH34Gh6xa8Y0fecK5JyfA=; b=QTyGqhLMB6IgxrpFaZYRvWDxCTCfUnEM9SE17v/53aAPEUMmTI3FfZwl5CEbHzZhf6oibm 0ms3orycCi/NRnvb8UGxXHA0xcrUHvjUzYV86Hn3DaxyXKcc7NHtEsVIrc6ssscRcOnWpJ sXZToQMCinBHeZKUkcxOPqsNgHB+0NWpmRIkA9vqiIGCI1YRC0/ZsujVTvZ3u4Je4JKnbQ S73+UesBANbNXnKJecLYBQ2pFGPV5N/P4ZjsQ8eL/w64YF7oSwyVA02IRDhBZ2QtuA3D32 3f+hbuCKd4Ir+ZLaGKCLGDmdQ3qAz14spdbC1w5msNO9xW5Mw3V9y/Sn3eMYcg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (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 did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RqJfq244Lz1PCW for ; Mon, 18 Sep 2023 22:01:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Mon, 18 Sep 2023 17:01:53 -0500 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: vfs.zfs.bclone_enabled (was: FreeBSD 14.0-BETA2 Now Available) Content-Language: en-US To: stable@freebsd.org References: <20230916002831.GU52318@FreeBSD.org> <02c53c2e-127b-33b4-e13d-f6f6589dd5fe@gmail.com> <7a6692de-f096-637d-fe48-d5fb93e54f8b@FreeBSD.org> <8e4e4000-4680-0550-6772-32a6a3101761@FreeBSD.org> <20230918202204.28e21a011a0a98e3fcda9f3a@dec.sakura.ne.jp> <20230919063720.e1e0b449863f2860ace51376@dec.sakura.ne.jp> From: Kyle Evans In-Reply-To: <20230919063720.e1e0b449863f2860ace51376@dec.sakura.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/18/23 16:37, Tomoaki AOKI wrote: > At least, if I read the code correctly, > "com.fudosecurity:block_cloning", > should be added to array > *features_for_read[] > of stand/libsa/zfs/zfsimpl.c. > > There are check codes like below, so without it, boot codes would > reject to boot from any pool having block_cloning feature enabled. > Am I missing something? > >> for (i = 0; features_for_read[i] != NULL; i++) { >> if (memcmp(nvp_name->nv_data, > features_for_read[i], nvp_name->nv_size) == 0) { >> found = 1; >> break; >> } >> } >> >> if (!found) { >> printf("ZFS: unsupported feature: %.*s\n", >> nvp_name->nv_size, nvp_name->nv_data); >> rc = EIO; >> } > > Regards. > I'm pretty sure what he's trying to tell you is that this feature won't show up in the list to be compared against this in the first place. Presumably the inquiry it uses either just looks for `ZFEATURE_FLAG_MOS` or filters out `ZFEATURE_FLAG_READONLY_COMPAT`, which is described as: 90 /* Can open pool readonly even if this feature is not supported. */ Thanks, Kyle Evans > > On Mon, 18 Sep 2023 09:26:56 -0400 > Alexander Motin wrote: > >> block_cloning feature is marked as READONLY_COMPAT. It should not >> require any special handling from the boot code. >> >> On 18.09.2023 07:22, Tomoaki AOKI wrote: >>> Really OK? >>> >>> I cannot find block_cloning in array *features_for_read[] of >>> stand/libsa/zfs/zfsimpl.c, which possibly mean boot codes (including >>> loader) cannot boot from Root-on-ZFS pool having block_cloning active. >>> >>> Not sure adding '"com.fudosecurity:block_cloning",' here is sufficient >>> or not. Possibly more works are needed. >>> >>> IMHO, all default-enabled features should be safe for booting. >>> Implement features with disalded, impement boot codes to support them, >>> then finally enable them by default should be the only valid route. >>> >>> >>> [1] https://cgit.freebsd.org/src/tree/stand/libsa/zfs/zfsimpl.c >>> >>> >>> On Mon, 18 Sep 2023 07:31:46 +0200 >>> Martin Matuska wrote: >>> >>>> I vote for enabling block cloning on main :-) >>>> >>>> mm >>>> >>>> On 16. 9. 2023 19:14, Alexander Motin wrote: >>>>> On 16.09.2023 01:25, Graham Perrin wrote: >>>>>> On 16/09/2023 01:28, Glen Barber wrote: >>>>>>> o A fix for the ZFS block_cloning feature has been implemented. >>>>>> >>>>>> Thanks >>>>>> >>>>>> I see >>>>>> , >>>>>> with >>>>>> >>>>>> in stable/14. >>>>>> >>>>>> As vfs.zfs.bclone_enabled is still 0 (at least, with 15.0-CURRENT >>>>>> n265350-72d97e1dd9cc): should we assume that additional fixes, not >>>>>> necessarily in time for 14.0-RELEASE, will be required before >>>>>> vfs.zfs.bclone_enabled can default to 1? >>>>> >>>>> I am not aware of any block cloning issues now.  All this thread about >>>>> bclone_enabled actually started after I asked why it is still >>>>> disabled. Thanks to Mark Millard for spotting this issue I could fix, >>>>> but now we are back at the point of re-enabling it again.  Since the >>>>> tunable does not even exist anywhere outside of FreeBSD base tree, I'd >>>>> propose to give this code another try here too.  I see no point to >>>>> have it disabled at least in main unless somebody needs time to run >>>>> some specific tests first. >>> >> >> -- >> Alexander Motin >