File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1302,10 +1302,11 @@ record_t Cache::prepare_record(
13021302 t, delta_length, *i);
13031303 assert (t.root == i);
13041304 root = t.root ;
1305+ assert (root->get_paddr ().is_root ());
13051306 record.push_back (
13061307 delta_info_t {
13071308 extent_types_t ::ROOT,
1308- P_ADDR_NULL ,
1309+ P_ADDR_ROOT ,
13091310 L_ADDR_NULL,
13101311 0 ,
13111312 0 ,
@@ -1886,13 +1887,16 @@ void Cache::init()
18861887 root = nullptr ;
18871888 }
18881889 root = CachedExtent::make_cached_extent_ref<RootBlock>();
1889- root->init (CachedExtent::extent_state_t ::CLEAN,
1890+ // Make it simpler to keep root dirty
1891+ root->init (CachedExtent::extent_state_t ::DIRTY,
18901892 P_ADDR_ROOT,
18911893 PLACEMENT_HINT_NULL,
18921894 NULL_GENERATION,
1893- TRANS_ID_NULL);
1895+ TRANS_ID_NULL);
1896+ root->set_modify_time (seastar::lowres_system_clock::now ());
18941897 INFO (" init root -- {}" , *root);
1895- extents_index.insert (*root);
1898+ add_extent (root);
1899+ add_to_dirty (root, nullptr );
18961900}
18971901
18981902Cache::mkfs_iertr::future<> Cache::mkfs (Transaction &t)
You can’t perform that action at this time.
0 commit comments