From owner-svn-src-all@freebsd.org Thu Sep 10 21:44:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1EC603E4BAB; Thu, 10 Sep 2020 21:44:38 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BnXTx5dsTz4gvP; Thu, 10 Sep 2020 21:44:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f53.google.com with SMTP id g10so6646530otq.9; Thu, 10 Sep 2020 14:44:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=42z1Oe2biSkBNAfsJH0xt9cSIkjMRSuPkouocb5PUNQ=; b=EPbgH3oAXQToIV1/N/xictyN4B4j2hVPrNjGFa1iZXYrzSCxdoqLny4YnMvIdlhX20 nyDlmBdKfcDq/33TLXTJkjurZc9KeKkW+A4sCqspvuMdawMgmnFCAlCGmjBxkw50wjmL 4fPp64u5QzK8WTH0FoOrQb4P0vrde5Btc7l9y8JPYZQdpfTsWPXdzfRw681KCFdmkign /CysvjzIinLxUVk+sUy1AilgsqcbotqIgGEIXV5DFmk1f8md+yVL9U+0wcB8l84YJBuX C9j5fMDiuLsQpNosfDBiC59Sy34Ovot3aWioboJ9UP4ZrHPtiIDWQm0MXXs5qzwKK72/ hWbQ== X-Gm-Message-State: AOAM530u6VSwMsi+LfdZmkuHE9gT0qpRnANEncMXKkdsuQIpMXAXctPK /cVq97Hse8jOcnHjssEE4LORdIjIuLtWgFvryEuhOyHg X-Google-Smtp-Source: ABdhPJzsINizzCpst2n9bCZHaUykhj2rxPw4T4JURAGjomrmAXnWrzO5OKKxOd2mYQHLsIveuPAiZwfy4rRKG6nMHn0= X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr5445672otr.18.1599774275601; Thu, 10 Sep 2020 14:44:35 -0700 (PDT) MIME-Version: 1.0 References: <202009102101.08AL1MDW060901@repo.freebsd.org> In-Reply-To: <202009102101.08AL1MDW060901@repo.freebsd.org> From: Alan Somers Date: Thu, 10 Sep 2020 15:44:24 -0600 Message-ID: Subject: Re: svn commit: r365614 - in stable/12: sys/dev/virtio/block usr.sbin/bhyve To: Allan Jude Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org X-Rspamd-Queue-Id: 4BnXTx5dsTz4gvP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2020 21:44:38 -0000 On Thu, Sep 10, 2020 at 3:01 PM Allan Jude wrote: > Author: allanjude > Date: Thu Sep 10 21:01:22 2020 > New Revision: 365614 > URL: https://svnweb.freebsd.org/changeset/base/365614 > > Log: > MFC r360229, r363255 > > r360229: > Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend > > This will advertise support for TRIM to the guest virtio-blk driver and > perform the DIOCGDELETE ioctl on the backing storage if it supports it. > > Thanks to Jason King and others at Joyent and illumos for expanding on > my original patch, adding improvements including better error handling > and making sure to following the virtio spec. > > r363255: > Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver > > If the hypervisor advertises support for the DISCARD command then the > guest can perform TRIM commands, freeing space on the backing store. > > If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE > > Tested with FreeBSD guests on bhyve and KVM > > Relnotes: yes > Sponsored by: Klara Inc. > > Modified: > stable/12/sys/dev/virtio/block/virtio_blk.c > stable/12/sys/dev/virtio/block/virtio_blk.h > stable/12/usr.sbin/bhyve/block_if.c > stable/12/usr.sbin/bhyve/pci_virtio_block.c > Directory Properties: > stable/12/ (props changed) > Yay!