From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E868C54EED for ; Mon, 30 Jan 2023 15:18:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B3DAC60FCA; Mon, 30 Jan 2023 15:18:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B3DAC60FCA Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LYj3dWN8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EYUIMzFHZk0o; Mon, 30 Jan 2023 15:18:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 4F29E60FBF; Mon, 30 Jan 2023 15:18:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4F29E60FBF Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1F7E9C0032; Mon, 30 Jan 2023 15:18:12 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C2746C002B for ; Mon, 30 Jan 2023 15:18:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 946B14011B for ; Mon, 30 Jan 2023 15:18:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 946B14011B Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LYj3dWN8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hXbiXD1Fa1J2 for ; Mon, 30 Jan 2023 15:18:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C86EA40A31 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id C86EA40A31 for ; Mon, 30 Jan 2023 15:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675091888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=URESPY8B3rO6+zudqQ9a2I8Kc4P4ekxUO74igKr3Ygk=; b=LYj3dWN8F+7XqFa16uGwGmwWWGfX+GbOS/LpjPtQ51Nx3nd2LHEydaiX91f44faRkaSC3Y R1uYLyk+HJyS749bPI3PX+GLKHIIQK2zZKAWQigAJf3Krd7mm3FC533PhAHz4V/m1FF6vY GblLzMbtXXNZLMfRXFmhxX77Mxpkeew= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-631-TTpeKxWiO7u7FuuE3gemEg-1; Mon, 30 Jan 2023 10:18:07 -0500 X-MC-Unique: TTpeKxWiO7u7FuuE3gemEg-1 Received: by mail-wr1-f72.google.com with SMTP id i9-20020a0560001ac900b002bfda39265aso1151076wry.13 for ; Mon, 30 Jan 2023 07:18:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=URESPY8B3rO6+zudqQ9a2I8Kc4P4ekxUO74igKr3Ygk=; b=0AWiXTzbSgv5Jh9I5JKqDkur8Db/fCpHRlr51fO9dowIMpV+YoILgk/8Ei+nzkgErS +vjO8BXm2Um4Q/2lwYQxW/dIJyS1JPcqlvjyS01Tlb+rIwR8bqJjUwucmYXtcEI+VSgJ 4+NF3vEFKksbiShUng82tmBz5FDkbzqIlC44aRrzwEmGcfm7jv84z9SYZ85tFFQK2BvW Z26YixXMrygYuBg0gYVzT5aIKYYbJnSEdG9xZglVz0zJ9xLqCeNlgNXKPCR1mgViat3z emLp/rYnrUzhes4ViLLbd4TSHtk4LZGbKJa5Wnoo6YSTQ4fcpslMg4aeueh03bKZtLHw MY0Q== X-Gm-Message-State: AO0yUKVAFR9R2lIJA19DlYgig168SSOFLm9s/xi5WVKpFs1YlNYzDSwv tzmCKtZEdzxVF1Sv8B7dLgaHr2AyP7BQ47DTOA6fUY9Bkpj/OCY6/iPxvyQRD/Ql2WFrlzdoGi7 uVivDs9y3ErHz58rXdoFnazA5WpfBKtpDnl3S2EDfTw== X-Received: by 2002:a05:6000:1105:b0:2bf:b77c:df72 with SMTP id z5-20020a056000110500b002bfb77cdf72mr16512203wrw.25.1675091885644; Mon, 30 Jan 2023 07:18:05 -0800 (PST) X-Google-Smtp-Source: AK7set9hHGYe0bnBQdwa2LZ/rAVCRbopEtGk+crtv3OHnMIQTfwimU+PtBLrc1/FzlqOKTq9Gtug2w== X-Received: by 2002:a05:6000:1105:b0:2bf:b77c:df72 with SMTP id z5-20020a056000110500b002bfb77cdf72mr16512171wrw.25.1675091885371; Mon, 30 Jan 2023 07:18:05 -0800 (PST) Received: from redhat.com ([2.52.144.173]) by smtp.gmail.com with ESMTPSA id p6-20020a5d48c6000000b002bfc0558ecdsm11985935wrs.113.2023.01.30.07.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 07:18:04 -0800 (PST) Date: Mon, 30 Jan 2023 10:17:58 -0500 From: "Michael S. Tsirkin" To: Christoph Hellwig Subject: Re: [PATCH 09/23] virtio_blk: use bvec_set_virt to initialize special_vec Message-ID: <20230130101747-mutt-send-email-mst@kernel.org> References: <20230130092157.1759539-1-hch@lst.de> <20230130092157.1759539-10-hch@lst.de> MIME-Version: 1.0 In-Reply-To: <20230130092157.1759539-10-hch@lst.de> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: kvm@vger.kernel.org, linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, David Howells , linux-mm@kvack.org, Eric Dumazet , target-devel@vger.kernel.org, Marc Dionne , linux-afs@lists.infradead.org, Mike Marshall , linux-cifs@vger.kernel.org, Sagi Grimberg , linux-scsi@vger.kernel.org, Minchan Kim , io-uring@vger.kernel.org, Jakub Kicinski , Ilya Dryomov , Paolo Abeni , devel@lists.orangefs.org, linux-block@vger.kernel.org, Keith Busch , ceph-devel@vger.kernel.org, Xiubo Li , Trond Myklebust , Jens Axboe , linux-nfs@vger.kernel.org, "Martin K. Petersen" , netdev@vger.kernel.org, samba-technical@lists.samba.org, Steve French , Sergey Senozhatsky , Chuck Lever , Anna Schumaker , linux-fsdevel@vger.kernel.org, Andrew Morton , "David S. Miller" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, Jan 30, 2023 at 10:21:43AM +0100, Christoph Hellwig wrote: > Use the bvec_set_virt helper to initialize the special_vec. > > Signed-off-by: Christoph Hellwig Acked-by: Michael S. Tsirkin > --- > drivers/block/virtio_blk.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 6a77fa91742880..dc6e9b989910b0 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -170,9 +170,7 @@ static int virtblk_setup_discard_write_zeroes_erase(struct request *req, bool un > > WARN_ON_ONCE(n != segments); > > - req->special_vec.bv_page = virt_to_page(range); > - req->special_vec.bv_offset = offset_in_page(range); > - req->special_vec.bv_len = sizeof(*range) * segments; > + bvec_set_virt(&req->special_vec, range, sizeof(*range) * segments); > req->rq_flags |= RQF_SPECIAL_PAYLOAD; > > return 0; > -- > 2.39.0 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization