On Tue, Mar 11, 2025 at 02:27:29PM +0100, Christoph Heiss wrote: > Comes with a reduction of 52 -> 40 in terms of crate dependencies for > proxmox-chroot, 198 -> 192 for a full workspace build. > > Currently, this is done inconsistently anyway, i.e. there are calls to > the external mount(8) as well as mount(2) and umount(2) via `nix`.
This makes sense in general. The `mount(2)` syscall is very raw and requires knowledge of how a file system is to be mounted while additionally adding a lot more features (especially when the new mount api is used instead). The `mount(1)` call on the other hand calls out to various file system specific helpers which provide a more user friendly interface for various things. (Eg. you *can* definitely use `mount(2)` to mount a ZFS, but you'd need to know the internals of how that works, and it may change with zfs versions I think...) Mounting is complicated in some cases ;-) Unmounting on the other hand is rather simple and really just needs a path... (the only sad part there is that there is no path-file-descriptor based version) _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel