From: Erik Mouw <erik@harddisk-recovery.com>
To: Suzuki Kp <suzuki@in.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC] PATCH to fix rescan_partitions to return errors properly
Date: Wed, 4 Oct 2006 15:09:32 +0200 [thread overview]
Message-ID: <20061004130932.GC18800@harddisk-recovery.com> (raw)
In-Reply-To: <452307B4.3050006@in.ibm.com>
On Tue, Oct 03, 2006 at 06:00:36PM -0700, Suzuki Kp wrote:
> Currently the rescan_partition returns 0 (success), even if it is unable
> to rescan the partition information ( may be due to disks offline, I/O
> error reading the table or unknown partition ). This would make ioctl()
> calls succeed for BLKRRPART requests even if partitions were not scanned
> properly, which is not a good thing to do.
>
> Attached here is patch to fix the issue. The patch makes
> rescan_partition to return -EINVAL for unknown partitions and -EIO for
> disk I/O errors ( or when disks are offline ).
I don't think it's a good idea to return an error when there's an
unknown partition table. How do you differentiate between a device that
isn't partitioned at all and a device with an unknown partition table?
Better return 0 on an unknown partition table.
Erik
--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
next prev parent reply other threads:[~2006-10-04 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 1:00 [RFC] PATCH to fix rescan_partitions to return errors properly Suzuki Kp
2006-10-04 13:09 ` Erik Mouw [this message]
2006-10-04 16:50 ` Suzuki Kp
2006-10-04 17:08 ` Erik Mouw
2006-10-04 17:37 ` Suzuki Kp
2006-10-05 10:40 ` Erik Mouw
2006-10-05 20:32 ` [RFC] PATCH to fix rescan_partitions to return errors properly - take 2 Suzuki Kp
2006-10-05 22:07 ` Andrew Morton
2006-10-06 12:53 ` Erik Mouw
2006-10-06 17:43 ` Suzuki K P
2006-10-06 21:07 ` Erik Mouw
2006-10-07 1:46 ` [RFC] Fix check_partition routines ( was Re: [RFC] PATCH to fix rescan_partitions to return errors properly - take 2) Suzuki K P
2006-10-07 2:45 ` Andrew Morton
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=20061004130932.GC18800@harddisk-recovery.com \
--to=erik@harddisk-recovery.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suzuki@in.ibm.com \
/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).