zoned block device support는 linux kernel version 4.10에 추가되었다. 이 버전 혹은 후속 버전을 통해 device mapper support and ZBD-aware file system을 사용할 수 있다.
application developer는 다양한 I/O path를 통해 zoned block device를 사용할 수 있고, 다른 프로그래밍 인터페이스로 ZBD를 제어할 수 있으며, ZBD를 다양한 방식으로 노출할 수 있다. 다양한 access 경로를 간단하게 표현하면 아래 그림과 같다.
세 개의 서로 다른 I/O path는 ZBD의 sequential zone의 write constraints를 숨기는 두개의 POSIX 호환 인터페이스를 구현한다. 이 세 개의 I/O 경로는 legacy application(fully-sequential write streams을 구현하도록 수정하지 않은 응용 프로그램)을 실행할 수 있다.
file access interface:
이것은 응용 프로그램이 데이터를 파일과 디렉터리로 구성할 수 있도록 파일 시스템이 구현하는 인터페이스이다. file access interface의 두 가지 다른 구현이 가능하다:
raw block access interface:
이것은 application이 device에 저장된 data에 directly access하는 데 사용할 수 있는 raw block device file access interface이다. legacy file system 사례와 유사하게, 이 인터페이스는 dm-zoned device mapper target driver를 사용하여 구현되어 application에서 sequential write constraints를 숨긴다.
zone block devices(ZBD)의 sequential write constraints를 준수하기 위해 작성되거나 수정된 application에 세 개의 추가 인터페이스를 사용할 수 있다. 이러한 인터페이스는 device constraints를 application에 직접 노출시키고, 이는 zone의 write pointer 위치에서 시작하는 sequential stream을 사용하여 data가 작성되도록 보장해야 한다.
file access interface:
이 특별한 인터페이스는 zonefs file system에 의해 구현된다. zonefs는 zone block device의 각 zone을 file로 노출하는 매우 간단한 file system이다. 그러나 일반 POSIX file system과 달리 device의 sequential write constraints는 zonefs에 의해 자동을 처리되지 않는다. zone을 나타내는 file을 순차적으로 쓰는 것은 application의 책임이다.
zoned raw block access interface:
이것은 raw block access interface(without any intermediate driver to handle the device constraints)의 counterpart이다. application은 block layer에 의해 제공되는 zone information 및 management operations에 대한 access를 얻기 위해 zone block device를 나타내는 device file을 직접 열어 이 인터페이스를 사용할 수 있다. 예를 들어, linux system utility는 이 interface를 사용한다. physical zoned block devices 뿐만 아니라 logically-created zoned block devices (e.g., zoned block devices created with the dm-linear device mapper target)는 이 인터페이스를 지원한다. libzbd user library와 tools는 이 인터페이스를 사용하는 application의 구현을 단순화할 수 있다.
passthrough devicee access interface:
이것은 application이 SCSI 또는 NVMe 명령을 device에 직접 전송할 수 있도록 하는 interface(provided by the SCSI generic driver and the NVMe driver)이다. kernel은 application이 전송하는 명령을 최소한으로 방해하므로 모든 device constraints(e.g., logical and physical sector size, zone boundaries, command timeout, command retry count, etc)을 처리할 수 있는 어플리케이션이 필요하다. libzbc 및 libnvme와 같은 user-level libraries는 이 인터페이스를 사용하는 어플리케이션의 구현을 크게 단순화할 수 있다.