Project

General

Profile

Actions

Feature #14631

open

Return ENOTEMPTY to its rightful places

Added by Dan McDonald 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
filesystems (not ZFS)
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Hard
Tags:
Gerrit CR:

Description

Apparently, System V didn't have ENOTEMPTY, so when Solaris-2/SunOS-5 happened, it disappeared.

Linux, BSDs, and even Posix and SUS say that you can have unlink() and rmdir() return either EEXIST or ENOTEMPTY for rmdir() or unlinkat() with the AT_REMOVEDIR flag set. This LX Brand PR in SmartOS:

https://github.com/TritonDataCenter/illumos-joyent/pull/398

inspired this issue.

Unfortunately, as has been discussed on IRC just prior to me filing this, restoring ENOTEMPTY may break a lot of software, not just internally, but also externally, where 3rd-party code assumes rmdir("non-empty") returns EEXIST.

This will not be an easy change to test. ALSO, it appears every filesystem type has to be fixed to take this into account as well. This is categorized in "filesystems (not ZFS)", but it covers ZFS as well.

No data to display

Actions

Also available in: Atom PDF