public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Scsi Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Failure to reread partition tables on non-busy devices
Date: Sun, 17 Nov 2002 22:06:39 -0500	[thread overview]
Message-ID: <20021118030639.GD4608@redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0211171939580.23400-100000@steklov.math.psu.edu>

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Sun, Nov 17, 2002 at 07:43:27PM -0500, Alexander Viro wrote:
> Not really.  Correct fix is:
> 	a) in fs/block_dev.c::full_check_disk_change() replace
> 
> 	if (check_disk_change(bdev)) {
> with
> 	if (check_disk_change(bdev) && bdev->bd_invalidated) {
> 
> 	b) lost the check in rescan_partitions().
> 
> Other callers either do that check themselves or don't want that check to
> happen at all (BLKRRPART).

Well, since you didn't attach the patch, here it is.

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  

[-- Attachment #2: part.patch --]
[-- Type: text/plain, Size: 735 bytes --]

===== fs/block_dev.c 1.112 vs edited =====
--- 1.112/fs/block_dev.c	Sun Nov 17 08:09:16 2002
+++ edited/fs/block_dev.c	Sun Nov 17 22:00:23 2002
@@ -520,7 +520,7 @@
 	if (bdev->bd_contains != bdev)
 		BUG();
 	down(&bdev->bd_sem);
-	if (check_disk_change(bdev)) {
+	if (check_disk_change(bdev) && bdev->bd_invalidated) {
 		rescan_partitions(bdev->bd_disk, bdev);
 		res = 1;
 	}
===== fs/partitions/check.c 1.85 vs edited =====
--- 1.85/fs/partitions/check.c	Mon Nov 11 22:16:11 2002
+++ edited/fs/partitions/check.c	Sun Nov 17 21:59:28 2002
@@ -453,8 +453,6 @@
 	struct parsed_partitions *state;
 	int p, res;
 
-	if (!bdev->bd_invalidated)
-		return 0;
 	if (bdev->bd_part_count)
 		return -EBUSY;
 	res = invalidate_device(dev, 1);

      reply	other threads:[~2002-11-18  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18  0:05 Failure to reread partition tables on non-busy devices Doug Ledford
2002-11-18  0:35 ` Douglas Gilbert
2002-11-18  0:43 ` Alexander Viro
2002-11-18  3:06   ` Doug Ledford [this message]

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=20021118030639.GD4608@redhat.com \
    --to=dledford@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /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