Loading fs/bcachefs/bcachefs_format.h +2 −1 Original line number Diff line number Diff line Loading @@ -1143,7 +1143,8 @@ static inline __u64 __bset_magic(struct bch_sb *sb) x(log, 9) \ x(overwrite, 10) \ x(write_buffer_keys, 11) \ x(datetime, 12) x(datetime, 12) \ x(log_bkey, 13) enum bch_jset_entry_type { #define x(f, nr) BCH_JSET_ENTRY_##f = nr, Loading fs/bcachefs/btree_update.c +13 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,19 @@ int bch2_trans_log_msg(struct btree_trans *trans, struct printbuf *buf) return 0; } int bch2_trans_log_bkey(struct btree_trans *trans, enum btree_id btree, unsigned level, struct bkey_i *k) { struct jset_entry *e = bch2_trans_jset_entry_alloc(trans, jset_u64s(k->k.u64s)); int ret = PTR_ERR_OR_ZERO(e); if (ret) return ret; journal_entry_init(e, BCH_JSET_ENTRY_log_bkey, btree, level, k->k.u64s); bkey_copy(e->start, k); return 0; } __printf(3, 0) static int __bch2_fs_log_msg(struct bch_fs *c, unsigned commit_flags, const char *fmt, Loading fs/bcachefs/btree_update.h +2 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,8 @@ void bch2_trans_commit_hook(struct btree_trans *, int __bch2_trans_commit(struct btree_trans *, unsigned); int bch2_trans_log_msg(struct btree_trans *, struct printbuf *); int bch2_trans_log_bkey(struct btree_trans *, enum btree_id, unsigned, struct bkey_i *); __printf(2, 3) int bch2_fs_log_msg(struct bch_fs *, const char *, ...); __printf(2, 3) int bch2_journal_log_msg(struct bch_fs *, const char *, ...); Loading fs/bcachefs/journal_io.c +17 −0 Original line number Diff line number Diff line Loading @@ -764,6 +764,23 @@ static void journal_entry_overwrite_to_text(struct printbuf *out, struct bch_fs journal_entry_btree_keys_to_text(out, c, entry); } static int journal_entry_log_bkey_validate(struct bch_fs *c, struct jset *jset, struct jset_entry *entry, unsigned version, int big_endian, struct bkey_validate_context from) { from.flags = 0; return journal_entry_btree_keys_validate(c, jset, entry, version, big_endian, from); } static void journal_entry_log_bkey_to_text(struct printbuf *out, struct bch_fs *c, struct jset_entry *entry) { journal_entry_btree_keys_to_text(out, c, entry); } static int journal_entry_write_buffer_keys_validate(struct bch_fs *c, struct jset *jset, struct jset_entry *entry, Loading Loading
fs/bcachefs/bcachefs_format.h +2 −1 Original line number Diff line number Diff line Loading @@ -1143,7 +1143,8 @@ static inline __u64 __bset_magic(struct bch_sb *sb) x(log, 9) \ x(overwrite, 10) \ x(write_buffer_keys, 11) \ x(datetime, 12) x(datetime, 12) \ x(log_bkey, 13) enum bch_jset_entry_type { #define x(f, nr) BCH_JSET_ENTRY_##f = nr, Loading
fs/bcachefs/btree_update.c +13 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,19 @@ int bch2_trans_log_msg(struct btree_trans *trans, struct printbuf *buf) return 0; } int bch2_trans_log_bkey(struct btree_trans *trans, enum btree_id btree, unsigned level, struct bkey_i *k) { struct jset_entry *e = bch2_trans_jset_entry_alloc(trans, jset_u64s(k->k.u64s)); int ret = PTR_ERR_OR_ZERO(e); if (ret) return ret; journal_entry_init(e, BCH_JSET_ENTRY_log_bkey, btree, level, k->k.u64s); bkey_copy(e->start, k); return 0; } __printf(3, 0) static int __bch2_fs_log_msg(struct bch_fs *c, unsigned commit_flags, const char *fmt, Loading
fs/bcachefs/btree_update.h +2 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,8 @@ void bch2_trans_commit_hook(struct btree_trans *, int __bch2_trans_commit(struct btree_trans *, unsigned); int bch2_trans_log_msg(struct btree_trans *, struct printbuf *); int bch2_trans_log_bkey(struct btree_trans *, enum btree_id, unsigned, struct bkey_i *); __printf(2, 3) int bch2_fs_log_msg(struct bch_fs *, const char *, ...); __printf(2, 3) int bch2_journal_log_msg(struct bch_fs *, const char *, ...); Loading
fs/bcachefs/journal_io.c +17 −0 Original line number Diff line number Diff line Loading @@ -764,6 +764,23 @@ static void journal_entry_overwrite_to_text(struct printbuf *out, struct bch_fs journal_entry_btree_keys_to_text(out, c, entry); } static int journal_entry_log_bkey_validate(struct bch_fs *c, struct jset *jset, struct jset_entry *entry, unsigned version, int big_endian, struct bkey_validate_context from) { from.flags = 0; return journal_entry_btree_keys_validate(c, jset, entry, version, big_endian, from); } static void journal_entry_log_bkey_to_text(struct printbuf *out, struct bch_fs *c, struct jset_entry *entry) { journal_entry_btree_keys_to_text(out, c, entry); } static int journal_entry_write_buffer_keys_validate(struct bch_fs *c, struct jset *jset, struct jset_entry *entry, Loading