core/cgroup: Apply IODeviceWeight= through BFQ attributes as well
There are two possible IO control mechanisms (io.cost and BFQ) that
expose separate weights APIs. In systemd units we configure only a
single device weight value so we need to write it to both attribute
files.
This patch extends to devices what is already done for default cgroup IO
weight in commit
2dbc45aea747 ("cgroup: Also set io.bfq.weight"). This
is possible with kernels >= v5.4 with commit
795fe54c2a82 ("bfq: Add
per-device weight"). A warning is logged if the write fails on older kernels.
Since per-device weight of a particular device cannot use both io.cost
policy and BFQ scheduler, at least one warning is always expected with
this approach (the method that is unconfigured).