mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux/vnops: implement STATX_DIOALIGN
This statx(2) mask returns the alignment restrictions for O_DIRECT access on the given file. We're expected to return both memory and IO alignment. For memory, it's always PAGE_SIZE. For IO, we return the current block size for the file, which is the required alignment for an arbitrary block, and for the first block we'll fall back to the ARC when necessary, so it should always work. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16972
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
|
||||
*/
|
||||
|
||||
#ifndef _SYS_FS_ZFS_VNOPS_H
|
||||
@@ -42,6 +43,8 @@ extern int zfs_clone_range_replay(znode_t *, uint64_t, uint64_t, uint64_t,
|
||||
extern int zfs_getsecattr(znode_t *, vsecattr_t *, int, cred_t *);
|
||||
extern int zfs_setsecattr(znode_t *, vsecattr_t *, int, cred_t *);
|
||||
|
||||
extern int zfs_get_direct_alignment(znode_t *, uint64_t *);
|
||||
|
||||
extern int mappedread(znode_t *, int, zfs_uio_t *);
|
||||
extern int mappedread_sf(znode_t *, int, zfs_uio_t *);
|
||||
extern void update_pages(znode_t *, int64_t, int, objset_t *);
|
||||
|
||||
Reference in New Issue
Block a user