How implementation details become ABI: a case study
How implementation details become ABI: a case study
Posted Oct 3, 2014 2:19 UTC (Fri) by viro (subscriber, #7872)In reply to: How implementation details become ABI: a case study by zblaxell
Parent article: How implementation details become ABI: a case study
Note that it's more than just /proc/*/fd/* - e.g. /proc/*/exe and /proc/*/cwd are also like that.
" (deleted)" is a kludge, and a damn unpleasant one. But as this story shows, it's not something we can kill ;-/ It's before my involvement, but I suspect that original motivation was lsof/fuser. And behaviour for rename(2) victim was an accident - check the history circa 2.1.40s; back when this " (deleted)" thing had been introduced *all* names had been external and d_move() swapped them in all cases. It was more about the unlinked ones... memcpy()-instead-of-swap had been introduced in 2.1.116 and it was more of "we need to put something there; just memcpy() it over".
No, it really had been an accident. BTW, prior to 2.1.43 those magic symlinks had the same semantics on follow_link, but gave "[%04x]:%u"
with st_dev and st_ino on readlink(). Next came an attempt to put something that usually gave pathname corresponding to the fs object in question, shortly followed by " (deleted)" tacked on the end of unlinked ones.
