forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kent Overstreet <[email protected]>
- Loading branch information
Kent Overstreet
committed
Jan 21, 2024
1 parent
4331480
commit 82de620
Showing
2 changed files
with
48 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _BCACHEFS_QUOTA_FORMAT_H | ||
#define _BCACHEFS_QUOTA_FORMAT_H | ||
|
||
/* KEY_TYPE_quota: */ | ||
|
||
enum quota_types { | ||
QTYP_USR = 0, | ||
QTYP_GRP = 1, | ||
QTYP_PRJ = 2, | ||
QTYP_NR = 3, | ||
}; | ||
|
||
enum quota_counters { | ||
Q_SPC = 0, | ||
Q_INO = 1, | ||
Q_COUNTERS = 2, | ||
}; | ||
|
||
struct bch_quota_counter { | ||
__le64 hardlimit; | ||
__le64 softlimit; | ||
}; | ||
|
||
struct bch_quota { | ||
struct bch_val v; | ||
struct bch_quota_counter c[Q_COUNTERS]; | ||
} __packed __aligned(8); | ||
|
||
/* BCH_SB_FIELD_quota: */ | ||
|
||
struct bch_sb_quota_counter { | ||
__le32 timelimit; | ||
__le32 warnlimit; | ||
}; | ||
|
||
struct bch_sb_quota_type { | ||
__le64 flags; | ||
struct bch_sb_quota_counter c[Q_COUNTERS]; | ||
}; | ||
|
||
struct bch_sb_field_quota { | ||
struct bch_sb_field field; | ||
struct bch_sb_quota_type q[QTYP_NR]; | ||
} __packed __aligned(8); | ||
|
||
#endif /* _BCACHEFS_QUOTA_FORMAT_H */ |