Use fixed-size directory meta files

Add a new schema version 5; now 4 means the directory meta may or may
not be upgraded.

Fixes #65: now it's possible to open the directory even if it lies on a
completely full disk.
This commit is contained in:
Scott Lamb
2019-07-04 23:22:45 -05:00
parent 13b192949d
commit d61b5e1bdd
11 changed files with 236 additions and 33 deletions

View File

@@ -183,7 +183,7 @@ fn read_dir(path: &str, opts: &Options) -> Result<Dir, Error> {
let f = e.file_name();
let f = f.as_bytes();
match f {
b"meta" | b"meta-tmp" => continue,
b"meta" => continue,
_ => {},
};
let id = match dir::parse_id(f) {