Draft: tps: Use ioctl directly instead of calling chattr
As reported in #19581, calling chattr takes a long time sometimes. We still want to set the S attribute though, and because we write the config file atomically by creating a temporary file and renaming it, we have to set the attribute on the temporary file each time we want to write the config file.
Maybe using ioctl directly on the file descriptor is faster. so lets try that.
Closes #19581