Skip to content

Support for 4kn devices #176

Description

@thorvald

Our NVMe are usually low-level formatted with 4k physical block sizes. With that, dm-writeboost refuses to use it as a caching device, since it cannot read the superblock -- issuing a 512 byte read to a 4kn device always fails.

[  823.102234] blk_update_request: I/O error, dev nvme0n1, sector 2048
[  823.108517] device-mapper: writeboost: read_superblock_header() I/O error(-5), bits(18446744073709551615), dev(259:3), sector(0), read
[  823.120595] device-mapper: writeboost: read_superblock_header failed
[  823.126949] device-mapper: writeboost: audit_cache_device failed

I tried changing the buf_1 pool to be 4096 byte and modifying read_superblock_header to read 1<<3 sectors, and that allows dm-writeboost to progress further. Encouraged by that, I tried reformatting the NVMe to 512-byte physical blocks, at which point all the errors went away.

Any plans to support 4kn cache devices?

Also, our backing devices are 4kn and don't support changing the block size. My understanding is that dm-writeboost always issues 4k IO, and initial testing looks good, but are there any caveats with 4kn backing devices?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions