Chris Siebenmann via illumos-zfs
2014-04-28 16:18:44 UTC
I've been scanning through the ZFS kernel code for deduplication, which
has both taught me things and left me kind of confused about some aspects
of dedup handling. So it's time to ask questions of people who know more
than I do.
Suppose that you do the following:
- turn deduplication on for tank/testfs.
- write a file to tank/testfs with unique blocks, call it tank/testfs/fred.
These unique blocks will create new DDT entries for themselves.
- turn deduplication off on tank/testfs
- delete tank/testfs/fred.
Does this remove the DDT entries for the blocks of tank/testfs/fred? In
the current Illumos source I can't see where this happens (if it does). I
believe that DDT removal is normally done in zio.c's zio_ddt_free(),
but that seem to only be part of the ZIO pipeline if dedup is enabled
on the filesystem (well, the objset technically). However I'm not sure
I'm fully following the code here and there may be other paths too.
Thanks in advance.
- cks
has both taught me things and left me kind of confused about some aspects
of dedup handling. So it's time to ask questions of people who know more
than I do.
Suppose that you do the following:
- turn deduplication on for tank/testfs.
- write a file to tank/testfs with unique blocks, call it tank/testfs/fred.
These unique blocks will create new DDT entries for themselves.
- turn deduplication off on tank/testfs
- delete tank/testfs/fred.
Does this remove the DDT entries for the blocks of tank/testfs/fred? In
the current Illumos source I can't see where this happens (if it does). I
believe that DDT removal is normally done in zio.c's zio_ddt_free(),
but that seem to only be part of the ZIO pipeline if dedup is enabled
on the filesystem (well, the objset technically). However I'm not sure
I'm fully following the code here and there may be other paths too.
Thanks in advance.
- cks