David Craven <da...@craven.ch> skribis: > The nice thing about having the check procedure be part of the > <file-system> is that it can be overridden. I'm not sure what use > cases there are yet. One I can think of is that btrfs device scan is > only required when using a multi-device configuration like raid. So I > don't know if we want to run it by default as a %btrfs-checker or do > nothing by default, and let the user add a custom file system > pre-mount hook (file-system-checker) when needed.
I don’t know enough about btrfs. Is it really useful in practice to have a check procedure that is specific to the instance at hand? For the other FS types, the check method really belongs in the FS type, not in the FS instance. That is, all ext4 file systems are checked in the same way. Thus, it doesn’t seem natural to store the fsck method in the <file-system> object itself. There’s also a practical issue with that: users would have to specify the fsck method for every single <file-system> object: (list (file-system ;; … (type "ext4") (fsck %ext4-fsck)) (file-system ;; … (type "ext4") (fsck %ext4-fsck)) ;again (file-system ;; … (type "ext4") (fsck %ext4-fsck))) ;and again! :-) > A version of Marius'es patch that works would be here: > http://lists.gnu.org/archive/html/guix-devel/2016-12/msg00087.html OK, this patch doesn’t have the problem above, but it’s kinda cheating. :-) I’ll reply separately! Ludo’.