openzfs / openzfs-docs

OpenZFS Documentation
https://openzfs.github.io/openzfs-docs/
132 stars 190 forks source link

dRAID comment error #474

Open edgarsuit opened 9 months ago

edgarsuit commented 9 months ago

The comment at the top of draid.c has an error (unless I'm reading it wrong): https://github.com/openzfs/zfs/blob/a94860a6dee1c07bb96ee36dafcba40b804560cc/module/zfs/vdev_draid.c#L77C48-L77C48

It says the number of redundancy groups in a slice is LCM(D+P, C-S). For the example, it shows a draid1:8d:14c:2s configuration. LCM(8+1, 14-2) = 36, which is not how many redundancy groups are in the slice (the diagram shows 4).

The number of redundancy groups in the slice is LCM(D+P, C-S)/(D+P).

The number of rows in the slice is LCM(D+P, C-S)/(C-S).