Tux Machines
Kernel Articles in LWN: NFSD, 6.5 Release, and More
Posted by Roy Schestowitz on Jul 13, 2023
Converting NFSD to use iomap and folios
Chuck Lever led a filesystem session at the 2023 Linux Storage, Filesystem, Memory-Management and BPF Summit on the Linux NFS server, which is also known as NFSD. He wanted to talk about converting the network filesystem to use iomap; that kind of conversion was the topic of the previous session at the summit. Beyond that, he wanted to discuss using folios, which has been a frequent topic at recent LSFMM+BPF gatherings, including this year.
Lever began with the announcement that NFSD is "under new management". Bruce Fields, who had been the maintainer since 2007 or so, has taken a sabbatical from the IT world ("he is well, I am not trying to cover anything up there"). Lever became the maintainer of NFSD for the kernel in January 2022 and Jeff Layton joined him as co-maintainer in July 2022.
The Linux NFSD has some features that no other implementation in the industry has, including NFS over RDMA, with support for "just about any fabric you can imagine"; the NFS client also works over RDMA. Support for NFS v4.2, which is pretty rare in other implementations, is also present; "those are things that we can be proud of and I hope I can extend that winning streak a little bit".
The first half of the 6.5 merge window
The first days of the 6.5 merge window have been a bit calmer than usual, with "only" 4,000 non-merge changesets having been pulled into the mainline repository. Those changesets include a fair amount of significant work, though. Read on for LWN's summary of the first set of changes merged for the next major kernel release.
Documenting counted-by relationships in kernel data structures
The C language is expressive in many ways, but it still does not have ways to express many of the relationships between fields in a data structure. That gap can be at least partially filled, though, if one is willing to create and use non-standard extensions. The adoption of of those extensions, in the form of the __counted_by() macro, has been merged for the 6.5 kernel release, even though the compiler feature it depends on has not yet been finalized.
Improving i_version
The i_version field in struct inode is meant to track changes to the data or metadata of a file. There are some problems with the way that i_version is being handled in the kernel, so Jeff Layton led a filesystem session at the 2023 Linux Storage, Filesystem, Memory-Management and BPF Summit to discuss them and what to do about them. For the most part, there are solutions in the works that will resolve most of the larger issues.
Layton's motivation for improving the state of i_version handling is NFS. Currently, the NFSv3 code watches file/directory timestamps (access time, or atime, and change time, or ctime) to indicate when its cache should be invalidated. But those times are recorded with one-jiffy (1-10ms) resolution; a lot can happen in a jiffy on today's hardware. That can lead to problems with the client thinking that its cache is up-to-date when it really is not.