Re: Failure to reread partition tables on non-busy devices

From: Douglas Gilbert (dougg@torque.net)
Date: Sun Nov 17 2002 - 19:35:07 EST


Doug,
Your patch below fixes the problem I was seeing with fdisk
creating new partitions (on a scsi_debug ram disk) not being
visible outside fdisk.

Doug Gilbert

Doug Ledford wrote:
> This patch (almost certainly wrong BTW) makes it work. Obviously,
> somewhere there should be a call to invalidate_bdev(); that doesn't exist.
> I'm not sure A) where that call should be and B) what checks there should
> be to avoid calling invalidate_bdev() on a device that is busy.
>
> fs/partitions/check.c: 1.85 1.86 dledford 02/11/17 17:22:37 (modified,
> needs delta)
>
> @@ -453,8 +453,8 @@ int rescan_partitions()
> struct parsed_partitions *state;
> int p, res;
>
> - if (!bdev->bd_invalidated)
> - return 0;
> + //if (!bdev->bd_invalidated)
> + // return 0;
> if (bdev->bd_part_count)
> return -EBUSY;
> res = invalidate_device(dev, 1);
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:20 EST