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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93CCDC61DA4 for ; Tue, 31 Jan 2023 03:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbjAaDYH (ORCPT ); Mon, 30 Jan 2023 22:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbjAaDYF (ORCPT ); Mon, 30 Jan 2023 22:24:05 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A7471DB8E for ; Mon, 30 Jan 2023 19:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675135397; 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=ltkBGnwECMJmhbD7vrl7YLMiwdLoKe7LIr5e2nHG3PQ=; b=WktXghuYlDFfIftM7b0IQkR1/0s882S//XkUdYuDJd/lvX4cXOYp5VJiTaspi1OIhGgTLD UcYyh1MnaCUsbhBJ0zGzJtoyL//V73iwCE/S/7G3Wu25qIdpmfdrvcahRtm33L8zdzp6qg 8qlkhTC2xAk7fM45E/sejbWy5AMwons= Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-407-c3s8PP7HOqO80Pgi-KongA-1; Mon, 30 Jan 2023 22:23:10 -0500 X-MC-Unique: c3s8PP7HOqO80Pgi-KongA-1 Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-1635219ca43so4827574fac.0 for ; Mon, 30 Jan 2023 19:23:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to: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=ltkBGnwECMJmhbD7vrl7YLMiwdLoKe7LIr5e2nHG3PQ=; b=yI72H5eav1cSgskArrmLUhOCLOhrW8fCX45m+kd7jaNdNaVqLPCJhBihZf4sGGsb7N ml3B3bLJMFKLzRxEs8m2EPAmunqcb4aqgPIZC4Pgry+30GS8TdamZHHbdVAOiKpgc2QU Mfftq8crhMKXUBMJD0IX9i5Aw6T6rNd4UNVu+3GRumv12bsOofvdhgnazDywmy4Fh4Fv RJBmlZEc8n1pUVc52ybwFPtG2KhFGLoBhXzxZ2htfmZsF/gMhl5J5dKmmRKjAt3jwZF1 xhG8YjyuEwehcVcahe0XRLIU6IGbEvNqY2DyFhRyx0zVEWUvBDT5G9hJ88LFVBm0X+JQ 832A== X-Gm-Message-State: AO0yUKWpzlzhAOGc2QXyhtJB7SRTrflQoq5LD0FidG3OCmqSNsH4VI3g ketsMOfkSt+bxV70XUrzk1It3fWw9xnCK2XvGhKrDGhR5T10g8jP7Zo895llCkAfHbFjKVCc1Pz lpCvWj77b3DaltpJCYbDyxfIUNboWT0pMQxo= X-Received: by 2002:a05:6870:959e:b0:163:9cea:eea7 with SMTP id k30-20020a056870959e00b001639ceaeea7mr567818oao.35.1675135387496; Mon, 30 Jan 2023 19:23:07 -0800 (PST) X-Google-Smtp-Source: AK7set9Hu2HFEDPiDGXCaNnCjpBr1M/3mkKYHDHH6RsQ5EtesD62XsOTK7GEj1aXmBl8gjJeRQSyQJytKuQEUWxkdJU= X-Received: by 2002:a05:6870:959e:b0:163:9cea:eea7 with SMTP id k30-20020a056870959e00b001639ceaeea7mr567795oao.35.1675135387309; Mon, 30 Jan 2023 19:23:07 -0800 (PST) MIME-Version: 1.0 References: <20230130092157.1759539-1-hch@lst.de> <20230130092157.1759539-10-hch@lst.de> <20230130101747-mutt-send-email-mst@kernel.org> In-Reply-To: <20230130101747-mutt-send-email-mst@kernel.org> From: Jason Wang Date: Tue, 31 Jan 2023 11:22:56 +0800 Message-ID: Subject: Re: [PATCH 09/23] virtio_blk: use bvec_set_virt to initialize special_vec To: "Michael S. Tsirkin" Cc: Christoph Hellwig , Jens Axboe , Ilya Dryomov , Minchan Kim , Sergey Senozhatsky , Keith Busch , Sagi Grimberg , Chaitanya Kulkarni , "Martin K. Petersen" , David Howells , Marc Dionne , Xiubo Li , Steve French , Trond Myklebust , Anna Schumaker , Mike Marshall , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chuck Lever , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, devel@lists.orangefs.org, io-uring@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Jan 30, 2023 at 11:18 PM Michael S. Tsirkin wrote: > > 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 Acked-by: Jason Wang Thanks > > > > --- > > 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 >