[CRIU] [PATCH 15/18] dump: Add dumping of fanotify objects

Pavel Emelyanov xemul at parallels.com
Mon Jan 14 04:59:38 EST 2013


On 01/14/2013 01:53 PM, Cyrill Gorcunov wrote:
> On Mon, Jan 14, 2013 at 01:36:58PM +0400, Pavel Emelyanov wrote:
>>> +		if (!we->f_handle->bytes && !we->i_ino) {
>>> +			struct mount_info *m;
>>> +
>>> +			m = lookup_mnt_id(we->s_dev);
>>> +			if (!m) {
>>> +				pr_err("Can't find mnt_id %x\n", we->s_dev);
>>> +				return -1;
>>> +			}
>>> +			we->s_dev = m->s_dev;
>>> +		} else
>>> +			we->has_mflags = true;
>>
>> This is unpareable and I cannot find a single bit of logic here :(
> 
> The problem is that fanotify for mount points and inodes (while have
> same general name "fanotify") do differ in format and arguments they
> use. So I wanted to reuse existing FsnotifyWdEntry format for that.
> 
> Optionally I can think of distingushing notifications in protobuf
> format itself (ie to have 3 types of records: inotify, fanotify-on-node,
> fanotify-on-mount-point). I guess this would make code simplier from
> one point of view, on another hands this bloats our codebase.
> 
> Would you prefer 3 types instead?

Yup, let's do it. I think that the patch #3 will also become simpler as
well if we completely split these gentlemen.

> 	Cyrill
> .
> 




More information about the CRIU mailing list