[CRIU] [PATCH 5/7] sk-unix: Don't fail if socket path lays on btrfs volume

Pavel Emelyanov xemul at parallels.com
Wed Dec 4 05:58:35 PST 2013


On 12/04/2013 05:54 PM, Cyrill Gorcunov wrote:
> On Wed, Dec 04, 2013 at 05:51:33PM +0400, Pavel Emelyanov wrote:
>>
>> - if (st.st_dev != dev)
>> + if (phys_stat_dev_match(st.st_dev, dev)
>>
>> in all the places including ghosts and inotifies, where
>>
>> bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev)
>> {
>> 	struct mount_info *mi;
>>
>> 	if (st_dev == phys_dev)
>> 		return true;
>>
>> 	/*
>> 	 * comment here about btrfs devs screwup
>> 	 */
>>
>> 	mi = lookup_mnt_sdev(phys_dev);
>> 	if (!mi)
>> 		/* no mountpoint with this device */
>> 		return false;
>>
>> 	if (strcmp(mi->kfstype, "btrfs"))
>> 		/* not btrfs -- no match */
>> 		return false;
>>
>> 	if (!mi->private)
>> 		btrfs_lazy_parse_subvol(mi);
> 
> btrfs_lazy_parse_subvol _may_ fail, and when it happens you
> must exit out with error.

C++ exceptions would be useful here :) OK, I see, let's switch to
non-lazy scheme for a while.



More information about the CRIU mailing list