bcache does not work with suspend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bcache-tools (Debian) |
Confirmed
|
Unknown
|
|||
bcache-tools (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Bcache and suspend do not really go hand in hand. See http://
It boils down to simply disable caching mode before suspend and re-enable it after suspend. I wrote the following script and it should be part of bcache-tools since installing bcache-tools implies bcache might be in use.
The only really 'big' downside is, we always restore to writethrough mode, I guess we could store the state on suspend in /tmp and restore on resume if this is really needed.
cat /lib/systemd/
#!/bin/sh
if [ "$1" = "pre" ]; then
for cache in /sys/block/bcache*; do
echo "none" > ${cache}
done
fi
if [ "$1" = "post" ]; then
for cache in /sys/block/bcache*; do
echo "writethrough" > ${cache}
done
fi
Changed in bcache-tools (Ubuntu): | |
importance: | Undecided → Medium |
Changed in bcache-tools (Debian): | |
status: | Unknown → New |
Changed in bcache-tools (Debian): | |
status: | New → Confirmed |
Status changed to 'Confirmed' because the bug affects multiple users.