Issue: SeaDrive’s fuse library always returns st_blocks = 0. This means that stat ~/SeaDrive/.../Example always shows Blocks: 0.
This has potential to be really bad. It causes compatibility issues with tools that use block count, like disk image mounting. An easy example is to drop a .iso file in SeaDrive, then try and mount it via gnome-disk-image-mounter example.iso – it will silently fail if the .iso is in SeaDrive.
There’s even a chance of silent data loss if tools use block count to determine whether to read the contents of the file. It would be reasonable to skip reading a source file if it has 0 blocks, as it would be considered to be 100% empty/entirely sparse.
Potential fix: Populate st_blocks field to ceil( st_size / 512 )
e.g. In fuse_ops.c:412 something like:
st.st_blocks = (st.st_size + 511) / 512; // Ceil
Example: Disk image mounting
# Create a .iso file as an example
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ mkdir /tmp/isocontents && dd if=/dev/zero of=/tmp/isocontents/example bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0.00236388 s, 4.4 GB/s
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ genisoimage -o test.iso /tmp/isocontents
I: -input-charset not specified, using utf-8 (detected in locale settings)
94.45% done, estimate finish Thu Jun 4 21:20:40 2026
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 112
Path table size(bytes): 10
Max brk space used 0
5294 extents written (10 MB)
# `stat` shows Blocks: 0 (incorrect!)
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ stat test.iso
File: test.iso
Size: 10842112 Blocks: 0 IO Block: 4096 regular file
Device: 0,84 Inode: 8182 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ rob) Gid: ( 100/ users)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 2026-06-04 21:20:40.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
Birth: -
# Try and mount from SeaDrive - FAILS
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ udisksctl loop-setup -f test.iso
Error setting up loop device for test.iso: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error waiting for loop object after creating '/dev/loop6': Timed out waiting for object
# Copy to local disk
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ cp test.iso ~/test.iso
# `stat` shows correct 'Blocks:' count
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ stat ~/test.iso
File: /home/rob/test.iso
Size: 10842112 Blocks: 21176 IO Block: 4096 regular file
Device: 8,2 Inode: 20054072 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ rob) Gid: ( 100/ users)
Access: 2026-06-04 21:21:19.604083223 +0100
Modify: 2026-06-04 21:21:19.480084308 +0100
Change: 2026-06-04 21:21:19.480084308 +0100
Birth: 2026-06-04 21:21:19.464084448 +0100
# Try and mount from local disk - SUCCESS
[nix-shell:/run/user/1000/SeaDrive/My Libraries/Files]$ udisksctl loop-setup -f ~/test.iso
Mapped file /home/rob/test.iso as /dev/loop7.