openzfs / spl

A shim layer which adds the core interfaces required for OpenZFS.
https://zfsonlinux.org/
GNU General Public License v2.0
282 stars 181 forks source link

Introduced spl_dirname function. #649

Closed ab-oe closed 6 years ago

ab-oe commented 6 years ago

Since commit 8bcb77fabd7cbabcad49f58750be8683febee92b in kernel tree the logic for getting parent path doesn't work. The parent points to the file itself instead of its parent path. This results that the cache file for pool is never removed.

The new function returns parent directory where the file is placed. Then kern_path is executed with the parent directory name and the LOOKUP_DIR flag. Returned parent structure will point to correct parent path.

Addresses: #648

behlendorf commented 6 years ago

Closing. Replaced by #661 where this functionality is removed.