From nobody Sat Jun 01 18:41:08 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 4Vs82X1gj2z5JsX7; Sat, 01 Jun 2024 18:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vs82X13V0z4cbh; Sat, 1 Jun 2024 18:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717267268; 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; bh=6PmTtAZacl5OvrxJfeDh4TcBdg8sVmu0pz8vVNg33BI=; b=Ws4Wxcygkj0R5hWSf8s7BT5gr0TRZHyKMqRFzh7CZOjsrg9eLORlxFxPwrWtn/WGd7Y75P mmp5LWe9kPEZw/kxsB06C/05TGF5fnkybcsCfSMVMnngHlw0IJ5MMCuBuw0hHXyke7urHi w4By4oMRusW14+8rfljq45O8nnpRyjyi7ouMpKpZw1cxLKVewYJjeYNM4DpfrIpTsRVCXw 2h/GI3Kq1YAzW/6Mb2QhNaN/sMXBT979krEb4K4+3FJDzB/c1Jwf7nLQUvANHBNNsELeYQ Chs3npLdv+mtUMGgXKcKtXjCI10C0R3iV8aEFeRtL8xL0d3o4kxHarxZlvFZdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717267268; a=rsa-sha256; cv=none; b=Cv3wT7lcFmEOHSr75Ao2qEZFX+JQrfc8hhaCMXVKdZYGTQEbJwFify88qHNeMC0wSajCsm LyKL4NFOK4U9AunUE8OEJRlKPMVs2Ua9hodGxgSwFgrHFZmnFnkeEWFah9X+WJ/TrSNWqD 1hvjO6GevlNkbW/r/kCJ/aMUOEvXTOmrnUmmsRjR8ixRN7WrjuiwhMN4UyFKH1S89v4JuS qehZYfz15oBFxCdlAXwKoH2Mkmt2RCjJ61NMpjYXYP1cF7QpIBU/fxUvfZdLR9zk6lGKea jslMQ2yq8TeQztQARp3l+p6dw7zniHGmzgCc2Hg8/6CV1umHGoTdzQfgdUwsSw== 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=1717267268; 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; bh=6PmTtAZacl5OvrxJfeDh4TcBdg8sVmu0pz8vVNg33BI=; b=tK4cvh1rNgVSJq+hFynym0tYqtblzAOphI+8vtHmc8dkStOFC/axB2ByQm66nqpWx1lXHe dkr8H+1h6DXD54K0XBMPH9WvhWDEcUAkK0Ceq0KXkPaPce4CPvJa2gG3yplQjEQMn+Tj9t Swu/Ex3G1Azcv8qfD4DlzqF77y62Ax+oE56PIQFAZMK0dHe6Uyt13zxIdQwVDH/Ll25ica +/Oe6kHl/viTrzIgnTT9lJiFkwoLHP29VpAnBn3uDP5OcG8B5uDx3gT+AbiGnkp3KxzXb8 MjvLqsH+/n/MX4ItMoEZbqr58k0DmkBKZuOBYp0aBSMj5ReQnvZ5fwcnLTi4bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vs82X0gbzzJqC; Sat, 1 Jun 2024 18:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 451If8FS009431; Sat, 1 Jun 2024 18:41:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 451If8ME009428; Sat, 1 Jun 2024 18:41:08 GMT (envelope-from git) Date: Sat, 1 Jun 2024 18:41:08 GMT Message-Id: <202406011841.451If8ME009428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 9d449caddd4f - main - md: round-trip the MUSTDEALLOC and RESERVE options 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8 commit 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8 Author: Alan Somers AuthorDate: 2024-06-01 18:00:03 +0000 Commit: Alan Somers CommitDate: 2024-06-01 18:40:19 +0000 md: round-trip the MUSTDEALLOC and RESERVE options If those options are requested when the device is created, ensure that they will be reported by MDIOCQUERY. MFC after: 2 weeks Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1270 --- sys/dev/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 267554031f23..af05373ae1d8 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1345,7 +1345,7 @@ mdcreate_malloc(struct md_s *sc, struct md_req *mdr) sc->fwsectors = mdr->md_fwsectors; if (mdr->md_fwheads != 0) sc->fwheads = mdr->md_fwheads; - sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE); + sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE | MD_RESERVE); sc->indir = dimension(sc->mediasize / sc->sectorsize); sc->uma = uma_zcreate(sc->name, sc->sectorsize, NULL, NULL, NULL, NULL, 0x1ff, 0); @@ -1470,7 +1470,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) snprintf(sc->ident, sizeof(sc->ident), "MD-DEV%ju-INO%ju", (uintmax_t)vattr.va_fsid, (uintmax_t)vattr.va_fileid); sc->flags = mdr->md_options & (MD_ASYNC | MD_CACHE | MD_FORCE | - MD_VERIFY); + MD_VERIFY | MD_MUSTDEALLOC); if (!(flags & FWRITE)) sc->flags |= MD_READONLY; sc->vnode = nd.ni_vp;