[CRIU] [PATCH 3/5] mount: Introduce BTRFS engine
Cyrill Gorcunov
gorcunov at openvz.org
Fri Nov 29 01:34:30 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 that
- btrfs_init: Bare init function which must be
called before anything else
- btrfs_parse_entry: Parses mount entry and finds
subvolumes names if they are present
- btrfs_dev_match: Test if the device on path
matches one of subvolume id
- btrfs_fini: Cleans up resources all resources,
must be called at the end
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 +
cr-dump.c | 5 +
include/mount-btrfs.h | 85 +++++++++
mount-btrfs.c | 479 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 570 insertions(+)
create mode 100644 include/mount-btrfs.h
create mode 100644 mount-btrfs.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-mount-Introduce-BTRFS-engine.patch
Type: text/x-patch
Size: 13726 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20131129/8b06bdd8/attachment-0001.bin>
More information about the CRIU
mailing list