1. 08 Jan, 2016 4 commits
  2. 06 Jan, 2016 1 commit
  3. 04 Jan, 2016 15 commits
  4. 01 Jan, 2016 1 commit
  5. 30 Dec, 2015 1 commit
  6. 28 Dec, 2015 11 commits
    • Merge pull request #734 from brauner/2015-12-12/split_bdev_into_modules · cb65e5d7
      Serge Hallyn authored
      split bdev into modules: btrfs + rsync
    • Add <linux/types.h> header to lxcbtrfs.h · c40c5fdf
      Christian Brauner authored
      Using
      
      	#include <sys/types.h>
      
      is not sufficient to guarantee that __le64 and other types are defined.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Simplify overlay.{c,h} · 3188197d
      Christian Brauner authored
      The struct
      
      	struct ovl_rsync_data {
      		struct bdev *orig;
      		struct bdev *new;
      	};
      
      is simply a duplicate of
      
      	struct rsync_data {
      		struct bdev *orig;
      		struct bdev *new;
      	};
      
      So let's replace any references to ovl_rsync_data with rsync_data.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Split bdev into modules: lxcrsync · e9df7e1a
      Christian Brauner authored
      The functions:
      
              - do_rsync();
              - rsync_delta();
              - rsync_delta_wrapper();
              - rsync_rootfs();
              - rsync_rootfs_wrapper();
      
      and the structs
      
              - struct rsync_data;
              - struct rsync_data_char;
      
      move from bdev.{c,h} to lxcrsync.{c.h}. All functions previously declared as
      static become public.
      
      lxcrsync.{c,h} should allow for a reasonable amount of abstraction regarding
      our rsync functions. Some of the functions could easily be abstracted.
      
      Adapt Makefile.am to include lxcrsync.{c,h}.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • lxcbtrfs.{c,h} rework declarations and definitions · 988be9c1
      Christian Brauner authored
      Declare
      
      	- btrfs_same_fs();
      	- btrfs_snapshot();
      
      extern instead of static in lxcbtrfs.h. They are defined in lxcbtrfs.c.
      
      Forward declare/put
      
      	- struct bdev; /* defined in bdev.h */
      	- struct bdev_specs; /* defined in lxccontainer.h */
      	- struct lxc_conf; /* defined conf.h */
      
      as incomplete types in lxcbtrfs.h so that functions declared and defined in
      lxcbtrfs.{c,h} have access to it.
      
      Declare
      
      	- dir_new_path();
      
      in lxcbtrfs.c. It is defined in lxccontainer.c.
      
      Move definition of struct
      
      	- struct rsync_data_char;
      
      from bdev.c to bdev.h because the functions in lxcbtrfs.{c,h} need to access it.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Split bdev into modules: btrfs · 3c16d0cb
      Christian Brauner authored
      Create a module for btrfs: lxcbtrfs.{c,h}.
      
      The functions:
      
      	- get_btrfs_subvol_path()
      	- btrfs_list_get_path_rootid()
      	- is_btrfs_fs()
      	- btrfs_detect()
      	- btrfs_mount()
      	- btrfs_umount()
      	- btrfs_subvolume_create()
      	- btrfs_same_fs()
      	- btrfs_snapshot()
      	- btrfs_snapshot_wrapper()
      	- btrfs_clonepaths()
      	- btrfs_do_destroy_subvol()
      	- get_btrfs_tree_idx()
      	- my_btrfs_tree *create_my_btrfs_tree()
      	- update_tree_node()
      	- add_btrfs_tree_node()
      	- free_btrfs_tree()
      	- do_remove_btrfs_children()
      	- btrfs_recursive_destroy()
      	- btrfs_try_remove_subvol()
      	- btrfs_destroy()
      	- btrfs_create()
      
      and the structs:
      
      	- struct mytree_node
      	- struct my_btrfs_tree
      
      move from bdev.{c,h} to lxcbtrfs.{c,h}.
      
      Rename the header file
      
      	- lxc-btrfs.h --> lxcbtrfs.h
      
      Adapt Makefile.am to include lxcbtrfs.{c,h} and remove lxc-btrfs.h.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Add <linux/types.h> header to lxcbtrfs.h · fc58bf2c
      Christian Brauner authored
      Using
      
      	#include <sys/types.h>
      
      is not sufficient to guarantee that __le64 and other types are defined.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Simplify overlay.{c,h} · e0d0f93b
      Christian Brauner authored
      The struct
      
      	struct ovl_rsync_data {
      		struct bdev *orig;
      		struct bdev *new;
      	};
      
      is simply a duplicate of
      
      	struct rsync_data {
      		struct bdev *orig;
      		struct bdev *new;
      	};
      
      So let's replace any references to ovl_rsync_data with rsync_data.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Split bdev into modules: lxcrsync · cd0f1eeb
      Christian Brauner authored
      The functions:
      
              - do_rsync();
              - rsync_delta();
              - rsync_delta_wrapper();
              - rsync_rootfs();
              - rsync_rootfs_wrapper();
      
      and the structs
      
              - struct rsync_data;
              - struct rsync_data_char;
      
      move from bdev.{c,h} to lxcrsync.{c.h}. All functions previously declared as
      static become public.
      
      lxcrsync.{c,h} should allow for a reasonable amount of abstraction regarding
      our rsync functions. Some of the functions could easily be abstracted.
      
      Adapt Makefile.am to include lxcrsync.{c,h}.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • lxcbtrfs.{c,h} rework declarations and definitions · 93d4475e
      Christian Brauner authored
      Declare
      
      	- btrfs_same_fs();
      	- btrfs_snapshot();
      
      extern instead of static in lxcbtrfs.h. They are defined in lxcbtrfs.c.
      
      Forward declare/put
      
      	- struct bdev; /* defined in bdev.h */
      	- struct bdev_specs; /* defined in lxccontainer.h */
      	- struct lxc_conf; /* defined conf.h */
      
      as incomplete types in lxcbtrfs.h so that functions declared and defined in
      lxcbtrfs.{c,h} have access to it.
      
      Declare
      
      	- dir_new_path();
      
      in lxcbtrfs.c. It is defined in lxccontainer.c.
      
      Move definition of struct
      
      	- struct rsync_data_char;
      
      from bdev.c to bdev.h because the functions in lxcbtrfs.{c,h} need to access it.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Split bdev into modules: btrfs · f2e50c44
      Christian Brauner authored
      Create a module for btrfs: lxcbtrfs.{c,h}.
      
      The functions:
      
      	- get_btrfs_subvol_path()
      	- btrfs_list_get_path_rootid()
      	- is_btrfs_fs()
      	- btrfs_detect()
      	- btrfs_mount()
      	- btrfs_umount()
      	- btrfs_subvolume_create()
      	- btrfs_same_fs()
      	- btrfs_snapshot()
      	- btrfs_snapshot_wrapper()
      	- btrfs_clonepaths()
      	- btrfs_do_destroy_subvol()
      	- get_btrfs_tree_idx()
      	- my_btrfs_tree *create_my_btrfs_tree()
      	- update_tree_node()
      	- add_btrfs_tree_node()
      	- free_btrfs_tree()
      	- do_remove_btrfs_children()
      	- btrfs_recursive_destroy()
      	- btrfs_try_remove_subvol()
      	- btrfs_destroy()
      	- btrfs_create()
      
      and the structs:
      
      	- struct mytree_node
      	- struct my_btrfs_tree
      
      move from bdev.{c,h} to lxcbtrfs.{c,h}.
      
      Rename the header file
      
      	- lxc-btrfs.h --> lxcbtrfs.h
      
      Adapt Makefile.am to include lxcbtrfs.{c,h} and remove lxc-btrfs.h.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
  7. 24 Dec, 2015 1 commit
  8. 23 Dec, 2015 2 commits
  9. 21 Dec, 2015 4 commits