[CRIU] [PATCH 8/9] mount: Introduce BTRFS engine

Cyrill Gorcunov gorcunov at openvz.org
Tue Dec 3 07:58:14 PST 2013


It is been found that BTRFS uses per subvolume device
numbering scheme  which causes some of our tests to fail
if they are laying on this filesystem.

Here we introduce minimal engine which parses subvolumes
present on mount point.

Basically the interface is one function btrfs_try_demangle()
which should be called when one need to examinate if
particular device has been mangled by btrfs.

The function is implemented in lazy fashion -- internally
we scans the mount point remembering which subvolumes
are present there. If the function is called for second
time we don't scan mountpoint again but use already obtained
results.

In the code we assume that cpu we're running on
is little endian, thus if one day we run on big
ending machine the code must be updated accordingly.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile.crtools      |   1 +
 include/mount-btrfs.h |  78 +++++++++
 mount-btrfs.c         | 465 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 544 insertions(+)
 create mode 100644 include/mount-btrfs.h
 create mode 100644 mount-btrfs.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-mount-Introduce-BTRFS-engine.patch
Type: text/x-patch
Size: 12779 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20131203/02e459ff/attachment-0001.bin>


More information about the CRIU mailing list