Project

General

Profile

Bug #7367

blkdev: support block size larger than 512

Added by Youzhong Yang over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
driver - device drivers
Start date:
2016-09-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

It seems the current blkdev driver assumes the block size is 512, although it has the right shift value available as (bd_t*)->d_blkshift.

We tried a patch that calculates the block number and number of blocks based on the d_blkshift value, it worked for a zpool full of NVMe SSDs which are formatted to be 4k block size.

However, if a 4k device is used as zpool cache drive, it won't work, because zfs does not respect the ashift value of the drive, and sends I/O requests of size = n*512 to the device.


Files

rdisk.c (1.24 KB) rdisk.c Youzhong Yang, 2017-01-26 07:53 PM

Also available in: Atom PDF