Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vblk: Reading granularity issue #33

Open
niclashedam opened this issue Sep 23, 2019 · 0 comments
Open

vblk: Reading granularity issue #33

niclashedam opened this issue Sep 23, 2019 · 0 comments

Comments

@niclashedam
Copy link
Contributor

vblk will send administrative read commands for a predefined number of sectors regardless of the actual number of sectors to be read.

https://github.com/OpenChannelSSD/liblightnvm/blob/master/src/nvm_vblk.c#L575

const size_t cmd_nsectr = vblk->flags & NVM_CMD_VECTOR ? NVM_NADDR_MAX : WS_OPT;

Assume that I have a chunk with 6144 sectors and I want to read only the last sector. This should not be a problem, as the read granularity is a single sector. However, due to the code above, vblk sends read commands for 64 or 24 sectors (on my device). This causes the read to fail, as many of the sectors are out of bounds.

The function above also assumes that reads have to be aligned to the optimal write granularity, which is not ideal.

@niclashedam niclashedam changed the title Reading granularity issue vblk: Reading granularity issue Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant