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

need auto-detection of directio alignment requirements #25

Open
carns opened this issue Mar 2, 2021 · 2 comments
Open

need auto-detection of directio alignment requirements #25

carns opened this issue Mar 2, 2021 · 2 comments

Comments

@carns
Copy link
Member

carns commented Mar 2, 2021

In GitLab by @carns on Apr 7, 2020, 13:40

Some systems need 512 bytes, others need 4096. It's not obvious how to tell ahead of time which is required. In the worst case we could loop over a few options until a write succeeds when creating the volume and loop over read on adding a target.

@carns
Copy link
Member Author

carns commented Mar 2, 2021

In GitLab by @carns on Apr 7, 2020, 13:55

Pointed out by @roblatham00 (this is from man pages):

       ical block size of the underlying storage (typically 512 bytes) suffices.  The logical block size can be determined using the ioctl(2) BLKSSZGET operation or from the shell using the command:
           blockdev --getss```

@carns
Copy link
Member Author

carns commented Mar 2, 2021

In GitLab by @carns on Apr 7, 2020, 14:23

The above requires permission to open the block device, which isn't commonly available with normal user privs. Will likely need to just probe read/write sizes in practice.

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