mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Moved to brute-force deorphan without parent pointers
Removing the dependency to the parent pointer solves many issues with non-atomic updates of children's parent pointers with respect to any move operations. However, this comes with an embarrassingly terrible runtime as the only other option is to exhaustively check every dir entry to find a child's parent. Fortunately, deorphaning should be a relatively rare operation.
This commit is contained in:
		| @@ -30,6 +30,14 @@ void test_assert(const char *file, unsigned line, | ||||
| #define test_assert(s, v, e) test_assert(__FILE__, __LINE__, s, v, e) | ||||
|  | ||||
|  | ||||
| // utility functions for traversals | ||||
| int test_count(void *p, lfs_block_t b) {{ | ||||
|     unsigned *u = (unsigned*)p; | ||||
|     *u += 1; | ||||
|     return 0; | ||||
| }} | ||||
|  | ||||
|  | ||||
| // lfs declarations | ||||
| lfs_t lfs; | ||||
| lfs_emubd_t bd; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user