[CRIU] [PATCH 3/5] mount: Introduce BTRFS engine

Pavel Emelyanov xemul at parallels.com
Fri Nov 29 02:49:53 PST 2013


On 11/29/2013 01:34 PM, Cyrill Gorcunov wrote:
> 
> 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 ++++++++++++++++++++++++++++++++++++++++++++++++++

Where has this code come from? Is there a btrfs-devel.so with this?

>  4 files changed, 570 insertions(+)
>  create mode 100644 include/mount-btrfs.h
>  create mode 100644 mount-btrfs.c
> 




More information about the CRIU mailing list