bcachefs: add inode_generation_to_text method
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 24 Jun 2019 21:55:15 +0000 (17:55 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:23 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/inode.c

index e6ad0ad51cb29bc38ab88f13a624f801376cfa91..0fb08a396d629d4ae0c03cfa3bf36f463da2023c 100644 (file)
@@ -246,6 +246,9 @@ const char *bch2_inode_generation_invalid(const struct bch_fs *c,
 void bch2_inode_generation_to_text(struct printbuf *out, struct bch_fs *c,
                                   struct bkey_s_c k)
 {
+       struct bkey_s_c_inode_generation gen = bkey_s_c_to_inode_generation(k);
+
+       pr_buf(out, "generation: %u", le32_to_cpu(gen.v->bi_generation));
 }
 
 void bch2_inode_init(struct bch_fs *c, struct bch_inode_unpacked *inode_u,