From: Kent Overstreet <kent.overstreet@gmail.com>
Date: Mon, 24 Jun 2019 21:55:15 +0000 (-0400)
Subject: bcachefs: add inode_generation_to_text method
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=44da9767bb32467ac660ce6bacf75162f5abf9a1;p=linux.git

bcachefs: add inode_generation_to_text method

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---

diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
index e6ad0ad51cb29..0fb08a396d629 100644
--- a/fs/bcachefs/inode.c
+++ b/fs/bcachefs/inode.c
@@ -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,