mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	An interesting observation about the find and parent scanning functions is that at their core, they're both actually doing the same operation. They search a metadata-pair during fetch for an entry uses the entry data instead of the entry tag. This means we can combine these functions and get a decent code savings. It's a little bit trickier because pair ordering isn't guaranteed. But to work around that we can simply search for both pair orderings. It's a bit more expensive but may be worth the code savings. A fancier implementation in the future can avoid the 2x lfs_parent scans.
		
			
				
	
	
	
		
			102 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			102 KiB