linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@ionos.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Jens Axboe" <axboe@kernel.dk>,
	"Richard Weinberger" <richard@nod.at>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Josef Bacik" <josef@toxicpanda.com>,
	"Md. Haris Iqbal" <haris.iqbal@ionos.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Mike Snitzer" <snitzer@kernel.org>, "Song Liu" <song@kernel.org>,
	"Stefan Haberland" <sth@linux.ibm.com>,
	"Jan Hoeppner" <hoeppner@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-um@lists.infradead.org, linux-block@vger.kernel.org,
	nbd@other.debian.org, virtualization@lists.linux-foundation.org,
	xen-devel@lists.xenproject.org, linux-raid@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org,
	dm-devel@redhat.com
Subject: Re: [PATCH 10/11] rnbd-srv: use bdev_discard_alignment
Date: Tue, 19 Apr 2022 06:51:12 +0200	[thread overview]
Message-ID: <CAMGffEnxwHE_QgN2OS93BHe6U+XdYc_R5OmSROmF5F-HXK_E4A@mail.gmail.com> (raw)
In-Reply-To: <20220418045314.360785-11-hch@lst.de>

On Mon, Apr 18, 2022 at 6:53 AM Christoph Hellwig <hch@lst.de> wrote:
>
> Use bdev_discard_alignment to calculate the correct discard alignment
> offset even for partitions instead of just looking at the queue limit.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Thx!
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/block/rnbd/rnbd-srv-dev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/rnbd/rnbd-srv-dev.h b/drivers/block/rnbd/rnbd-srv-dev.h
> index d080a0de59225..4309e52524691 100644
> --- a/drivers/block/rnbd/rnbd-srv-dev.h
> +++ b/drivers/block/rnbd/rnbd-srv-dev.h
> @@ -59,7 +59,7 @@ static inline int rnbd_dev_get_discard_granularity(const struct rnbd_dev *dev)
>
>  static inline int rnbd_dev_get_discard_alignment(const struct rnbd_dev *dev)
>  {
> -       return bdev_get_queue(dev->bdev)->limits.discard_alignment;
> +       return bdev_discard_alignment(dev->bdev);
>  }
>
>  #endif /* RNBD_SRV_DEV_H */
> --
> 2.30.2
>

  parent reply	other threads:[~2022-04-19  4:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  4:53 fix and cleanup discard_alignment handling Christoph Hellwig
2022-04-18  4:53 ` [PATCH 01/11] ubd: don't set the discard_alignment queue limit Christoph Hellwig
2022-04-18  4:53 ` [PATCH 02/11] nbd: " Christoph Hellwig
2022-04-18  4:53 ` [PATCH 03/11] null_blk: " Christoph Hellwig
2022-04-18  8:01   ` [dm-devel] " Damien Le Moal
2022-04-18 21:22   ` Chaitanya Kulkarni
2022-04-18  4:53 ` [PATCH 04/11] virtio_blk: fix the discard_granularity and discard_alignment queue limits Christoph Hellwig
2022-04-18  4:53 ` [PATCH 05/11] dm-zoned: don't set the discard_alignment queue limit Christoph Hellwig
2022-04-18  8:00   ` [dm-devel] " Damien Le Moal
2022-04-18  4:53 ` [PATCH 06/11] raid5: " Christoph Hellwig
2022-04-25 21:08   ` Song Liu
2022-04-18  4:53 ` [PATCH 07/11] dasd: " Christoph Hellwig
2022-05-06 12:56   ` Jan Höppner
2022-04-18  4:53 ` [PATCH 08/11] loop: remove a spurious clear of discard_alignment Christoph Hellwig
2022-04-18  8:04   ` [dm-devel] " Damien Le Moal
2022-04-18 21:21   ` Chaitanya Kulkarni
2022-04-18  4:53 ` [PATCH 09/11] nvme: " Christoph Hellwig
2022-04-18  8:02   ` [dm-devel] " Damien Le Moal
2022-04-18 21:23   ` Chaitanya Kulkarni
2022-04-26 14:25   ` Sagi Grimberg
2022-04-18  4:53 ` [PATCH 10/11] rnbd-srv: use bdev_discard_alignment Christoph Hellwig
2022-04-18  8:02   ` [dm-devel] " Damien Le Moal
2022-04-19  4:51   ` Jinpu Wang [this message]
2022-04-18  4:53 ` [PATCH 11/11] xen-blkback: " Christoph Hellwig
2022-04-18  8:03   ` [dm-devel] " Damien Le Moal
2022-04-26  4:16 ` fix and cleanup discard_alignment handling Martin K. Petersen
2022-05-02 16:46 ` Christoph Hellwig
2022-05-03 16:39 ` 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=CAMGffEnxwHE_QgN2OS93BHe6U+XdYc_R5OmSROmF5F-HXK_E4A@mail.gmail.com \
    --to=jinpu.wang@ionos.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=haris.iqbal@ionos.com \
    --cc=hch@lst.de \
    --cc=hoeppner@linux.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=josef@toxicpanda.com \
    --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-um@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=mst@redhat.com \
    --cc=nbd@other.debian.org \
    --cc=richard@nod.at \
    --cc=roger.pau@citrix.com \
    --cc=snitzer@kernel.org \
    --cc=song@kernel.org \
    --cc=sth@linux.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xenproject.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).