mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Enable zhack to work properly with 4k sector size disks
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17576
This commit is contained in:
committed by
Brian Behlendorf
parent
8f15d2e4d5
commit
bc4aac0395
@@ -164,8 +164,9 @@ zfs_file_write(zfs_file_t *fp, const void *buf, size_t count, ssize_t *resid)
|
||||
|
||||
int
|
||||
zfs_file_pwrite(zfs_file_t *fp, const void *buf, size_t count, loff_t off,
|
||||
ssize_t *resid)
|
||||
uint8_t ashift, ssize_t *resid)
|
||||
{
|
||||
(void) ashift;
|
||||
return (zfs_file_write_impl(fp, buf, count, &off, resid));
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,9 @@ zfs_file_write(zfs_file_t *fp, const void *buf, size_t count, ssize_t *resid)
|
||||
*/
|
||||
int
|
||||
zfs_file_pwrite(zfs_file_t *fp, const void *buf, size_t count, loff_t off,
|
||||
ssize_t *resid)
|
||||
uint8_t ashift, ssize_t *resid)
|
||||
{
|
||||
(void) ashift;
|
||||
ssize_t rc;
|
||||
|
||||
rc = kernel_write(fp, buf, count, &off);
|
||||
|
||||
@@ -228,7 +228,8 @@ vdev_file_io_strategy(void *arg)
|
||||
abd_return_buf_copy(zio->io_abd, buf, size);
|
||||
} else {
|
||||
buf = abd_borrow_buf_copy(zio->io_abd, zio->io_size);
|
||||
err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid);
|
||||
err = zfs_file_pwrite(vf->vf_file, buf, size, off,
|
||||
vd->vdev_ashift, &resid);
|
||||
abd_return_buf(zio->io_abd, buf, size);
|
||||
}
|
||||
zio->io_error = err;
|
||||
|
||||
Reference in New Issue
Block a user