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 X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66644C4338F for ; Wed, 4 Aug 2021 17:19:42 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C839F60FC4 for ; Wed, 4 Aug 2021 17:19:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C839F60FC4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-500-yF0ppiOfNxOZwzPfMQpZLg-1; Wed, 04 Aug 2021 13:19:39 -0400 X-MC-Unique: yF0ppiOfNxOZwzPfMQpZLg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63BA4809CD2; Wed, 4 Aug 2021 17:19:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29E8019C44; Wed, 4 Aug 2021 17:19:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1D5AC4BB7B; Wed, 4 Aug 2021 17:19:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 174HCvC8005406 for ; Wed, 4 Aug 2021 13:12:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 80F52FA739; Wed, 4 Aug 2021 17:12:57 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C1CCFA74A for ; Wed, 4 Aug 2021 17:12:54 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7392689B849 for ; Wed, 4 Aug 2021 17:12:54 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-9ClxUGKmOaKYoahf0GzWqg-1; Wed, 04 Aug 2021 13:12:50 -0400 X-MC-Unique: 9ClxUGKmOaKYoahf0GzWqg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 87CC22226C; Wed, 4 Aug 2021 17:05:17 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6E66913D1F; Wed, 4 Aug 2021 17:05:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +P54DsjICmHSHgAAMHmgww (envelope-from ); Wed, 04 Aug 2021 17:05:12 +0000 To: Christoph Hellwig , Jens Axboe References: <20210804095634.460779-1-hch@lst.de> <20210804095634.460779-10-hch@lst.de> From: Coly Li Message-ID: <13eb9def-5db4-d776-2b5a-0096a0a2a681@suse.de> Date: Thu, 5 Aug 2021 01:05:10 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210804095634.460779-10-hch@lst.de> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: dm-devel@redhat.com Cc: Jan Hoeppner , Mike Snitzer , linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, Song Liu , dm-devel@redhat.com, Anton Ivanov , linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, Richard Weinberger , Ilya Dryomov , linux-um@lists.infradead.org, linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org, Stefan Haberland , Stefan Hajnoczi , Paolo Bonzini , ceph-devel@vger.kernel.org, linux-block@vger.kernel.org, "Martin K. Petersen" , Geoff Levand , Phillip Lougher Subject: Re: [dm-devel] [PATCH 09/15] bcache: use bvec_virt X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 8/4/21 5:56 PM, Christoph Hellwig wrote: > Use bvec_virt instead of open coding it. Note that the existing code is > fine despite ignoring bv_offset as the bio is known to contain exactly > one page from the page allocator per bio_vec. > > Signed-off-by: Christoph Hellwig Looks good to me. Reviewed-by: Coly Li Thanks. Coly Li > --- > drivers/md/bcache/btree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c > index 183a58c89377..0595559de174 100644 > --- a/drivers/md/bcache/btree.c > +++ b/drivers/md/bcache/btree.c > @@ -378,7 +378,7 @@ static void do_btree_node_write(struct btree *b) > struct bvec_iter_all iter_all; > > bio_for_each_segment_all(bv, b->bio, iter_all) { > - memcpy(page_address(bv->bv_page), addr, PAGE_SIZE); > + memcpy(bvec_virt(bv), addr, PAGE_SIZE); > addr += PAGE_SIZE; > } > -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel