|
|
Subscribe / Log in / New account

Pagination in syscalls?

Pagination in syscalls?

Posted Nov 3, 2025 16:34 UTC (Mon) by hDF (subscriber, #121224)
Parent article: Namespace reference counting and listns()

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?


to post comments

Pagination in syscalls?

Posted Nov 3, 2025 16:44 UTC (Mon) by corbet (editor, #1) [Link] (1 responses)

getdents() has had pagination since forever; it's pretty much necessary for any interface that could return an arbitrary amount of data.

Pagination in syscalls?

Posted Nov 3, 2025 16:55 UTC (Mon) by johill (subscriber, #25196) [Link]

Every netlink dump also has pagination.

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.


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