All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Justin Sanders" <justin@coraid.com>,
	"Josef Bacik" <josef@toxicpanda.com>,
	"Ilya Dryomov" <idryomov@gmail.com>,
	"Jack Wang" <jinpu.wang@cloud.ionos.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Minchan Kim" <minchan@kernel.org>,
	"Mike Snitzer" <snitzer@redhat.com>, "Song Liu" <song@kernel.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	dm-devel@redhat.com, linux-block@vger.kernel.org,
	drbd-dev@lists.linbit.com, nbd@other.debian.org,
	ceph-devel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-raid@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change
Date: Wed, 11 Nov 2020 09:26:35 +0100	[thread overview]
Message-ID: <20201111082658.3401686-2-hch@lst.de> (raw)
In-Reply-To: <20201111082658.3401686-1-hch@lst.de>

__invalidate_device without the kill_dirty parameter just invalidates
various clean entries in caches, which doesn't really help us with
anything, but can cause all kinds of horrible lock orders due to how
it calls into the file system.  The only reason this hasn't been a
major issue is because so many people use partitions, for which no
invalidation was performed anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/block_dev.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9e84b1928b9401..66ebf594c97f47 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1334,12 +1334,6 @@ static void check_disk_size_change(struct gendisk *disk,
 		i_size_write(bdev->bd_inode, disk_size);
 	}
 	spin_unlock(&bdev->bd_size_lock);
-
-	if (bdev_size > disk_size) {
-		if (__invalidate_device(bdev, false))
-			pr_warn("VFS: busy inodes on resized disk %s\n",
-				disk->disk_name);
-	}
 }
 
 /**
-- 
2.28.0


WARNING: multiple messages have this Message-ID
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Justin Sanders" <justin@coraid.com>,
	"Mike Snitzer" <snitzer@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	linux-nvme@lists.infradead.org, "Song Liu" <song@kernel.org>,
	dm-devel@redhat.com, drbd-dev@lists.linbit.com,
	linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org,
	"Ilya Dryomov" <idryomov@gmail.com>,
	"Jack Wang" <jinpu.wang@cloud.ionos.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Josef Bacik" <josef@toxicpanda.com>,
	nbd@other.debian.org, linux-raid@vger.kernel.org,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	ceph-devel@vger.kernel.org, linux-block@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Minchan Kim" <minchan@kernel.org>,
	linux-fsdevel@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change
Date: Wed, 11 Nov 2020 09:26:35 +0100	[thread overview]
Message-ID: <20201111082658.3401686-2-hch@lst.de> (raw)
In-Reply-To: <20201111082658.3401686-1-hch@lst.de>

__invalidate_device without the kill_dirty parameter just invalidates
various clean entries in caches, which doesn't really help us with
anything, but can cause all kinds of horrible lock orders due to how
it calls into the file system.  The only reason this hasn't been a
major issue is because so many people use partitions, for which no
invalidation was performed anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/block_dev.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9e84b1928b9401..66ebf594c97f47 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1334,12 +1334,6 @@ static void check_disk_size_change(struct gendisk *disk,
 		i_size_write(bdev->bd_inode, disk_size);
 	}
 	spin_unlock(&bdev->bd_size_lock);
-
-	if (bdev_size > disk_size) {
-		if (__invalidate_device(bdev, false))
-			pr_warn("VFS: busy inodes on resized disk %s\n",
-				disk->disk_name);
-	}
 }
 
 /**
-- 
2.28.0


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

WARNING: multiple messages have this Message-ID
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Justin Sanders" <justin@coraid.com>,
	"Mike Snitzer" <snitzer@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	linux-nvme@lists.infradead.org, "Song Liu" <song@kernel.org>,
	dm-devel@redhat.com, linux-scsi@vger.kernel.org,
	xen-devel@lists.xenproject.org,
	"Ilya Dryomov" <idryomov@gmail.com>,
	"Jack Wang" <jinpu.wang@cloud.ionos.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Josef Bacik" <josef@toxicpanda.com>,
	nbd@other.debian.org, linux-raid@vger.kernel.org,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	drbd-dev@tron.linbit.com, ceph-devel@vger.kernel.org,
	linux-block@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Minchan Kim" <minchan@kernel.org>,
	linux-fsdevel@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [dm-devel] [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change
Date: Wed, 11 Nov 2020 09:26:35 +0100	[thread overview]
Message-ID: <20201111082658.3401686-2-hch@lst.de> (raw)
In-Reply-To: <20201111082658.3401686-1-hch@lst.de>

__invalidate_device without the kill_dirty parameter just invalidates
various clean entries in caches, which doesn't really help us with
anything, but can cause all kinds of horrible lock orders due to how
it calls into the file system.  The only reason this hasn't been a
major issue is because so many people use partitions, for which no
invalidation was performed anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/block_dev.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9e84b1928b9401..66ebf594c97f47 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1334,12 +1334,6 @@ static void check_disk_size_change(struct gendisk *disk,
 		i_size_write(bdev->bd_inode, disk_size);
 	}
 	spin_unlock(&bdev->bd_size_lock);
-
-	if (bdev_size > disk_size) {
-		if (__invalidate_device(bdev, false))
-			pr_warn("VFS: busy inodes on resized disk %s\n",
-				disk->disk_name);
-	}
 }
 
 /**
-- 
2.28.0

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


  reply	other threads:[~2020-11-11  8:29 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  8:26 cleanup updating the size of block devices v2 Christoph Hellwig
2020-11-11  8:26 ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26 ` Christoph Hellwig
2020-11-11  8:26 ` Christoph Hellwig [this message]
2020-11-11  8:26   ` [dm-devel] [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 12:46   ` Hannes Reinecke
2020-11-11 12:46     ` [dm-devel] " Hannes Reinecke
2020-11-11 12:46     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 02/24] loop: remove loop_set_size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 12:47   ` Hannes Reinecke
2020-11-11 12:47     ` [dm-devel] " Hannes Reinecke
2020-11-11 12:47     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 03/24] nvme: let set_capacity_revalidate_and_notify update the bdev size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:06   ` Hannes Reinecke
2020-11-11 13:06     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:06     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 04/24] sd: update the bdev size in sd_revalidate_disk Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:07   ` Hannes Reinecke
2020-11-11 13:07     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:07     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 05/24] block: remove the update_bdev parameter from set_capacity_revalidate_and_notify Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:07   ` Hannes Reinecke
2020-11-11 13:07     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:07     ` Hannes Reinecke
2020-11-12 19:22   ` Petr Vorel
2020-11-12 19:22     ` [dm-devel] " Petr Vorel
2020-11-12 19:22     ` Petr Vorel
2020-11-11  8:26 ` [PATCH 06/24] block: add a return value to set_capacity_and_notify Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:08   ` Hannes Reinecke
2020-11-11 13:08     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:08     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 07/24] nbd: remove the call to set_blocksize Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 08/24] nbd: move the task_recv check into nbd_size_update Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 09/24] nbd: refactor size updates Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 10/24] nbd: validate the block size in nbd_set_size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 11/24] nbd: use set_capacity_and_notify Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 12/24] aoe: don't call set_capacity from irq context Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 13/24] dm: use set_capacity_and_notify Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:57   ` Hannes Reinecke
2020-11-11 13:57     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:57     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 14/24] pktcdvd: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 15/24] nvme: use set_capacity_and_notify in nvme_set_queue_dying Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 13:59   ` Hannes Reinecke
2020-11-11 13:59     ` [dm-devel] " Hannes Reinecke
2020-11-11 13:59     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 16/24] drbd: use set_capacity_and_notify Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 17/24] rbd: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  9:55   ` Ilya Dryomov
2020-11-11  9:55     ` [dm-devel] " Ilya Dryomov
2020-11-11  9:55     ` Ilya Dryomov
2020-11-11 10:06     ` Jinpu Wang
2020-11-11 10:06       ` [dm-devel] " Jinpu Wang
2020-11-11 10:06       ` Jinpu Wang
2020-11-11  8:26 ` [PATCH 18/24] rnbd: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 19/24] zram: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 20/24] dm-raid: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11 14:00   ` Hannes Reinecke
2020-11-11 14:00     ` [dm-devel] " Hannes Reinecke
2020-11-11 14:00     ` Hannes Reinecke
2020-11-11  8:26 ` [PATCH 21/24] md: " Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 22/24] md: remove a spurious call to revalidate_disk_size in update_size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 23/24] virtio-blk: remove a spurious call to revalidate_disk_size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
2020-11-11  8:26 ` [PATCH 24/24] block: unexport revalidate_disk_size Christoph Hellwig
2020-11-11  8:26   ` [dm-devel] " Christoph Hellwig
2020-11-11  8:26   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2020-11-06 19:03 cleanup updating the size of block devices Christoph Hellwig
2020-11-06 19:03 ` [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change Christoph Hellwig
2020-11-06 19:03   ` Christoph Hellwig

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=20201111082658.3401686-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dm-devel@redhat.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=idryomov@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=josef@toxicpanda.com \
    --cc=justin@coraid.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=minchan@kernel.org \
    --cc=mst@redhat.com \
    --cc=nbd@other.debian.org \
    --cc=pbonzini@redhat.com \
    --cc=roger.pau@citrix.com \
    --cc=snitzer@redhat.com \
    --cc=song@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH 01/24] block: remove the call to __invalidate_device in check_disk_size_change' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.