File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -320,9 +320,11 @@ static noinline int bch2_inode_unpack_slowpath(struct bkey_s_c k,
320320int bch2_inode_unpack (struct bkey_s_c k ,
321321 struct bch_inode_unpacked * unpacked )
322322{
323- if (likely (k .k -> type == KEY_TYPE_inode_v3 ))
324- return bch2_inode_unpack_v3 (k , unpacked );
325- return bch2_inode_unpack_slowpath (k , unpacked );
323+ unpacked -> bi_snapshot = k .k -> p .snapshot ;
324+
325+ return likely (k .k -> type == KEY_TYPE_inode_v3 )
326+ ? bch2_inode_unpack_v3 (k , unpacked )
327+ : bch2_inode_unpack_slowpath (k , unpacked );
326328}
327329
328330int bch2_inode_peek_nowarn (struct btree_trans * trans ,
@@ -557,7 +559,7 @@ static void __bch2_inode_unpacked_to_text(struct printbuf *out,
557559
558560void bch2_inode_unpacked_to_text (struct printbuf * out , struct bch_inode_unpacked * inode )
559561{
560- prt_printf (out , "inum: %llu " , inode -> bi_inum );
562+ prt_printf (out , "inum: %llu:%u " , inode -> bi_inum , inode -> bi_snapshot );
561563 __bch2_inode_unpacked_to_text (out , inode );
562564}
563565
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ typedef u64 u96;
6969
7070struct bch_inode_unpacked {
7171 u64 bi_inum ;
72+ u32 bi_snapshot ;
7273 u64 bi_journal_seq ;
7374 __le64 bi_hash_seed ;
7475 u64 bi_size ;
You can’t perform that action at this time.
0 commit comments