From nobody Fri Jan 19 15:38:57 2024 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 4TGkLR5y99z56kvx for ; Fri, 19 Jan 2024 15:39:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) (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 4TGkLQ5HDCz55lN for ; Fri, 19 Jan 2024 15:39:10 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.222.52 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ua1-f52.google.com with SMTP id a1e0cc1a2514c-7cbeaacbcb8so254718241.0 for ; Fri, 19 Jan 2024 07:39:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705678749; x=1706283549; h=content-transfer-encoding:cc: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=hBLEVoP8GcmMrt2vW2C4r1kCwjlz8+qHPjm+Xwcbedg=; b=egA/Y6GhbdbN+6A5qXHL2llQr3A6wyYzUSz31kwtQYFdMDQbXzbh4VVt2yRTTzfTHc fm4hG0/PERoauVlqDQzR+ti5/JrhjOEZ7M0mY3iB3s7nfRmqHN3x3hJ2fX1RC1eZbdru gv1pl/ZXCcTjaZx1YpKzuNsC9rLuMGlc+bRrRuayR20Rwn0D9nv3/P3kzyE9i18Ur1a+ NepfKraX+E4BLpKzJYPvsBdyIyNt5VjMOR8+NKzKrY6rQm+UuxOwxJ+NWQuFxP9IY+bN 87QElJv0AA3AoYK/7cBWQ5ZtpvtjjE/7ZbaHsH4lSINIbtUKVl3qU158K+Bt4iaYL7Hg DWOw== X-Gm-Message-State: AOJu0Yy03KJC/CCucgYDTxm7+k4fqbPORmPWgx3EpmLfVbpUAHERg4BY 9W9sOeCa4vytxgB9RJBsRCKmVvF0xWIw74nxY9TR7UwnezhESjvJ9dAV+NsJhWdADmnqxcBmj4S 6WLe4iPtroAr0WLQJTTwbe3+SjnE= X-Received: by 2002:a1f:cdc2:0:b0:4b6:ce62:adcd with SMTP id d185-20020a1fcdc2000000b004b6ce62adcdmt2313714vkg.3.1705678749195; Fri, 19 Jan 2024 07:39:09 -0800 (PST) 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: <202401172250.40HMo4O9003460@gitrepo.freebsd.org> <8F36170D-9592-46D5-A275-12E24C3A13D8@gmail.com> In-Reply-To: From: Alan Somers Date: Fri, 19 Jan 2024 08:38:57 -0700 Message-ID: Subject: Re: git: 8bae22bbbe65 - main - fusefs: prefer new/delete over malloc/free Cc: Enji Cooper , "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-Spamd-Bar: / X-Spamd-Result: default: False [-0.49 / 15.00]; MISSING_TO(2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.81)[-0.811]; NEURAL_HAM_SHORT(-0.78)[-0.783]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.52:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.52:from]; R_DKIM_NA(0.00)[]; FREEFALL_USER(0.00)[asomers]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4TGkLQ5HDCz55lN On Fri, Jan 19, 2024 at 6:56=E2=80=AFAM Alan Somers w= rote: > > On Thu, Jan 18, 2024 at 10:32=E2=80=AFPM Enji Cooper wrote: > > > > > > > On Jan 17, 2024, at 2:50=E2=80=AFPM, Alan Somers wrote: > > > > > > The branch main has been updated by asomers: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8bae22bbbe6571da9259e0= d43ffa8a56f4b3e171 > > > > > > commit 8bae22bbbe6571da9259e0d43ffa8a56f4b3e171 > > > Author: Alan Somers > > > AuthorDate: 2024-01-15 23:49:47 +0000 > > > Commit: Alan Somers > > > CommitDate: 2024-01-17 22:49:41 +0000 > > > > > > fusefs: prefer new/delete over malloc/free > > > > > > MFC after: 2 weeks > > > Reviewed by: kib > > > Differential Revision: https://reviews.freebsd.org/D43464 > > > > Why not use smart pointers instead? > > -Enji > > Only because this stuff all evolved from C code. Smart pointers would > certainly work. Actually, TBH it's because I'm not real great with C++. It's a difficult language, and after 2016 I stopped even trying to improve my C++ skills. Instead, I've been focusing on Rust. Even when I wrote these tests in 2019, I strongly considered using Rust instead of C++. In the end, the only thing that forced me to use C++ is because I wanted them to live in the base system, rather than in ports. I still dream about the day when Rust is allowed in the base system. If it were, then in addition to these tests, I would've converted gstat to Rust (rather than add sysutils/gstat-rs to ports), added the nfs-exporter (instead of putting it in net-mgmt/nfs-exporter), added a ctl-exporter (which is impossible to do in ports, so I had to do that one in C), and converted tools/regression/fsx in place (instead of putting in devel/fsx-rs). Maybe a couple of other things, too. Like ztop, or the geom-exporter that I have half-written. I've also been tempted to rewrite zfsd in Rust. Alas, I sense that there is little appetite for bringing Rust into contrib. -Alan