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

Workaround issue of Linux vdev_disk.c #16678

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions module/zfs/zio.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ zio_init(void)
continue;
#endif

#if defined(__linux__) && defined(_KERNEL)
/*
* Workaround issue of Linux vdev_disk.c, in some cases not
* linearizing buffers with disk sector crossing a page
* boundary. It is fine for hardware, but somehow required by
* LUKS. It is not typical for ZFS to produce such buffers, but
* it may happen if 6KB block is compressed to 4KB, while still
* having 2KB alignment. Banning the 6KB buffers helps vdevs
* with ashifh=12.
*/
if (size > PAGESIZE && !IS_P2ALIGNED(size, PAGESIZE))
continue;
#endif

if (IS_P2ALIGNED(size, PAGESIZE))
align = PAGESIZE;
else
Expand Down
Loading