Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 2008 22:17:13 GMT
From:      GW <gw.freebsd@tnode.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/126384: find doesn't support whiteout entries yet, but part of code already present
Message-ID:  <200808082217.m78MHDRi036108@www.freebsd.org>
Resent-Message-ID: <200808082220.m78MK0Ic008059@freefall.freebsd.org>

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

>Number:         126384
>Category:       bin
>Synopsis:       find 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:
>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808082217.m78MHDRi036108>