File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed 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,
320
320
int bch2_inode_unpack (struct bkey_s_c k ,
321
321
struct bch_inode_unpacked * unpacked )
322
322
{
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 );
326
328
}
327
329
328
330
int bch2_inode_peek_nowarn (struct btree_trans * trans ,
@@ -557,7 +559,7 @@ static void __bch2_inode_unpacked_to_text(struct printbuf *out,
557
559
558
560
void bch2_inode_unpacked_to_text (struct printbuf * out , struct bch_inode_unpacked * inode )
559
561
{
560
- prt_printf (out , "inum: %llu " , inode -> bi_inum );
562
+ prt_printf (out , "inum: %llu:%u " , inode -> bi_inum , inode -> bi_snapshot );
561
563
__bch2_inode_unpacked_to_text (out , inode );
562
564
}
563
565
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ typedef u64 u96;
69
69
70
70
struct bch_inode_unpacked {
71
71
u64 bi_inum ;
72
+ u32 bi_snapshot ;
72
73
u64 bi_journal_seq ;
73
74
__le64 bi_hash_seed ;
74
75
u64 bi_size ;
You can’t perform that action at this time.
0 commit comments