LWN: Comments on "Namespace reference counting and listns()" https://lwn.net/Articles/1043824/ This is a special feed containing comments posted to the individual LWN article titled "Namespace reference counting and listns()". en-us Mon, 10 Nov 2025 19:06:44 +0000 Mon, 10 Nov 2025 19:06:44 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net How is this an API quirk? It's normal and expected behaviour with file-handles in Unix. https://lwn.net/Articles/1045145/ https://lwn.net/Articles/1045145/ corbet They are new with regard to namespaces, but file handles are a fairly old concept; I <i>think</i> they had their origin with NFS many years ago. Wed, 05 Nov 2025 15:46:33 +0000 How is this an API quirk? It's normal and expected behaviour with file-handles in Unix. https://lwn.net/Articles/1045141/ https://lwn.net/Articles/1045141/ paulj <div class="FormattedComment"> I stand corrected. So these are a new class of handles, distinct from file descriptors, as per open_by_handle_at, and with a separate struct in the kernel it appears. I didn't realise. Thanks.<br> <p> </div> Wed, 05 Nov 2025 15:26:44 +0000 How is this an API quirk? It's normal and expected behaviour with file-handles in Unix. https://lwn.net/Articles/1045039/ https://lwn.net/Articles/1045039/ corbet Please, do not confuse file <i>handles</i> with file <i>descriptors</i>. A file handle is best thought of, perhaps, as an alternative name for the file. Just as the possession of a file's name does not cause its persistence, holding a file handle doesn't keep a file around. Wed, 05 Nov 2025 13:55:26 +0000 How is this an API quirk? It's normal and expected behaviour with file-handles in Unix. https://lwn.net/Articles/1045032/ https://lwn.net/Articles/1045032/ paulj <div class="FormattedComment"> <span class="QuotedText">&gt; That is the sort of API quirk that nobody asked for and nobody intended to implement.</span><br> <p> Isn't it entirely the expected and long-standing behaviour of filehandles? A user-space programme can acquire a file-handle for something, the object itself can be removed from any indexes that make it visible (e.g., where the file-handle references a file, the programme itself or another can delete the file-name entr{y,ies} from the filesystem), and the programme could if it wishes make the referred to object visible again (adding a file-name in the filesystem again for the file-handle).<br> <p> This is entirely normal, expected behaviour with file-handles, the referenced object, and whatever generally queryable indices there may be of such objects (e.g. filesystems).<br> <p> I think, at best, the author means this *normal behaviour* is - for some reason - not desired for namespaces. And the reason why namespaces are special, compared to other objects, should then have been explained.<br> </div> Wed, 05 Nov 2025 11:19:08 +0000 Finally! https://lwn.net/Articles/1045020/ https://lwn.net/Articles/1045020/ SPYFF <div class="FormattedComment"> I'm glad someone is walking the walk and introducing a simple yet powerful API for listing namespaces. Christian is doing great work, and this will be a game changer for many hacky applications. Time to time, I have to list network namespaces, but iproute2's ip netns only lists the ones it created with ip, not the ones created with, for example, unshare -n.<br> <p> </div> Wed, 05 Nov 2025 08:41:31 +0000 Namespace namespace https://lwn.net/Articles/1044879/ https://lwn.net/Articles/1044879/ Fowl <div class="FormattedComment"> Beginning my count down until we get a namespace for namespaces ;p<br> <p> (I guess figuring that out was part of why this wasn’t a /dev file or directory)<br> </div> Tue, 04 Nov 2025 08:24:08 +0000 Give the man a medal https://lwn.net/Articles/1044870/ https://lwn.net/Articles/1044870/ mathstuf <div class="FormattedComment"> It is commendable. If reviewers were more…discerning about such things, maybe more would do so. Same goes for the "rigorously undocumented" features noted in the merge window roundups here.<br> </div> Tue, 04 Nov 2025 03:58:41 +0000 Give the man a medal https://lwn.net/Articles/1044857/ https://lwn.net/Articles/1044857/ smurf <div class="FormattedComment"> <p> <span class="QuotedText">&gt; patches 22 through 72 are all tests</span><br> <p> If only everybody was that diligent.<br> </div> Mon, 03 Nov 2025 21:19:56 +0000 Pagination in syscalls? https://lwn.net/Articles/1044834/ https://lwn.net/Articles/1044834/ johill <div class="FormattedComment"> Every netlink dump also has pagination.<br> <p> In netlink, to solve this, a "generation" number is included in each partial dump (and updated by other code if the list changes.) If it changed anywhere while you were dumping, you know the list might be incomplete or list stale objects. In many cases, this doesn't really matter since an object might as well disappear just _after_ you created the list, etc.<br> </div> Mon, 03 Nov 2025 16:55:39 +0000 Pagination in syscalls? https://lwn.net/Articles/1044833/ https://lwn.net/Articles/1044833/ corbet <a href="https://man7.org/linux/man-pages/man2/getdents.2.html"><tt>getdents()</tt></a> has had pagination since forever; it's pretty much necessary for any interface that could return an arbitrary amount of data. Mon, 03 Nov 2025 16:44:55 +0000 Pagination in syscalls? https://lwn.net/Articles/1044832/ https://lwn.net/Articles/1044832/ hDF <div class="FormattedComment"> Not an expert, but I haven't seen pagination in syscalls before. What happens when the list of namespaces changes in between the `listns()` calls?<br> <p> </div> Mon, 03 Nov 2025 16:34:43 +0000