dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Jan Hoeppner <hoeppner@linux.ibm.com>,
	Mike Snitzer <snitzer@redhat.com>,
	linux-nvme@lists.infradead.org,
	virtualization@lists.linux-foundation.org,
	Song Liu <song@kernel.org>,
	dm-devel@redhat.com,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org,
	Richard Weinberger <richard@nod.at>,
	Ilya Dryomov <idryomov@gmail.com>,
	linux-um@lists.infradead.org, Coly Li <colyli@suse.de>,
	linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org,
	Stefan Haberland <sth@linux.ibm.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Phillip Lougher <phillip@squashfs.org.uk>,
	ceph-devel@vger.kernel.org, linux-block@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Geoff Levand <geoff@infradead.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [dm-devel] [PATCH 10/15] sd: use bvec_virt
Date: Thu, 5 Aug 2021 09:31:08 -0700	[thread overview]
Message-ID: <8b487c0f-71be-19d6-249c-9cd1ba228548@acm.org> (raw)
In-Reply-To: <20210804095634.460779-11-hch@lst.de>

On 8/4/21 2:56 AM, Christoph Hellwig wrote:
> Use bvec_virt instead of open coding it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/scsi/sd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index b8d55af763f9..5b5b8266e142 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -886,7 +886,7 @@ static blk_status_t sd_setup_unmap_cmnd(struct scsi_cmnd *cmd)
>   	cmd->cmnd[0] = UNMAP;
>   	cmd->cmnd[8] = 24;
>   
> -	buf = page_address(rq->special_vec.bv_page);
> +	buf = bvec_virt(&rq->special_vec);
>   	put_unaligned_be16(6 + 16, &buf[0]);
>   	put_unaligned_be16(16, &buf[2]);
>   	put_unaligned_be64(lba, &buf[8]);

The patch description is not correct. The above patch involves a 
functional change while the patch description suggests that no 
functionality has been changed.

Although the above patch looks fine to me, why has page_address() been 
changed into bvec_virt() in the sd driver? My understanding is that the 
sd driver always sets bv_offset to zero.

Thanks,

Bart.


--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2021-08-05 16:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  9:56 [dm-devel] add a bvec_virt helper Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 01/15] bvec: " Christoph Hellwig
2021-08-05  6:19   ` Chaitanya Kulkarni
2021-08-06  2:38   ` Martin K. Petersen
2021-08-04  9:56 ` [dm-devel] [PATCH 02/15] block: use bvec_virt in bio_integrity_{process, free} Christoph Hellwig
2021-08-05  6:19   ` Chaitanya Kulkarni
2021-08-06  2:38   ` Martin K. Petersen
2021-08-04  9:56 ` [dm-devel] [PATCH 03/15] dm: make EBS depend on !HIGHMEM Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 04/15] dm-ebs: use bvec_virt Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 05/15] dm-integrity: " Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 06/15] squashfs: " Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 07/15] rbd: " Christoph Hellwig
2021-08-05 12:01   ` Jeff Layton
2021-08-04  9:56 ` [dm-devel] [PATCH 08/15] virtio_blk: " Christoph Hellwig
2021-08-05 14:17   ` Stefan Hajnoczi
2021-08-04  9:56 ` [dm-devel] [PATCH 09/15] bcache: " Christoph Hellwig
2021-08-04 17:05   ` Coly Li
2021-08-04  9:56 ` [dm-devel] [PATCH 10/15] sd: " Christoph Hellwig
2021-08-05 16:31   ` Bart Van Assche [this message]
2021-08-06  2:43   ` Martin K. Petersen
2021-08-04  9:56 ` [dm-devel] [PATCH 11/15] ubd: " Christoph Hellwig
2021-08-04 10:10   ` Anton Ivanov
2021-08-04  9:56 ` [dm-devel] [PATCH 12/15] ps3vram: " Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 13/15] dasd: " Christoph Hellwig
2021-08-04 20:20   ` Stefan Haberland
2021-08-04  9:56 ` [dm-devel] [PATCH 14/15] dcssblk: " Christoph Hellwig
2021-08-04  9:56 ` [dm-devel] [PATCH 15/15] nvme: " Christoph Hellwig
2021-08-04 14:33   ` Keith Busch
2021-08-16 12:38 ` [dm-devel] add a bvec_virt helper Christoph Hellwig
2021-08-16 16:51 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b487c0f-71be-19d6-249c-9cd1ba228548@acm.org \
    --to=bvanassche@acm.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=axboe@kernel.dk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=colyli@suse.de \
    --cc=dm-devel@redhat.com \
    --cc=geoff@infradead.org \
    --cc=hch@lst.de \
    --cc=hoeppner@linux.ibm.com \
    --cc=idryomov@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=phillip@squashfs.org.uk \
    --cc=richard@nod.at \
    --cc=snitzer@redhat.com \
    --cc=song@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=sth@linux.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).