Hi, 45mg <45mg.writes@gmail.com> skribis: > We use records to represent the different types of > mapped devices (LUKS, RAID, LVM). When variables are defined for these > records, we can distinguish them with eq?; when they are created by > procedures, like luks-device-mapping-with-options, this does not work. > Therefore, add a 'name' field to to distinguish > them. > > * gnu/system/mapped-devices.scm (): Add name field. > (luks-device-mapping, raid-device-mapping, lvm-device-mapping): > Initialize it with appropriate values for each of these types. > * gnu/system.scm (operating-system-bootloader-crypto-devices): Use it to > identify LUKS mapped devices. > > Change-Id: I4c85824f74316f07239374d9df6c007dd47a9d0c > --- > > I've tested this on my system; in conjunction with [1], I can finally mount my > LUKS volume with the no_read_workqueue and no_write_workqueue flags. > > [1] [bug#77499] [PATCH] mapped-devices/luks: Support extra options. > https://issues.guix.gnu.org/77499 > https://yhetil.org/guix/fb637872bd14abe305d810b9d32e0db290b26dd6.1743702237.git.45mg.writes@gmail.com/ You can add a “Fixes” line for the bug it fixes. > (let* ((luks-devices (filter (lambda (m) > - (eq? luks-device-mapping > - (mapped-device-type m))) > + (eq? (mapped-device-kind-name > + (mapped-device-type m)) > + 'luks)) [...] > (define-record-type* mapped-device-kind > make-mapped-device-kind > mapped-device-kind? > + (name mapped-device-kind-name) As a rule of thumb, I think comparing by identity (as was done before) is more robust and cleaner: that avoids the whole problem of this secondary name space where name clashes may occur involuntarily. But this problem the patch fixes was introduced by ‘luks-device-mapping-with-options’ I believe, which returns a new device type. If we take a step back, I wonder if a better solution would not be to add an ‘arguments’ field to , following the same pattern as . Here’s a preliminary patch to illustrate that: