Date: Thu, 9 Jun 2011 16:10:45 +0200 (CEST) From: Martin Matuska <mm@mail.vx.sk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/157728: zfs (v28) incremental receive may leave behind temporary clones Message-ID: <20110609141046.6FC2F175C1A@mail.vx.sk> Resent-Message-ID: <201106091420.p59EK8Xd094751@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157728 >Category: kern >Synopsis: zfs (v28) incremental receive may leave behind temporary clones >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 09 14:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD 8.2-STABLE #2 r222851M: Wed Jun 8 07:24:58 CEST 2011 >Description: zfs receive (v28) may leave behind temporary clones if doing a parallel zfs list on an incremental snapshot being received. The temporary clone gets properly removed in Nexenta and OpenIndiana (but not immediately after zfs receive finishes - there is a small delay). In FreeBSD, something prevents the process/thread responsible for removing the clone doing its job. >How-To-Repeat: Script: #!/bin/sh zpool destroy test if [ ! -f "/tmp/testfile" ]; then dd if=/dev/zero of=/tmp/testfile bs=1M count=250 fi zpool create test /tmp/testfile zfs create test/d1 #dd if=/dev/zero of=/test/d1/file1 bs=1M count=100 zfs snapshot test/d1@s1 #rm /test/d1/file1 zfs send test/d1@s1 | zfs recv test/d2 zfs snapshot test/d1@s2 ( sleep 1; zfs send -I @s1 test/d1@s2 | zfs recv test/d2) & while test "$OK" != "1"; do zfs list -H test/d2@s2 >/dev/null 2>/dev/null && OK=1 done zfs destroy test/d2@s1 zdb -d test | grep % Result: cannot destroy 'test/d2@s1': dataset already exists Could not open test/d2/%s2, error 16 >Fix: For now only a workaround: - do not do zfs list or - destroy temporary clone afterwards (zfs destroy test/d2/%s2) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110609141046.6FC2F175C1A>