Skip to content
Open
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
18 changes: 18 additions & 0 deletions module/os/freebsd/zfs/zfs_vnops_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -5727,6 +5727,9 @@ zfs_freebsd_pathconf(struct vop_pathconf_args *ap)
{
ulong_t val;
int error;
#ifdef _PC_CLONE_BLKSIZE
zfsvfs_t *zfsvfs;
#endif

error = zfs_pathconf(ap->a_vp, ap->a_name, &val,
curthread->td_ucred, NULL);
Expand Down Expand Up @@ -5772,6 +5775,21 @@ zfs_freebsd_pathconf(struct vop_pathconf_args *ap)
case _PC_HAS_HIDDENSYSTEM:
*ap->a_retval = 1;
return (0);
#endif
#ifdef _PC_CLONE_BLKSIZE
case _PC_CLONE_BLKSIZE:
zfsvfs = (zfsvfs_t *)ap->a_vp->v_mount->mnt_data;
if (zfs_bclone_enabled &&
spa_feature_is_enabled(dmu_objset_spa(zfsvfs->z_os),
SPA_FEATURE_BLOCK_CLONING))
*ap->a_retval = spa_feature_is_active(
dmu_objset_spa(zfsvfs->z_os),
SPA_FEATURE_LARGE_BLOCKS) ?
SPA_MAXBLOCKSIZE :
SPA_OLD_MAXBLOCKSIZE;
else
*ap->a_retval = 0;
return (0);
#endif
default:
return (vop_stdpathconf(ap));
Expand Down
Loading