Skip to content

Wrong memory buffer alignment and IO buffer size when working in direct IO mode #7873

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

Closed
hvlad opened this issue Nov 25, 2023 · 2 comments · Fixed by #7890
Closed

Wrong memory buffer alignment and IO buffer size when working in direct IO mode #7873

hvlad opened this issue Nov 25, 2023 · 2 comments · Fixed by #7890

Comments

@hvlad
Copy link
Member

hvlad commented Nov 25, 2023

Customer reports that nbackup issues error when backup database:

IO error reading file: database.fdb
The parameter is incorrect.

Investigation shows that:

  1. The OS is Windows,
  2. error happens with direct IO ON only (switch -D ON),
  3. volume where database file reside have following properties (I show important ones only):

Bytes Per Sector : 4096
Bytes Per Physical Sector : 4096

@hvlad hvlad self-assigned this Nov 25, 2023
@hvlad hvlad changed the title IO error reading file, The parameter is incorrect. Wrong memory buffer alignment and IO buffer size when working in direct IO mode Nov 29, 2023
hvlad added a commit that referenced this issue Nov 29, 2023
hvlad added a commit that referenced this issue Dec 21, 2023
…en working in direct IO mode (#7890)

* Fixed bug #7873 : Wrong memory buffer alignment and IO buffer size when working in direct IO mode

* Use alignas() per Adriano suggestion

* Remove unused variable
@hvlad
Copy link
Member Author

hvlad commented Dec 21, 2023

Re-opened for backporting

@hvlad hvlad reopened this Dec 21, 2023
hvlad added a commit that referenced this issue Dec 21, 2023
@hvlad
Copy link
Member Author

hvlad commented Dec 21, 2023

Will be ported into v5 later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment