Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Dec 2018 23:02:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233436] rm -rf fails when the number of subfolders of a folder in a tree is too high
Message-ID:  <bug-233436-227-U4EG8RM2zP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-233436-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-233436-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233436

Jilles Tjoelker <jilles@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jilles@FreeBSD.org

--- Comment #3 from Jilles Tjoelker <jilles@FreeBSD.org> ---
This is probably another instance of bug #197336, except that instead of
find(1), rm(1) is affected.

The bug is in the common fts(3) code, which assumes that there are no more
subdirectories than the st_nlink field reports (minus two for . and ..). Th=
is
assumption is incorrect with ZFS, since it supports more subdirectories than
fit in the st_nlink field's data type (nlink_t). As a result, fts(3) report=
s to
rm(1) that the subdirectories are not directories, and rm(1) tries to unlin=
k(2)
them, which fails with [EPERM].

In 12.0, nlink_t has been enlarged so it can report the correct number of
subdirectories with ZFS, so this bug should no longer occur on that version.
The fts(3) code in 11.x could be fixed in various ways as discussed in bug
#197336.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233436-227-U4EG8RM2zP>