Closed nak3 closed 7 years ago
Old kernel doesn't support setting NBD_FLAG_SEND_TRIM
and NBD_CMD_FLUSH
by NBD_SET_FLAGS
.
This patch will output following error message instead of stop running process with retuning error.
2016-09-17 04:20:48.979478 E | nbd: ioctl returned: inappropriate ioctl for device. kernel version update is strongly recommended.
A more robust option is to gracefully degrade. Turn off the unsupported flags; we can continue without receiving TRIM for sure, and if CMD_FLUSH never gets sent, we can emulate it by syncing every nominal interval in the degraded case.
Alright. I will try. Thank you for your suggestion. (I should have read your comment on https://github.com/coreos/torus/issues/295)
Updated. It might be too straightforward. Any suggestion is welcome.
fixes https://github.com/coreos/torus/issues/295