Implemented lfsr_rename
Only simple tests right now, but the theory is sound. This mainly required the addition of the fancy in-device move attribute, which copies all tags associated with an rid from one rbyd to another in a single transaction. This is a carryover from the previous littlefs implementation, though it is easier to implement here since it is effectively a range query on the rbyd tree, which trees are really good at. This was intentional. Oh and I suppose this also required implementing lfsr_rename, which has a few corner cases to watch out for. It is nice that both lfsr_remove and lfsr_rename can rely on lfsr_fs_fixgrm to finish all of the removes, which wasn't previously reasonable due to the overhead of deorphaning.
This commit is contained in:
@@ -566,6 +566,7 @@ int lfsr_remove(lfs_t *lfs, const char *path);
|
||||
//
|
||||
// Returns a negative error code on failure.
|
||||
int lfs_rename(lfs_t *lfs, const char *oldpath, const char *newpath);
|
||||
int lfsr_rename(lfs_t *lfs, const char *old_path, const char *new_path);
|
||||
#endif
|
||||
|
||||
// Find info about a file or directory
|
||||
|
||||
Reference in New Issue
Block a user