@@ -129,7 +129,7 @@ def test_orphan_scan(self):
129129 # Umount before flush to avoid cap releases putting
130130 # things we don't want in the journal later.
131131 self .mount_a .umount_wait ()
132- self .fs .mds_asok ([ " flush" , "journal" ] )
132+ self .fs .flush ( )
133133
134134 # Create a new inode that's just in the log, i.e. would
135135 # look orphaned to backward scan if backward scan wisnae
@@ -163,7 +163,7 @@ def test_orphan_scan(self):
163163
164164 # Run a tagging forward scrub
165165 tag = "mytag123"
166- self .fs .mds_asok (["tag" , "path" , "/parent" , tag ])
166+ self .fs .rank_asok (["tag" , "path" , "/parent" , tag ])
167167
168168 # See that the orphan wisnae tagged
169169 self .assertUntagged (inos ['./parent/flushed/bravo' ])
@@ -175,14 +175,21 @@ def test_orphan_scan(self):
175175 # See that journalled-but-not-flushed file *was* tagged
176176 self .assertTagged (inos ['./parent/unflushed/jfile' ], tag , self .fs .get_data_pool_name ())
177177
178- # Run cephfs-data-scan targeting only orphans
178+ # okay, now we are going to run cephfs-data-scan. It's necessary to
179+ # have a clean journal otherwise replay will blowup on mismatched
180+ # inotable versions (due to scan_links)
181+ self .fs .flush ()
179182 self .fs .fail ()
183+ self .fs .journal_tool (["journal" , "reset" , "--force" ], 0 )
184+
185+ # Run cephfs-data-scan targeting only orphans
180186 self .fs .data_scan (["scan_extents" , self .fs .get_data_pool_name ()])
181187 self .fs .data_scan ([
182188 "scan_inodes" ,
183189 "--filter-tag" , tag ,
184190 self .fs .get_data_pool_name ()
185191 ])
192+ self .fs .data_scan (["scan_links" ])
186193
187194 # After in-place injection stats should be kosher again
188195 self .fs .set_ceph_conf ('mds' , 'mds verify scatter' , True )
0 commit comments