[Pkg-libvirt-commits] [libguestfs] 318/384: New API: btrfstune_enable_skinny_metadata_extent_refs

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:58:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 250db12c24e85e04db2e36a024470647f7148801
Author: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
Date:   Sun Mar 1 02:20:49 2015 -0500

    New API: btrfstune_enable_skinny_metadata_extent_refs
    
    Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 daemon/btrfs.c       | 24 ++++++++++++++++++++++++
 generator/actions.ml | 15 +++++++++++++++
 src/MAX_PROC_NR      |  2 +-
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 48693ce..d4b3207 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1981,3 +1981,27 @@ do_btrfstune_enable_extended_inode_refs (const char *device)
 
   return 0;
 }
+
+int
+do_btrfstune_enable_skinny_metadata_extent_refs (const char *device)
+{
+  const size_t MAX_ARGS = 64;
+  const char *argv[MAX_ARGS];
+  size_t i = 0;
+  CLEANUP_FREE char *err = NULL;
+  CLEANUP_FREE char *out = NULL;
+  int r;
+
+  ADD_ARG (argv, i, str_btrfstune);
+  ADD_ARG (argv, i, "-x");
+  ADD_ARG (argv, i, device);
+  ADD_ARG (argv, i, NULL);
+
+  r = commandv (&out, &err, argv);
+  if (r == -1) {
+    reply_with_error ("%s: %s", device, err);
+    return -1;
+  }
+
+  return 0;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index bf02bdc..448dc4f 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12507,6 +12507,21 @@ so that you can use it tto build other filesystems." };
     longdesc = "\
 This will Enable extended inode refs." };
 
+  { defaults with
+    name = "btrfstune_enable_skinny_metadata_extent_refs";
+    style = RErr, [Device "device"], [];
+    proc_nr = Some 452;
+    optional = Some "btrfs"; camel_name = "BTRFSTuneEnableSkinnyMetadataExtentRefs";
+    tests = [
+      InitPartition, Always, TestRun (
+        [["mkfs_btrfs"; "/dev/sda1"; ""; ""; "NOARG"; ""; "NOARG"; "NOARG"; ""; ""];
+         ["btrfstune_enable_skinny_metadata_extent_refs"; "/dev/sda1"]]), []
+    ];
+
+    shortdesc = "enable skinny metadata extent refs";
+    longdesc = "\
+This enable skinny metadata extent refs." };
+
 ]
 
 (* Non-API meta-commands available only in guestfish.
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index 4619a8a..8670c73 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-451
+452

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list