From nobody@FreeBSD.org  Fri Aug  8 22:17:14 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1EB5D1065676
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Aug 2008 22:17:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C4998FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Aug 2008 22:17:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m78MHDXp036110
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 8 Aug 2008 22:17:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m78MHDRi036108;
	Fri, 8 Aug 2008 22:17:13 GMT
	(envelope-from nobody)
Message-Id: <200808082217.m78MHDRi036108@www.freebsd.org>
Date: Fri, 8 Aug 2008 22:17:13 GMT
From: GW <gw.freebsd@tnode.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: find doesn't support whiteout entries yet, but part of code already present
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         126384
>Category:       bin
>Synopsis:       [request] find(1) doesn't support whiteout entries yet, but part of code already present
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 08 22:20:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Sat Aug 09 01:20:51 UTC 2008
>Originator:     GW
>Release:        7-STABLE
>Organization:
>Environment:
FreeBSD a.b 7.0-STABLE FreeBSD 7.0-STABLE #3: Mon Aug  4 10:28:12 CEST 2008     root@a.b:/usr/src/sys/amd64/compile/MY  amd64
>Description:
The find command has a few lines of code dedicated to whiteout support
(avalible in UFS, useful for unionfs), but it has not been implemented
to work. Find utility accepts a new "-type w", but then it just ignores
whiteout entries entirely.

This is because some code is missing in /usr/src/usr.bin/find/find.c at
line 211 where it now just says to skip:

#ifdef FTS_W
                case FTS_W:
                        continue;
#endif /* FTS_W */

Unionfs (at least the one in HEAD) is a useful file system that uses
whiteouts and it would be great that all utilities would have support
for it. As I can see it is also not yet implemented in HEAD for find.
>How-To-Repeat:
# mkdir a b
# touch b/test
# mount -t unionfs a b
# rm -f b/test

# ls -lW b
total 0
w---------  0 root  wheel  0 Jan  1  1970 test
<< Correct output.

# find b -type w
<< No output, but it should be.

# find b -type w -exec ls -lWd {} \;
<< Same with such command.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
