| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "basic-forward.h" |
| 5 |
|
| 6 |
typedef enum BtrfsSubvolFlags { |
| 7 |
BTRFS_SUBVOL_RO = 1 << 0, |
| 8 |
BTRFS_SUBVOL_NODATACOW = 1 << 1, |
| 9 |
_BTRFS_SUBVOL_FLAGS_MASK = BTRFS_SUBVOL_NODATACOW|BTRFS_SUBVOL_RO, |
| 10 |
_BTRFS_SUBVOL_FLAGS_INVALID = -EINVAL, |
| 11 |
_BTRFS_SUBVOL_FLAGS_ERRNO_MAX = -ERRNO_MAX, /* Ensure the whole errno range fits into this enum */ |
| 12 |
} BtrfsSubvolFlags; |
| 13 |
|
| 14 |
int btrfs_validate_subvolume_name(const char *name); |
| 15 |
|
| 16 |
int btrfs_subvol_make(int dir_fd, const char *path); |
| 17 |
|
| 18 |
int btrfs_subvol_make_fallback(int dir_fd, const char *path, mode_t mode); |