Lines Matching defs:inherit

3045 			       struct btrfs_qgroup_inherit *inherit,
3050 if (inherit->flags & ~BTRFS_QGROUP_INHERIT_FLAGS_SUPP)
3052 if (size < sizeof(*inherit) || size > PAGE_SIZE)
3064 if (inherit->num_ref_copies > 0 || inherit->num_excl_copies > 0)
3067 if (inherit->num_qgroups > PAGE_SIZE)
3070 if (size != struct_size(inherit, qgroups, inherit->num_qgroups))
3079 for (int i = 0; i < inherit->num_qgroups; i++) {
3081 u64 qgroupid = inherit->qgroups[i];
3099 struct btrfs_qgroup_inherit **inherit)
3109 if (*inherit)
3134 *inherit = res;
3144 * Return 0 if a quick inherit is done.
3145 * Return >0 if a quick inherit is not possible, and a full rescan is needed.
3202 struct btrfs_qgroup_inherit *inherit)
3251 if (btrfs_qgroup_mode(fs_info) == BTRFS_QGROUP_MODE_SIMPLE && !inherit) {
3252 ret = qgroup_auto_inherit(fs_info, inode_rootid, &inherit);
3258 if (inherit) {
3259 i_qgroups = (u64 *)(inherit + 1);
3260 nums = inherit->num_qgroups + 2 * inherit->num_ref_copies +
3261 2 * inherit->num_excl_copies;
3287 if (inherit) {
3288 i_qgroups = (u64 *)(inherit + 1);
3289 for (i = 0; i < inherit->num_qgroups; ++i, ++i_qgroups) {
3303 qlist_prealloc = kcalloc(inherit->num_qgroups,
3310 for (int i = 0; i < inherit->num_qgroups; i++) {
3325 if (inherit && inherit->flags & BTRFS_QGROUP_INHERIT_SET_LIMITS) {
3326 dstgroup->lim_flags = inherit->lim.flags;
3327 dstgroup->max_rfer = inherit->lim.max_rfer;
3328 dstgroup->max_excl = inherit->lim.max_excl;
3329 dstgroup->rsv_rfer = inherit->lim.rsv_rfer;
3330 dstgroup->rsv_excl = inherit->lim.rsv_excl;
3341 * We call inherit after we clone the root in order to make sure
3353 /* inherit the limit info */
3367 if (!inherit && !list_empty(&srcgroup->groups))
3371 if (!inherit)
3374 i_qgroups = (u64 *)(inherit + 1);
3375 for (i = 0; i < inherit->num_qgroups; ++i) {
3384 /* Check if we can do a quick inherit. */
3395 for (i = 0; i < inherit->num_ref_copies; ++i, i_qgroups += 2) {
3416 for (i = 0; i < inherit->num_excl_copies; ++i, i_qgroups += 2) {
3446 for (int i = 0; i < inherit->num_qgroups; i++)
3451 kfree(inherit);