Wedson Almeida Filho <wedsonaf@xxxxxxxxx> writes: [...] > @@ -472,6 +495,9 @@ pub struct SuperParams { > > /// Granularity of c/m/atime in ns (cannot be worse than a second). > pub time_gran: u32, > + > + /// Data to be associated with the superblock. > + pub data: T, > } > > /// A superblock that is still being initialised. > @@ -522,6 +548,9 @@ impl<T: FileSystem + ?Sized> Tables<T> { > sb.0.s_blocksize = 1 << sb.0.s_blocksize_bits; > sb.0.s_flags |= bindings::SB_RDONLY; > > + // N.B.: Even on failure, `kill_sb` is called and frees the data. > + sb.0.s_fs_info = params.data.into_foreign().cast_mut(); I would prefer to make the target type of the cast explicit. BR Andreas