Renamed lfsr_mdir_fixorphans -> lfsr_fs_fixorphans_
This is mainly to avoid confusion around if lfs_alloc_ckpoint needs to be called before this function. I guess it's not problematic to call lfs_alloc_ckpoint unnecessarily... but unlike every other lfsr_mdir_* function we call lfs_alloc_ckpoint internally for every orphan we fix. Otherwise we could end up with ENOSPC too early. lfsr_fs_fixorphans_ is really only internal glue between lfsr_fs_fixorphans and lfsr_mtree_gc anyways...
This commit is contained in:
@@ -8690,7 +8690,7 @@ static int lfsr_mtree_traverse(lfs_t *lfs, lfsr_traversal_t *t,
|
||||
}
|
||||
|
||||
// needed in lfsr_mtree_gc
|
||||
static int lfsr_mdir_fixorphans(lfs_t *lfs, lfsr_mdir_t *mdir);
|
||||
static int lfsr_fs_fixorphans_(lfs_t *lfs, lfsr_mdir_t *mdir);
|
||||
static void lfs_alloc_ckpoint(lfs_t *lfs);
|
||||
static void lfs_alloc_markfree(lfs_t *lfs);
|
||||
|
||||
@@ -8722,7 +8722,7 @@ dropped:;
|
||||
&& tag == LFSR_TAG_MDIR
|
||||
&& lfsr_f_hasorphans(lfs->flags)) {
|
||||
lfsr_mdir_t *mdir = (lfsr_mdir_t*)bptr.data.u.buffer;
|
||||
err = lfsr_mdir_fixorphans(lfs, mdir);
|
||||
err = lfsr_fs_fixorphans_(lfs, mdir);
|
||||
if (err) {
|
||||
goto failed;
|
||||
}
|
||||
@@ -12936,7 +12936,7 @@ static int lfsr_fs_fixgrm(lfs_t *lfs) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lfsr_mdir_fixorphans(lfs_t *lfs, lfsr_mdir_t *mdir) {
|
||||
static int lfsr_fs_fixorphans_(lfs_t *lfs, lfsr_mdir_t *mdir) {
|
||||
// save the current mid
|
||||
lfsr_mid_t mid = mdir->mid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user