inode.h (fd0c767966327c1b938b489de0f6d2d2036b9055) | inode.h (a10195764901e0a41e64d596de57a957e7f982f0) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _BCACHEFS_INODE_H 3#define _BCACHEFS_INODE_H 4 5#include "bkey.h" 6#include "opts.h" 7 8extern const char * const bch2_inode_opts[]; 9 10int bch2_inode_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *); 11int bch2_inode_v2_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *); 12void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 13 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _BCACHEFS_INODE_H 3#define _BCACHEFS_INODE_H 4 5#include "bkey.h" 6#include "opts.h" 7 8extern const char * const bch2_inode_opts[]; 9 10int bch2_inode_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *); 11int bch2_inode_v2_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *); 12void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 13 |
14#define bch2_bkey_ops_inode (struct bkey_ops) { \ | 14#define bch2_bkey_ops_inode ((struct bkey_ops) { \ |
15 .key_invalid = bch2_inode_invalid, \ 16 .val_to_text = bch2_inode_to_text, \ 17 .trans_trigger = bch2_trans_mark_inode, \ 18 .atomic_trigger = bch2_mark_inode, \ | 15 .key_invalid = bch2_inode_invalid, \ 16 .val_to_text = bch2_inode_to_text, \ 17 .trans_trigger = bch2_trans_mark_inode, \ 18 .atomic_trigger = bch2_mark_inode, \ |
19} | 19}) |
20 | 20 |
21#define bch2_bkey_ops_inode_v2 (struct bkey_ops) { \ | 21#define bch2_bkey_ops_inode_v2 ((struct bkey_ops) { \ |
22 .key_invalid = bch2_inode_v2_invalid, \ 23 .val_to_text = bch2_inode_to_text, \ 24 .trans_trigger = bch2_trans_mark_inode, \ 25 .atomic_trigger = bch2_mark_inode, \ | 22 .key_invalid = bch2_inode_v2_invalid, \ 23 .val_to_text = bch2_inode_to_text, \ 24 .trans_trigger = bch2_trans_mark_inode, \ 25 .atomic_trigger = bch2_mark_inode, \ |
26} | 26}) |
27 28static inline bool bkey_is_inode(const struct bkey *k) 29{ 30 return k->type == KEY_TYPE_inode || 31 k->type == KEY_TYPE_inode_v2; 32} 33 34int bch2_inode_generation_invalid(const struct bch_fs *, struct bkey_s_c, 35 int, struct printbuf *); 36void bch2_inode_generation_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 37 | 27 28static inline bool bkey_is_inode(const struct bkey *k) 29{ 30 return k->type == KEY_TYPE_inode || 31 k->type == KEY_TYPE_inode_v2; 32} 33 34int bch2_inode_generation_invalid(const struct bch_fs *, struct bkey_s_c, 35 int, struct printbuf *); 36void bch2_inode_generation_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 37 |
38#define bch2_bkey_ops_inode_generation (struct bkey_ops) { \ | 38#define bch2_bkey_ops_inode_generation ((struct bkey_ops) { \ |
39 .key_invalid = bch2_inode_generation_invalid, \ 40 .val_to_text = bch2_inode_generation_to_text, \ | 39 .key_invalid = bch2_inode_generation_invalid, \ 40 .val_to_text = bch2_inode_generation_to_text, \ |
41} | 41}) |
42 43#if 0 44typedef struct { 45 u64 lo; 46 u32 hi; 47} __packed __aligned(4) u96; 48#endif 49typedef u64 u96; --- 141 unchanged lines hidden --- | 42 43#if 0 44typedef struct { 45 u64 lo; 46 u32 hi; 47} __packed __aligned(4) u96; 48#endif 49typedef u64 u96; --- 141 unchanged lines hidden --- |