Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2017 10:38:49 -0700
From:      Ngie Cooper <yaneurabeya@gmail.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r325320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <5199F871-5DE2-4434-87F2-FEF88DB34037@gmail.com>
In-Reply-To: <201711021349.vA2Dn8Yg063559@repo.freebsd.org>
References:  <201711021349.vA2Dn8Yg063559@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Nov 2, 2017, at 06:49, Andriy Gapon <avg@FreeBSD.org> wrote:
>=20
> Author: avg
> Date: Thu Nov  2 13:49:08 2017
> New Revision: 325320
> URL: https://svnweb.freebsd.org/changeset/base/325320
>=20
> Log:
>  Disable posix_fallocate(2) for ZFS
>=20
>  The generic (naive) implementation of posix_fallocate cannot provide the
>  standard mandated guarantee that overwrites would never fail due to the l=
ack
>  of free space.  The fundamental reason is the copy-on-write architecture
>  of ZFS.  Other features like compression and deduplication can also
>  increase the size difference between the (pre-)allocated dummy content
>  and the future content.
>=20
>  So, until ZFS can properly implement the feature it's better to report
>  that it is unsupported rather than providing an ersatz implementation.
>  Please note that EINVAL is used to report that the underlying file system=

>  does not support the operation (POSIX.1-2008).
>=20
>  illumos and ZoL seem to do the same.
>=20
>  MFC after:    3 weeks
>  Sponsored by:    Panzura

It=E2=80=99d be nice if it worked though and was reported via the file syste=
m.  Posix suggests it should be, as of 2013: http://austingroupbugs.net/view=
.php?id=3D687 .

Need to go poking around and see what=E2=80=99s in freebsd later on tonight.=
 Bug filed: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223383 .

> Modified:
>  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
>=20
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c    Thu=
 Nov  2 12:16:50 2017    (r325319)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c    Thu=
 Nov  2 13:49:08 2017    (r325320)
> @@ -6009,6 +6009,7 @@ struct vop_vector zfs_vnodeops =3D {
>    .vop_inactive =3D        zfs_freebsd_inactive,
>    .vop_reclaim =3D        zfs_freebsd_reclaim,
>    .vop_access =3D        zfs_freebsd_access,
> +    .vop_allocate =3D        VOP_EINVAL,
>    .vop_lookup =3D        zfs_cache_lookup,
>    .vop_cachedlookup =3D    zfs_freebsd_lookup,
>    .vop_getattr =3D        zfs_freebsd_getattr,
>=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5199F871-5DE2-4434-87F2-FEF88DB34037>