2019-10-02 22:35:36 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_FS_COMMON_H
|
|
|
|
#define _BCACHEFS_FS_COMMON_H
|
|
|
|
|
2024-06-17 17:58:17 +00:00
|
|
|
#include "dirent.h"
|
|
|
|
|
2019-10-02 22:35:36 +00:00
|
|
|
struct posix_acl;
|
|
|
|
|
2021-03-16 04:28:17 +00:00
|
|
|
#define BCH_CREATE_TMPFILE (1U << 0)
|
2021-03-17 03:28:43 +00:00
|
|
|
#define BCH_CREATE_SUBVOL (1U << 1)
|
|
|
|
#define BCH_CREATE_SNAPSHOT (1U << 2)
|
|
|
|
#define BCH_CREATE_SNAPSHOT_RO (1U << 3)
|
2021-03-16 04:28:17 +00:00
|
|
|
|
|
|
|
int bch2_create_trans(struct btree_trans *, subvol_inum,
|
2019-10-02 22:35:36 +00:00
|
|
|
struct bch_inode_unpacked *,
|
|
|
|
struct bch_inode_unpacked *,
|
|
|
|
const struct qstr *,
|
|
|
|
uid_t, gid_t, umode_t, dev_t,
|
|
|
|
struct posix_acl *,
|
2021-03-16 04:28:17 +00:00
|
|
|
struct posix_acl *,
|
2021-03-17 03:28:43 +00:00
|
|
|
subvol_inum, unsigned);
|
2019-10-02 22:35:36 +00:00
|
|
|
|
2021-03-16 04:28:17 +00:00
|
|
|
int bch2_link_trans(struct btree_trans *,
|
|
|
|
subvol_inum, struct bch_inode_unpacked *,
|
|
|
|
subvol_inum, struct bch_inode_unpacked *,
|
2019-10-02 22:35:36 +00:00
|
|
|
const struct qstr *);
|
|
|
|
|
2021-03-16 04:28:17 +00:00
|
|
|
int bch2_unlink_trans(struct btree_trans *, subvol_inum,
|
|
|
|
struct bch_inode_unpacked *,
|
2019-10-02 22:35:36 +00:00
|
|
|
struct bch_inode_unpacked *,
|
2021-10-11 16:03:19 +00:00
|
|
|
const struct qstr *, bool);
|
2019-10-02 22:35:36 +00:00
|
|
|
|
|
|
|
int bch2_rename_trans(struct btree_trans *,
|
2021-03-16 04:28:17 +00:00
|
|
|
subvol_inum, struct bch_inode_unpacked *,
|
|
|
|
subvol_inum, struct bch_inode_unpacked *,
|
2019-10-02 22:35:36 +00:00
|
|
|
struct bch_inode_unpacked *,
|
|
|
|
struct bch_inode_unpacked *,
|
|
|
|
const struct qstr *,
|
|
|
|
const struct qstr *,
|
|
|
|
enum bch_rename_mode);
|
|
|
|
|
|
|
|
bool bch2_reinherit_attrs(struct bch_inode_unpacked *,
|
|
|
|
struct bch_inode_unpacked *);
|
|
|
|
|
|
|
|
#endif /* _BCACHEFS_FS_COMMON_H */
|