This is the same symptom as issue #22 , but the cause is different. The bug is in Dir2Btree::lookup. When it looks up the location where it expects to find the XfsDa3NodeHdr for the entry hashes, it instead finds a bmbt_rec corresponding to the actual directory entries area, not the hashes area. You can tell by printing the bmbt_rec's br_startoff field at the top of lookup. It ought to be 8388608, but isn't. That's as far as I've debugged it. The stack trace looks like this:
0: std::panicking::begin_panic
at /rustc/e4133ba9b1a150ef624f5d189913a37405f4414c/library/std/src/panicking.rs:638:12
1: xfs_fuse::libxfuse::da_btree::XfsDa3Blkinfo::from
at ./src/libxfuse/da_btree.rs:105:13
2: xfs_fuse::libxfuse::da_btree::XfsDa3NodeHdr::from
at ./src/libxfuse/da_btree.rs:138:20
3: <xfs_fuse::libxfuse::dir3_bptree::Dir2Btree as xfs_fuse::libxfuse::dir3::Dir3<R>>::lookup
at ./src/libxfuse/dir3_bptree.rs:209:24
4: <xfs_fuse::libxfuse::volume::Volume as fuser::Filesystem>::lookup
at ./src/libxfuse/volume.rs:94:15
5: fuser::request::Request::dispatch_req
at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.13.0/src/request.rs:197:17
6: fuser::request::Request::dispatch
at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.13.0/src/request.rs:57:25
7: fuser::session::Session<FS>::run
at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.13.0/src/session.rs:133:34
8: fuser::mount2::{{closure}}
at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.13.0/src/lib.rs:992:78
9: core::result::Result<T,E>::and_then
at /rustc/e4133ba9b1a150ef624f5d189913a37405f4414c/library/core/src/result.rs:1320:22
10: fuser::mount2
at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.13.0/src/lib.rs:992:5
11: xfs_fuse::main
at ./src/main.rs:88:5
12: core::ops::function::FnOnce::call_once
at /rustc/e4133ba9b1a150ef624f5d189913a37405f4414c/library/core/src/ops/function.rs:250:5
The test regression was introduced when I increased the size of the node directory in the golden image (PR soon). That somehow changed the on-disk layout of the btree directory.
This is the same symptom as issue #22 , but the cause is different. The bug is in Dir2Btree::lookup. When it looks up the location where it expects to find the XfsDa3NodeHdr for the entry hashes, it instead finds a bmbt_rec corresponding to the actual directory entries area, not the hashes area. You can tell by printing the bmbt_rec's br_startoff field at the top of
lookup
. It ought to be 8388608, but isn't. That's as far as I've debugged it. The stack trace looks like this:The test regression was introduced when I increased the size of the node directory in the golden image (PR soon). That somehow changed the on-disk layout of the btree directory.