projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs-progs: tests: add helper to log pipe stdout
[platform/upstream/btrfs-progs.git]
/
qgroup.h
diff --git
a/qgroup.h
b/qgroup.h
index
5fcdd8a
..
875fbdf
100644
(file)
--- a/
qgroup.h
+++ b/
qgroup.h
@@
-16,27
+16,41
@@
* Boston, MA 021110-1307, USA.
*/
* Boston, MA 021110-1307, USA.
*/
-#ifndef _
BTRFS_QGROUP_H
-#define _
BTRFS_QGROUP_H
+#ifndef _
_BTRFS_QGROUP_H__
+#define _
_BTRFS_QGROUP_H__
-#include "ioctl.h"
#include "kerncompat.h"
#include "kerncompat.h"
+#include "ioctl.h"
struct btrfs_qgroup;
typedef int (*btrfs_qgroup_filter_func)(struct btrfs_qgroup *, u64);
struct btrfs_qgroup;
typedef int (*btrfs_qgroup_filter_func)(struct btrfs_qgroup *, u64);
+typedef int (*btrfs_qgroup_comp_func)(struct btrfs_qgroup *,
+ struct btrfs_qgroup *, int);
+
struct btrfs_qgroup_filter {
btrfs_qgroup_filter_func filter_func;
u64 data;
};
struct btrfs_qgroup_filter {
btrfs_qgroup_filter_func filter_func;
u64 data;
};
+struct btrfs_qgroup_comparer {
+ btrfs_qgroup_comp_func comp_func;
+ int is_descending;
+};
+
struct btrfs_qgroup_filter_set {
int total;
int nfilters;
struct btrfs_qgroup_filter filters[0];
};
struct btrfs_qgroup_filter_set {
int total;
int nfilters;
struct btrfs_qgroup_filter filters[0];
};
+struct btrfs_qgroup_comparer_set {
+ int total;
+ int ncomps;
+ struct btrfs_qgroup_comparer comps[0];
+};
+
enum btrfs_qgroup_column_enum {
BTRFS_QGROUP_QGROUPID,
BTRFS_QGROUP_RFER,
enum btrfs_qgroup_column_enum {
BTRFS_QGROUP_QGROUPID,
BTRFS_QGROUP_RFER,
@@
-48,20
+62,34
@@
enum btrfs_qgroup_column_enum {
BTRFS_QGROUP_ALL,
};
BTRFS_QGROUP_ALL,
};
+enum btrfs_qgroup_comp_enum {
+ BTRFS_QGROUP_COMP_QGROUPID,
+ BTRFS_QGROUP_COMP_RFER,
+ BTRFS_QGROUP_COMP_EXCL,
+ BTRFS_QGROUP_COMP_MAX_RFER,
+ BTRFS_QGROUP_COMP_MAX_EXCL,
+ BTRFS_QGROUP_COMP_MAX
+};
+
enum btrfs_qgroup_filter_enum {
BTRFS_QGROUP_FILTER_PARENT,
BTRFS_QGROUP_FILTER_ALL_PARENT,
BTRFS_QGROUP_FILTER_MAX,
};
enum btrfs_qgroup_filter_enum {
BTRFS_QGROUP_FILTER_PARENT,
BTRFS_QGROUP_FILTER_ALL_PARENT,
BTRFS_QGROUP_FILTER_MAX,
};
-u64 btrfs_get_path_rootid(int fd);
-int btrfs_show_qgroups(int fd, struct btrfs_qgroup_filter_set *);
+int btrfs_qgroup_parse_sort_string(const char *opt_arg,
+ struct btrfs_qgroup_comparer_set **comps);
+int btrfs_show_qgroups(int fd, struct btrfs_qgroup_filter_set *,
+ struct btrfs_qgroup_comparer_set *);
void btrfs_qgroup_setup_print_column(enum btrfs_qgroup_column_enum column);
void btrfs_qgroup_setup_print_column(enum btrfs_qgroup_column_enum column);
+void btrfs_qgroup_setup_units(unsigned unit_mode);
struct btrfs_qgroup_filter_set *btrfs_qgroup_alloc_filter_set(void);
struct btrfs_qgroup_filter_set *btrfs_qgroup_alloc_filter_set(void);
-void btrfs_qgroup_free_filter_set(struct btrfs_qgroup_filter_set *filter_set);
int btrfs_qgroup_setup_filter(struct btrfs_qgroup_filter_set **filter_set,
enum btrfs_qgroup_filter_enum, u64 data);
int btrfs_qgroup_setup_filter(struct btrfs_qgroup_filter_set **filter_set,
enum btrfs_qgroup_filter_enum, u64 data);
-u64 parse_qgroupid(char *p);
+struct btrfs_qgroup_comparer_set *btrfs_qgroup_alloc_comparer_set(void);
+int btrfs_qgroup_setup_comparer(struct btrfs_qgroup_comparer_set **comp_set,
+ enum btrfs_qgroup_comp_enum comparer,
+ int is_descending);
int qgroup_inherit_size(struct btrfs_qgroup_inherit *p);
int qgroup_inherit_add_group(struct btrfs_qgroup_inherit **inherit, char *arg);
int qgroup_inherit_add_copy(struct btrfs_qgroup_inherit **inherit, char *arg,
int qgroup_inherit_size(struct btrfs_qgroup_inherit *p);
int qgroup_inherit_add_group(struct btrfs_qgroup_inherit **inherit, char *arg);
int qgroup_inherit_add_copy(struct btrfs_qgroup_inherit **inherit, char *arg,