diff --git a/lfs.c b/lfs.c index 0111a6c6..e7c4daea 100644 --- a/lfs.c +++ b/lfs.c @@ -1500,6 +1500,11 @@ static int lfs_dir_compact(lfs_t *lfs, end = begin; } } +#if LFS_MIGRATE + } else if (lfs_pair_cmp(dir->pair, lfs->root) == 0 && lfs->lfs1) { + // we can't relocate our root during migrations, as this would + // cause the superblock to get updated, which would clobber v1 +#endif } else { // we're writing too much, time to relocate exhausted = true;