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 829B1C636CB for ; Mon, 30 Jan 2023 15:19:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238120AbjA3PTd (ORCPT ); Mon, 30 Jan 2023 10:19:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237854AbjA3PT1 (ORCPT ); Mon, 30 Jan 2023 10:19:27 -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 D935E3D0B9 for ; Mon, 30 Jan 2023 07:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675091890; 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=iz3IYkjWKiTvImyQYrPyAr6VPGVAOeV90N2lz0Z32JAuox9Sj1tAlwQ8ldjOiZcE/6/O4P 7+QOk/MoqPEXl2ZypcMyovRCa2ls8Sc3j6YHAAZK7kX0cuNSQyVLlymVUehk0XVLMtnZKg uM9Fr1WqIy5TRqlmqPNuoG8M4d4kOd8= 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-19-VPgRsWjQOwOGzPv1RfU6kA-1; Mon, 30 Jan 2023 10:18:09 -0500 X-MC-Unique: VPgRsWjQOwOGzPv1RfU6kA-1 Received: by mail-wr1-f72.google.com with SMTP id o9-20020adfa109000000b002bfc062eaa8so2059534wro.20 for ; Mon, 30 Jan 2023 07:18:09 -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=CLrM3+g+5AkgfbJdalK5SBQ15mWSHL9psW6zKS5V5r69KWOgJKTT3FgYXSAjnWQGoU USA5HbzfDP9RnHTVEm3zybF7faw4Tzge/3Iq7xx2e7ajSoljscJHGVys4ftyoSjzYzHL aDS9dnmX3BUvgIO82c1vpCYIKHJtusC4Jzm4GeXPwNLdFzXdqUi4c2BopeXzc0C3sseg aRW8RsNWQHTMwXMb8LtZPZb6K0S/89TcxlupPq0CQOaX6KxR1TKUn+t+he3NdctEns4b f7FDYJAYW/IO6n3DbSewcopstq+OUswaJn6d4FnTOszAiCUmBDu3RFaCdGmoGTeppXdf 8Prw== X-Gm-Message-State: AO0yUKU3kg9wdPI0foG7sPU3tkwN/np7OYS7RdtrfK9O2vs8UCQxftj/ z5ME7GqGk6ZNJYjB2f7Dm1qtw8lmgpZB/rxSmQ7H6PEqvXpkGJ7fI3SQpJcftJ+tyewei7ZzHrr +W9lYubObnLIx6idTBRw= X-Received: by 2002:a05:6000:1105:b0:2bf:b77c:df72 with SMTP id z5-20020a056000110500b002bfb77cdf72mr16512220wrw.25.1675091885661; 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 Cc: Jens Axboe , Ilya Dryomov , Jason Wang , 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 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230130092157.1759539-10-hch@lst.de> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 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