diff options
author | Christopher Haster <chaster@utexas.edu> | 2017-11-22 05:53:15 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2017-11-22 23:49:43 +0300 |
commit | bf78b09d370d4ae2eb1b59671053b065e9f9c550 (patch) | |
tree | b9b16cf06447f5449cc5cd6d72a3a76996d5bc94 /lfs.h | |
parent | e169d06c574d9c3aefd8b7cd1c407c4726c008f3 (diff) |
Added directory list for synchronizing in flight directories
As it was, if a user operated on a directory while at the same
time iterating over the directory, the directory objects could
fall out of sync. In the best case, files may be skipped while
removing everything in a file, in the worst case, a very poorly
timed directory relocate could be missed.
Simple fix is to add the same directory tracking that is currently
in use for files, at a small code+complexity cost.
Diffstat (limited to 'lfs.h')
-rw-r--r-- | lfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -207,6 +207,7 @@ typedef struct lfs_file { } lfs_file_t; typedef struct lfs_dir { + struct lfs_dir *next; lfs_block_t pair[2]; lfs_off_t off; @@ -249,6 +250,7 @@ typedef struct lfs { lfs_block_t root[2]; lfs_file_t *files; + lfs_dir_t *dirs; lfs_cache_t rcache; lfs_cache_t pcache; |