diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-08 00:13:18 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-20 09:07:08 -0900 |
commit | b33fc8298f7e13226b9895abc57c9bfce5e3fa2d (patch) | |
tree | a3d2a5a909b6372f7777c1c5c18cef5f81d123a9 /libbcache/dirent.h | |
parent | 7f4191a202ea4558ca2d5eb8a47daea33c9999c7 (diff) |
bcache in userspace; userspace fsck
Diffstat (limited to 'libbcache/dirent.h')
-rw-r--r-- | libbcache/dirent.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libbcache/dirent.h b/libbcache/dirent.h new file mode 100644 index 0000000..e18089b --- /dev/null +++ b/libbcache/dirent.h @@ -0,0 +1,32 @@ +#ifndef _BCACHE_DIRENT_H +#define _BCACHE_DIRENT_H + +extern const struct bkey_ops bch_bkey_dirent_ops; + +struct qstr; +struct file; +struct dir_context; +struct cache_set; + +int bch_dirent_create(struct cache_set *c, struct inode *, u8, + const struct qstr *, u64); +int bch_dirent_delete(struct cache_set *c, struct inode *, const struct qstr *); + +enum bch_rename_mode { + BCH_RENAME, + BCH_RENAME_OVERWRITE, + BCH_RENAME_EXCHANGE, +}; + +int bch_dirent_rename(struct cache_set *, + struct inode *, const struct qstr *, + struct inode *, const struct qstr *, + u64 *, enum bch_rename_mode); + +u64 bch_dirent_lookup(struct cache_set *c, struct inode *, + const struct qstr *); +int bch_empty_dir(struct cache_set *, u64); +int bch_readdir(struct cache_set *, struct file *, struct dir_context *); + +#endif /* _BCACHE_DIRENT_H */ + |