User: Password:
|
|
Subscribe / Log in / New account

Empty symlinks and full POSIX compliance

Empty symlinks and full POSIX compliance

Posted May 29, 2013 9:04 UTC (Wed) by etienne (guest, #25256)
In reply to: Empty symlinks and full POSIX compliance by ms-tg
Parent article: Empty symlinks and full POSIX compliance

> if that's not how it's done

Did not read the source code, but extracted from:
http://lwn.net/Articles/325126/
-------
If a file is deleted which exists at the bottom layer, a so-called
whiteout file with the same name is created at the top layer. Users
never get to see this file; it is not included in readdir results, and
trying to open it fails with errno == ENOENT. If a file with the same
name is later created, this file replaces the whiteout.
-------
readdir() could forget to list empty symlinks, but anyway if the file is listed in readdir() trying to open it would look like the file did exist but has now disappeared - i.e. has been removed since readdir() was initialised.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds