cefdfe10e2cf7fa057d6c1a50a80d8896f8aae36
[platform/upstream/btrfs-progs.git] / qgroup.h
1 /*
2  * Copyright (C) 2012 STRATO.  All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public
6  * License v2 as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public
14  * License along with this program; if not, write to the
15  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16  * Boston, MA 021110-1307, USA.
17  */
18
19 #ifndef _BTRFS_QGROUP_H
20 #define _BTRFS_QGROUP_H
21
22 #include "ioctl.h"
23 #include "kerncompat.h"
24
25 enum btrfs_qgroup_column_enum {
26         BTRFS_QGROUP_QGROUPID,
27         BTRFS_QGROUP_RFER,
28         BTRFS_QGROUP_EXCL,
29         BTRFS_QGROUP_PARENT,
30         BTRFS_QGROUP_ALL,
31 };
32
33 int  btrfs_show_qgroups(int fd);
34 void btrfs_qgroup_setup_print_column(enum btrfs_qgroup_column_enum column);
35
36 u64 parse_qgroupid(char *p);
37 int qgroup_inherit_size(struct btrfs_qgroup_inherit *p);
38 int qgroup_inherit_add_group(struct btrfs_qgroup_inherit **inherit, char *arg);
39 int qgroup_inherit_add_copy(struct btrfs_qgroup_inherit **inherit, char *arg,
40                             int type);
41
42 #endif