[CRIU] [PATCH 1/5] btrfs: Introduce BTRFS engine

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 4 07:15:10 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.

The interface is two functions

 - btrfs_parse_mountinfo: this one parses subvolume and caches the results
 - is_btrfs_subvol: test if device id is laying on subvolume

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 |  81 ++++++++
 mount-btrfs.c         | 499 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 581 insertions(+)
 create mode 100644 include/mount-btrfs.h
 create mode 100644 mount-btrfs.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-btrfs-Introduce-BTRFS-engine.patch
Type: text/x-patch
Size: 13834 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20131204/159d1683/attachment-0001.bin>


More information about the CRIU mailing list