On Mon, 20 Jul 2026 at 05:46, John Groves <[email protected]> wrote:
> +/* Famfs fmap message components */
> +
> +#define FAMFS_FMAP_VERSION 1
Please don't use separate versioning for extents. It doesn't help
with feature negotiation, so let's just use the INIT feature flags for
this purpose.
> +
> +#define FAMFS_FMAP_MAX 32768 /* Largest supported fmap message */
Not sure if it makes sense declaring this on the user API.
> +
> +enum fuse_famfs_file_type {
> + FUSE_FAMFS_FILE_REG,
> + FUSE_FAMFS_FILE_SUPERBLOCK,
> + FUSE_FAMFS_FILE_LOG,
> +};
Unused, apparently.
> +
> +enum famfs_ext_type {
> + FUSE_FAMFS_EXT_SIMPLE = 0,
> +};
An enum with a single value is not useful.
> +
> +struct fuse_famfs_simple_ext {
struct fuse_extent {
> + uint32_t se_devindex;
uint64_t backing_id.
> + uint32_t reserved;
> + uint64_t se_offset;
> + uint64_t se_len;
Please drop the "se_" prefix.
Please add more spare space here (e.g. uint64_t space[3]).
> +};
> +
> +struct fuse_famfs_fmap_header {
struct fuse_extents_header {
> + uint8_t file_type; /* enum fuse_famfs_file_type */
Unused
> + uint8_t reserved;
> + uint16_t fmap_version;
Don't use, plese.
> + uint32_t ext_type; /* enum famfs_ext_type */
Unused.
> + uint32_t nextents;
Okay.
> + uint32_t fmap_size; /* Inclusive of this header */
That's the same as outh.len.
> + uint64_t file_size;
Same as i_size
Thanks,
Miklos