From nobody Tue Sep 19 00:05:37 2023 X-Original-To: freebsd-current@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 4RqMPd4401z4txjd for ; Tue, 19 Sep 2023 00:05:41 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (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 4RqMPd2MDbz3WJH for ; Tue, 19 Sep 2023 00:05:41 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-d7b79a4899bso4660638276.2 for ; Mon, 18 Sep 2023 17:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695081939; x=1695686739; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=jP+YgjcbHfAIqTYLHFe8o3NE/Lh6F7DyXfMsSv3f/WY=; b=aCMY8PPLJ/eX1uMKPfDfYAD5JSmhlvG7imKqs/9JxSvJbpamOg8I9AZ4irihbTg2f/ 0NRUu3TzzzsOpEBimJc39B7SiwuMnbWJ9tPW3NtaTonJLlhHyYepD43ALAI5B9fOmPLY MasD38+MNbxqhJv2mJakdokI72QrNgu/znAu2eCCFW+Z6l8zKVXJMHb62L4eRpItsdOm CbHPUKmmjFlAmCcKPiPQk2vPU39brvvGzhzXrCh/kM9Khd/BCco4amEMiQZVNMkNinZN j4yPvJIVGiSJtFTjUxLtQ7VcUnrPFHt19PAJkr0ZokVJ65jtGNTGiyC49Qy3Wl0fpMXB H6kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695081939; x=1695686739; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jP+YgjcbHfAIqTYLHFe8o3NE/Lh6F7DyXfMsSv3f/WY=; b=f9Cvdxu2F6/Y+KJyGpA7EPaXfPpHjH9g1lFeWptTlRKfHfsGASlTCJUg2agWLNFRHm mfz7AtpK/nDNEN2wWys08e9g7Eoj3Y93vULcBjg2rpjusb0QG4yJLQa0O1lnlwaNn690 ebdVkDF7A+qi4598r8wWB6VOx40F9HPQM8bNfsaBKGhMRLrM6CRzpbvXuugMvwXqetVE 5aw0mXmluQHtYHmq5PIFusoBKumyzeUrVsX4oydrrGZ59W0jixY5oqeNM0pfv6Rs2DXX 84J93tmiqNxoR0T04ft26RY223YWRk79GOCtwM5wim7eNtljxDgMtJPAJAqsPg/zVr1Z SIFQ== X-Gm-Message-State: AOJu0YzR3fx7EoLkHfMlEX+Zo2g42FaE/05B83SHharTddw758lgM7YI bwrv/skwMYK17TkR1WQ7tqgNu5aS04c3HA== X-Google-Smtp-Source: AGHT+IGGC58R4QTLTyoULiQoPdhpVLFfm+NZyEhpp71Mf2qB0M6Aaxt6nEAvrGtitZl8LeTsk5Bcdw== X-Received: by 2002:a25:e010:0:b0:d09:544a:db1b with SMTP id x16-20020a25e010000000b00d09544adb1bmr10112274ybg.34.1695081939243; Mon, 18 Sep 2023 17:05:39 -0700 (PDT) Received: from [192.168.1.66] (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id a39-20020a25ae27000000b00d8144f0b287sm937185ybj.63.2023.09.18.17.05.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 17:05:38 -0700 (PDT) Message-ID: Date: Mon, 18 Sep 2023 20:05:37 -0400 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: vfs.zfs.bclone_enabled (was: FreeBSD 14.0-BETA2 Now Available) [block_cloning and zilsaxattr missing from loader's features_for_read] Content-Language: en-US To: Mark Millard , Current FreeBSD , Warner Losh References: <5C769ACC-F264-4BAB-AF7B-8C463A4BD99E@yahoo.com> From: Alexander Motin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RqMPd2MDbz3WJH On 18.09.2023 19:21, Mark Millard wrote: > On Sep 18, 2023, at 15:51, Mark Millard wrote: >> Alexander Motin wrote on >> Date: Mon, 18 Sep 2023 13:26:56 UTC : >>> block_cloning feature is marked as READONLY_COMPAT. It should not >>> require any special handling from the boot code. >> >> From stand/libsa/zfs/zfsimpl.c but adding a comment about the >> read-only compatibility status of each entry: >> >> /* >> * List of ZFS features supported for read >> */ > static const char *features_for_read[] = { >> "com.datto:bookmark_v2", // READ-ONLY COMPATIBLE no >> "com.datto:encryption", // READ-ONLY COMPATIBLE no >> "com.datto:resilver_defer", // READ-ONLY COMPATIBLE yes >> "com.delphix:bookmark_written", // READ-ONLY COMPATIBLE no >> "com.delphix:device_removal", // READ-ONLY COMPATIBLE no >> "com.delphix:embedded_data", // READ-ONLY COMPATIBLE no >> "com.delphix:extensible_dataset", // READ-ONLY COMPATIBLE no >> "com.delphix:head_errlog", // READ-ONLY COMPATIBLE no >> "com.delphix:hole_birth", // READ-ONLY COMPATIBLE no >> "com.delphix:obsolete_counts", // READ-ONLY COMPATIBLE yes >> "com.delphix:spacemap_histogram", // READ-ONLY COMPATIBLE yes >> "com.delphix:spacemap_v2", // READ-ONLY COMPATIBLE yes >> "com.delphix:zpool_checkpoint", // READ-ONLY COMPATIBLE yes >> "com.intel:allocation_classes", // READ-ONLY COMPATIBLE yes >> "com.joyent:multi_vdev_crash_dump", // READ-ONLY COMPATIBLE no >> "com.klarasystems:vdev_zaps_v2", // READ-ONLY COMPATIBLE no >> "org.freebsd:zstd_compress", // READ-ONLY COMPATIBLE no >> "org.illumos:lz4_compress", // READ-ONLY COMPATIBLE no >> "org.illumos:sha512", // READ-ONLY COMPATIBLE no >> "org.illumos:skein", // READ-ONLY COMPATIBLE no >> "org.open-zfs:large_blocks", // READ-ONLY COMPATIBLE no >> "org.openzfs:blake3", // READ-ONLY COMPATIBLE no >> "org.zfsonlinux:allocation_classes", // READ-ONLY COMPATIBLE yes >> "org.zfsonlinux:large_dnode", // READ-ONLY COMPATIBLE no >> NULL >> }; >> >> So it appears that the design is that both "no" and "yes" ones >> that are known to be supported are listed and anything else is >> supposed to lead to rejection until explicitly added as >> known-compatibile. I don't think so. I think somebody by mistake added first featured that should not be here, and then others continued this irrelevant routine. My own development server/builder is happily running latest main with ZFS root without any patches and with block cloning not only enabled, but even active. So as I have told, it is not needed: mav@srv:/root# zpool get all | grep clon mavlab bcloneused 20.5M - mavlab bclonesaved 20.9M - mavlab bcloneratio 2.02x - mavlab feature@block_cloning active local Somebody should go through the list and clean in up from read-compatible features and document it, unless there are some features that were re-qualified at some point, I haven't checked if it could be. >> This matches up with stand/libsa/zfs/zfsimpl.c 's: >> >> static int >> nvlist_check_features_for_read(nvlist_t *nvl) >> { ... >> rc = nvlist_find(nvl, ZPOOL_CONFIG_FEATURES_FOR_READ, >> DATA_TYPE_NVLIST, NULL, &features, NULL); Take a note it reads ZPOOL_CONFIG_FEATURES_FOR_READ. Same time features declared as READONLY_COMPAT are stored in FEATURES_FOR_WRITE, that boot loader does not even care. >> I do not know if vfs.zfs.bclone_enabled=0 leads the loader >> to see vs. not-see a "com.fudosecurity:block_cloning". bclone_enabled=0 block copy_file_range() usage, that should keep the feature enabled, but not active. It could be related if the feature would be in FEATURES_FOR_WRITE, but here and now it is not. > It appears that 2 additions afeter opebzfas-2.1-freebsd are > missing from the above list: > > com.fudosecurity:block_cloning > org.openzfs:zilsaxattr Nothing of ZIL is required for read-only import. So no, it is also not needed. -- Alexander Motin