public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] restore BLKRRPART semantics
Date: Tue, 7 Dec 2004 12:18:54 +0100	[thread overview]
Message-ID: <20041207111853.GA8915@apps.cwi.nl> (raw)

In 2.6.8 the code for the BLKRRPART ioctl was changed
to return EIO when no partitions were found, such as
on an empty disk. This breaks some partitioning programs
and is also confusing: "Input/Output error" while in fact
nothing was wrong with this brand new all blank disk.

This restores old behaviour.

Andries

diff -uprN -X /linux/dontdiff a/fs/partitions/check.c b/fs/partitions/check.c
--- a/fs/partitions/check.c	2004-12-04 16:18:22.000000000 +0100
+++ b/fs/partitions/check.c	2004-12-07 12:26:28.000000000 +0100
@@ -378,7 +378,7 @@ int rescan_partitions(struct gendisk *di
 	if (disk->fops->revalidate_disk)
 		disk->fops->revalidate_disk(disk);
 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
-		return -EIO;
+		return 0;
 	for (p = 1; p < state->limit; p++) {
 		sector_t size = state->parts[p].size;
 		sector_t from = state->parts[p].from;

                 reply	other threads:[~2004-12-07 11:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20041207111853.GA8915@apps.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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