vasi / squashfuse

FUSE filesystem to mount squashfs archives
Other
286 stars 66 forks source link

Why is the compressed bit being set in inode headers when its size is 0? #134

Closed mgord9518 closed 2 months ago

mgord9518 commented 2 months ago

I've been reading through SquashFS documentation and I've been unable to find anything indicating that the compressed bit should be set if the size is 0, what is the purpose of this code?

https://github.com/vasi/squashfuse/blob/94f998c58d2bb6dff00173f33140a0354adce324/fs.c#L137-L138

vasi commented 2 months ago

I don't know why it's not documented, but it's what the kernel does: https://github.com/torvalds/linux/blob/50dffbf771802c4db88de2cb942affa0ada43ad0/fs/squashfs/squashfs_fs.h#L108

mgord9518 commented 2 months ago

@vasi I asked the author of SquashFS, apparently it only pertains to SquashFS 1.0 so it should be safe to remove

vasi commented 2 months ago

Oh nice, thanks for the followup.