linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>,
	dm-devel@redhat.com, open list <linux-kernel@vger.kernel.org>,
	linux-block@vger.kernel.org, nbd@other.debian.org,
	ceph-devel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-raid <linux-raid@vger.kernel.org>,
	linux-nvdimm@lists.01.org, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org,
	Linux-Fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 4/9] block: add a new revalidate_disk_size helper
Date: Tue, 1 Sep 2020 23:06:52 -0700	[thread overview]
Message-ID: <CAPhsuW5-nfKQK_178R-Y+ps6KLNMrwvWe0Rh5=M1-xvcKHYTgg@mail.gmail.com> (raw)
In-Reply-To: <20200901155748.2884-5-hch@lst.de>

On Tue, Sep 1, 2020 at 9:00 AM Christoph Hellwig <hch@lst.de> wrote:
>
[...]

>  drivers/md/md-cluster.c       |  6 ++---
>  drivers/md/md-linear.c        |  2 +-
>  drivers/md/md.c               | 10 ++++-----

For md bits:
Acked-by: Song Liu <song@kernel.org>

[...]
>
> +/**
> + * revalidate_disk_size - checks for disk size change and adjusts bdev size.
> + * @disk: struct gendisk to check
> + * @verbose: if %true log a message about a size change if there is any
> + *
> + * This routine checks to see if the bdev size does not match the disk size
> + * and adjusts it if it differs. When shrinking the bdev size, its all caches
> + * are freed.
> + */
> +void revalidate_disk_size(struct gendisk *disk, bool verbose)
> +{
> +       struct block_device *bdev;
> +
> +       /*
> +        * Hidden disks don't have associated bdev so there's no point in
> +        * revalidating them.
> +        */
> +       if (disk->flags & GENHD_FL_HIDDEN)
> +               return;
> +
> +       bdev = bdget_disk(disk, 0);
> +       if (bdev) {
> +               check_disk_size_change(disk, bdev, verbose);
> +               bdput(bdev);
> +       }
> +}
> +EXPORT_SYMBOL(revalidate_disk_size);

Shall we use EXPORT_SYMBOL_GPL() here?

[...]
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2020-09-02  6:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 15:57 remove revalidate_disk() Christoph Hellwig
2020-09-01 15:57 ` [PATCH 1/9] Documentation/filesystems/locking.rst: remove an incorrect sentence Christoph Hellwig
2020-09-02  7:22   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 2/9] block: don't clear bd_invalidated in check_disk_size_change Christoph Hellwig
2020-09-01 15:57 ` [PATCH 3/9] block: rename bd_invalidated Christoph Hellwig
2020-09-02  7:23   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 4/9] block: add a new revalidate_disk_size helper Christoph Hellwig
2020-09-02  6:06   ` Song Liu [this message]
2020-09-02  7:23   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 5/9] block: use revalidate_disk_size in set_capacity_revalidate_and_notify Christoph Hellwig
2020-09-02  7:23   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 6/9] nvme: opencode revalidate_disk in nvme_validate_ns Christoph Hellwig
2020-09-02  7:23   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 7/9] sd: open code revalidate_disk Christoph Hellwig
2020-09-02  7:24   ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 8/9] nvdimm: simplify revalidate_disk handling Christoph Hellwig
2020-09-01 15:57 ` [PATCH 9/9] block: remove revalidate_disk() Christoph Hellwig
2020-09-02  5:59   ` Song Liu
2020-09-02  7:25   ` Johannes Thumshirn
2020-09-01 17:45 ` Josef Bacik
2020-09-02 14:02 ` 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='CAPhsuW5-nfKQK_178R-Y+ps6KLNMrwvWe0Rh5=M1-xvcKHYTgg@mail.gmail.com' \
    --to=song@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --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).