When a file is missing checksum xattrs, the plugin calculates all known checksums (not just the ones enabled), which adds CPU overhead.
This problem is made worse if the file is not writable to the current client, so the checksums xattrs cannot be written. And later accesses repeat the checksum calculation.
One drawback of this change is that it won't overwrite other checksum attributes that might be present. Perhaps that can be considered out of scope.
When a file is missing checksum xattrs, the plugin calculates all known checksums (not just the ones enabled), which adds CPU overhead.
This problem is made worse if the file is not writable to the current client, so the checksums xattrs cannot be written. And later accesses repeat the checksum calculation.
One drawback of this change is that it won't overwrite other checksum attributes that might be present. Perhaps that can be considered out of scope.
Opening as a draft for comment.