[CRIU] [PATCH RFC 0/2] Mount point hash

Pavel Emelyanov xemul at virtuozzo.com
Wed Mar 23 05:53:47 PDT 2016


On 03/23/2016 02:16 PM, Stanislav Kinsburskiy wrote:
> 
> 
> 23.03.2016 12:14, Pavel Emelyanov пишет:
>> On 03/17/2016 03:53 PM, Stanislav Kinsburskiy wrote:
>>> This series introduces hash for mount points.
>>> The major reason for it is upcomming NFS migration, which is expected to
>>> heavily search over mount points by mnt_id (to be able to get file system ID
>>> instead of statfs() call, for instance).
>>> The idea is trivial and doesn't require an explicit explanation.
>>> However, there will be two sets of mount points is this series is merged: hash
>>> and list.
>>> List looks redundant and less efficient. Traversing hash table for all the
>>> mounts has the same complexity as over the list: O(n).
>>> But replacing the list with hash will require a lot or code refactoring, and
>>> I'm not sure, does it worth it.
>> The mnt_id, which you plan to use to lookup fstype for file descriptors,
>> was introduced later than 3.11, thus this patch won't make any use for
>> this kernel.
> 
> Sorry, but I don't understand what you are trying to say by this comment.
> Could you please elaborate?

You introduce this set to make '[PATCH RFC 2/2] mount: "get fs type by mount 
id" helper introduced' work faster, don't you?

My point is that the mnt_id, using which you search for mount-info, is not
available for files on kernels prior to ... 3.15 and is thus not extremely
useful. Probably.

-- Pavel


More information about the CRIU mailing list