Re: What is needed for ZFS block cloning to work?

Bakul Shah <[email protected]> Sat, 11 Jul 2026 15:38:48 -0700
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]>
On Jul 11, 2026, at 3:33=E2=80=AFPM, Bakul Shah <[email protected]> =
wrote:
>=20
> On Jul 11, 2026, at 2:34=E2=80=AFPM, John F Carr <[email protected]> wrote:
>>=20
>> I enabled block cloning on 15.1-STABLE but copy_file_range
>> between two files in the same directory does not cause
>> bcloneused to change.  I have vfs.zfs.bclone_enabled=3D1
>> and feature@block_cloning=3Denabled.  Is anything more
>> needed?
>=20
> FWIW on my 15.1-STABLE (as of yesterday) machine I didn't
> do anything special but it seems to work....
>=20
> $ ls -lh
> total 22 GB
> -rw-r--r--  2 bakul staff   36G Jan 31  2017 img
>=20
> $ time cp img img1
> cp img img1  0.00s user 0.76s system 20% cpu 3.621 total
>=20
> $ ls -lh
> total 45 GB
> -rw-r--r--  2 bakul staff   36G Jan 31  2017 img
> -rw-r--r--  1 bakul wheel   36G Jul 11 15:30 img1
>=20
> [on a SATA HD, during make buildworld]

$ zpool get bcloneused
NAME   PROPERTY    VALUE        SOURCE
zroot  bcloneused  22.5G        -

$ rm img1

$ zpool get bcloneused
NAME   PROPERTY    VALUE        SOURCE
zroot  bcloneused  238M         -