Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix

From: Ludovic Courtès <[email-masked]>
Date: Wed, 10 Feb 2021 15:17:37 +0100

Hi!

I agree with 宋文武.

Still…

raid5atemyhomework <[email-masked]> skribis:

>    (service-type (name 'file-systems)
>                  (extensions
>                   (list (service-extension shepherd-root-service-type
> -                                          file-system-shepherd-services)
> +                                          (lambda (value)
> +                                            (file-system-shepherd-services
> +                                             (filter file-system? value)
> +                                             (filter symbol? value))))
>                         (service-extension fstab-service-type
> -                                          file-system-fstab-entries)
> +                                          (lambda (value)
> +                                            (file-system-fstab-entries
> +                                             (filter file-system? value))))
>  
>                         ;; Have 'user-processes' depend on 'file-systems'.
>                         (service-extension user-processes-service-type
>                                            (const '(file-systems)))))
> +
> +                ;; Extensions consist of lists of <file-system> objects or
> +                ;; shepherd services’ names (symbols).  In the latter case,
> +                ;; the provided shepherd services supposed to mount and
> +                ;; unmount some file systems themself.

Why do we need to extend with symbols?

In general it’s much clearer if extensions receive only one type of
object (<file-system> records in this case).  It’s also best to avoid
passing around symbolic names (that’s why we extend with <file-system>
records rather than with Shepherd service names or whatever.)

Ludo’.