confusion about multipath_prepare_ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear,

Sorry to trouble you.

I noticed some code in dm-*.c like:
"
static int multipath_prepare_ioctl(struct dm_target *ti,
		struct block_device **bdev, fmode_t *mode)
{
...
	/*
	 * Only pass ioctls through if the device sizes match exactly.
	 */
	if (!r && ti->len != i_size_read((*bdev)->bd_inode) >> SECTOR_SHIFT)
		return 1;
...
}
"
Here, return value 1 means 
"ioctl is being issued against a subset of the parent bdev; require extra privileges."
(comment in dm_blk_ioctl)

I'm confused by the comment and '!=' test for multipath. 
In which cases, the size of low level single device is not equal to the parent 
size of multipath device?


Regards,
shenghui

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux