You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fdb_kv_load(), check_and_recovery_gc_cb() only performs GC for the sectors tagged as FDB_SECTOR_DIRTY_GC, and not for the sectors marked as FDB_SECTOR_DIRTY_TRUE.
If we added FDB_SECTOR_DIRTY_TRUE to this function, every time the system reboots all the dirty sectors will be formatted, resulting on more available space at startup. Is there any reason for not doing the following?
static bool check_and_recovery_gc_cb(kv_sec_info_t sector, void *arg1, void *arg2)
{
fdb_kvdb_t db = arg1;
if (sector->check_ok && ((sector->status.dirty == FDB_SECTOR_DIRTY_GC) || (sector->status.dirty == FDB_SECTOR_DIRTY_TRUE)) {
/* make sure the GC request flag to true */
db->gc_request = true;
/* resume the GC operate */
gc_collect(db);
}
return false;
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In fdb_kv_load(), check_and_recovery_gc_cb() only performs GC for the sectors tagged as FDB_SECTOR_DIRTY_GC, and not for the sectors marked as FDB_SECTOR_DIRTY_TRUE.
If we added FDB_SECTOR_DIRTY_TRUE to this function, every time the system reboots all the dirty sectors will be formatted, resulting on more available space at startup. Is there any reason for not doing the following?
Beta Was this translation helpful? Give feedback.
All reactions