Messages in this thread | | | Date | Wed, 21 Dec 2011 15:46:41 -0500 | From | Vivek Goyal <> | Subject | Re: [PATCH 1/2] Add partition resize function to BLKPG ioctl |
| |
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
| |