[CRIU] [PATCH 11/12] fdset: Introduce new fdsets

Pavel Emelyanov xemul at parallels.com
Mon Mar 26 09:46:39 EDT 2012


Current fdsets are ugly, limited (bitmask will exhaust in several months) and
suffer from unknown problems with fdsets reuse :(

With new approach (this set) the images management is simple. The basic function
is open_image, which gives you an fd for an image. If you want to pre-open several
images at once instead of calling open_image every single time, you can use the
new fdsets.

Images CR_FD_ descriptors should be grouped like

_CR_FD_FOO_FROM,
CR_FD_FOO_ITEM1,
CR_FD_FOO_ITEM2,
...
CR_FD_FOO_ITEMN,
_CR_FD_FOO_TO,

After this you can call cr_fd_open() specifying ranges -- _FROM and _TO macros,
it will give you an cr_fdset object. Then the fdset_fd(set, type) will give you
the descriptor of the open "set" group corresponding to the "type" type.

3 groups are introduced in this set -- tasks, ns and global.

That's it.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>

---

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-proper-fdsets.patch
Type: text/x-patch
Size: 4423 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120326/7aaac60f/0011-proper-fdsets.bin


More information about the CRIU mailing list