2012-08-07 10:37:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 STRATO. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public
|
|
|
|
* License v2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 021110-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2021-09-07 16:40:48 +00:00
|
|
|
#ifndef __CMDS_QGROUP_H__
|
|
|
|
#define __CMDS_QGROUP_H__
|
2012-08-07 10:37:54 +00:00
|
|
|
|
2013-01-20 21:04:15 +00:00
|
|
|
#include "kerncompat.h"
|
2023-04-19 21:17:12 +00:00
|
|
|
#include "kernel-shared/uapi/btrfs.h"
|
2012-08-07 10:37:54 +00:00
|
|
|
|
2018-03-02 15:21:59 +00:00
|
|
|
struct btrfs_qgroup_info {
|
|
|
|
u64 generation;
|
2023-01-03 11:41:23 +00:00
|
|
|
u64 referenced;
|
|
|
|
u64 referenced_compressed;
|
|
|
|
u64 exclusive;
|
|
|
|
u64 exclusive_compressed;
|
2018-03-02 15:21:59 +00:00
|
|
|
};
|
|
|
|
|
2018-03-02 16:27:22 +00:00
|
|
|
struct btrfs_qgroup_stats {
|
|
|
|
u64 qgroupid;
|
|
|
|
struct btrfs_qgroup_info info;
|
|
|
|
struct btrfs_qgroup_limit limit;
|
|
|
|
};
|
|
|
|
|
2021-09-07 17:09:33 +00:00
|
|
|
int btrfs_qgroup_inherit_size(struct btrfs_qgroup_inherit *p);
|
|
|
|
int btrfs_qgroup_inherit_add_group(struct btrfs_qgroup_inherit **inherit, char *arg);
|
|
|
|
int btrfs_qgroup_inherit_add_copy(struct btrfs_qgroup_inherit **inherit, char *arg,
|
2012-08-07 10:37:54 +00:00
|
|
|
int type);
|
2018-03-02 16:27:22 +00:00
|
|
|
int btrfs_qgroup_query(int fd, u64 qgroupid, struct btrfs_qgroup_stats *stats);
|
2021-09-07 16:40:48 +00:00
|
|
|
|
2012-08-07 10:37:54 +00:00
|
|
|
#endif
|