The patch titled fix rescan_partitions to return errors properly has been removed from the -mm tree. Its filename was fix-rescan_partitions-to-return-errors-properly.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: fix rescan_partitions to return errors properly From: Suzuki Kp <suzuki@xxxxxxxxxx> The current rescan_partition implementation ignores the errors that comes from the lower layer. It reports success for unknown partitions as well as I/O error cases while reading the partition information. The unknown partition is not (and will not be) considered as an error in the kernel, since there are legal users of it (e.g, members of a RAID5 MD Device or a new disk which is not partitioned at all ). Changing this behaviour would scare the user about a serious problem with their disk and is not recommended. Thus for both "unknown partitions" to the Linux (eg., DEC VMS,Novell Netware) and the legal users of NULL partition, would still be reported as "SUCCESS". The patch attached here, scares the user about something which he does need to worry about. i.e, returning -EIO on disk I/O errors while reading the partition information. Signed-off-by: Suzuki K P <suzuki@xxxxxxxxxx> Cc: Erik Mouw <erik@xxxxxxxxxxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/partitions/check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/partitions/check.c~fix-rescan_partitions-to-return-errors-properly fs/partitions/check.c --- a/fs/partitions/check.c~fix-rescan_partitions-to-return-errors-properly +++ a/fs/partitions/check.c @@ -177,7 +177,7 @@ check_partition(struct gendisk *hd, stru else if (warn_no_part) printk(" unable to read partition table\n"); kfree(state); - return NULL; + return ERR_PTR(res); } /* @@ -494,6 +494,8 @@ int rescan_partitions(struct gendisk *di disk->fops->revalidate_disk(disk); if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) return 0; + if (IS_ERR(state)) /* I/O error reading the partition table */ + return PTR_ERR(state); for (p = 1; p < state->limit; p++) { sector_t size = state->parts[p].size; sector_t from = state->parts[p].from; _ Patches currently in -mm which might be from suzuki@xxxxxxxxxx are origin.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html