Re: [PATCH 1/2] Add partition resize function to BLKPG ioctl

From: Vivek Goyal
Date: Wed Dec 21 2011 - 15:46:52 EST


On Tue, Dec 20, 2011 at 08:53:52PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 12/19/2011 03:25 PM, Vivek Goyal wrote:
> > Are there any restrictions on order of partition bdev and disk bdev
> > locking.
>
> Good point, yes, it seems you need to take the partition first. Now that I think about it though, I don't think we need the disk mutex at all. I thought you needed to hold it in order to iterate over the partitions, but it looks like you don't since that uses an RCU, right?
>

I guess taking disk mutex will help us providing mutual exclusion between
multiple ioctls or multiple instances of same ioctl. Like, while you are
extending a partition and checking for overlap, you don't want another call
making progress on next partition which might overlap with this partition.

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