Closed inikep closed 3 years ago
What do yo mean "it does not work correctly" ? It works perfectly fine without zone explicit open/close... Applications may require it, but that is a different problem. For these cases, the application MUST check for 5.5+ headers.
I and Aravind Ramesh spent a lot of time trying to figure out why sysbench is not working with MySQL+RocksDB+zenfs on the latest Ubuntu 20.04.3 LTS. I'm affraid that many users may encounter the same issue.
What is sysbench ? If it is part of RocksDB+zenfs, then these must check for 5.5+ zone API at compile time. Ubuntu with 5.4 kernel does not support NVMe ZNS anyway. So all of this is not a libzbd problem. It is an application system integration problem.
use Fedora and these problems go away…
The latest Ubuntu 20.04.3 LTS has kernel 5.11 but only linux-libc-dev version (5.4.0-89.100) what means that blkzoned.h
is from 5.4 and doesn't support BLKCLOSEZONE
.
I agree that this is a mistake from Ubuntu but users should be notified that blkzoned.h
doesn't match their 5.11 kernel.
Zenfs can trivially check for that on startup by trying to open+close a full or empty zone (that is a no-op normally). If zenfs sees an ENOSUP error from libzbd, then a badly compiled version of libzbd is being used and zenfs can warn the users. Again, nothing wrong with libzbd here. zenfs should handle this issue, and a build problem reported to Ubuntu. Distros normally rebuild all packages that have an uapi dependency against newer kernels. The libzbd .deb packaging definitions may have a problem (that is not maintained in libzbd project, eventhough that is synced from time to time).
OK, I will create an issue for zenfs
.
BLKCLOSEZONE requires uapi headers from linux v5.5+. The latest Ubuntu 20.04.3 LTS has only linux-libc-dev version (5.4.0-89.100). IMHO it doesn't make sense to compile libzbd without BLKCLOSEZONE because it doesn't work correctly. It would be better to stop configure or building with an error message that 5.5+ is required.