t: Restricted LFS_ERR_BUSY to only LFS_T_EXCL
So now lfsr_traversal_read will only return LFS_ERR_BUSY if LFS_T_EXCL
was provided to lfsr_traversal_open.
This means it's no longer possible to opportunistically traverse blocks,
_and_ detect mutation in the same traversal (though I suppose you could
open multiple traversals for this?), but on the flipside this
potentially frees up the implementation a bit.
This motivation for this is that LFS_ERR_BUSY is potentially confusing
and annoying to handle if you don't care about mutation.
code stack
before: 34566 2624
after: 34558 (-0.0%) 2624 (+0.0%)
This commit is contained in:
@@ -1058,8 +1058,8 @@ int lfsr_traversal_close(lfs_t *lfs, lfsr_traversal_t *traversal);
|
||||
//
|
||||
// Fills out the tinfo structure.
|
||||
//
|
||||
// Returns 0 on success, LFS_ERR_NOENT at the end of traversal, LFS_ERR_BUSY
|
||||
// if filesystem has been modified, or a negative error code on failure.
|
||||
// Returns 0 on success, LFS_ERR_NOENT at the end of traversal, or a
|
||||
// negative error code on failure.
|
||||
int lfsr_traversal_read(lfs_t *lfs, lfsr_traversal_t *traversal,
|
||||
struct lfs_tinfo *tinfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user