openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.63k stars 1.75k forks source link

Beginning support for Linux 6.3 #14622

Closed kode54 closed 1 year ago

kode54 commented 1 year ago

Describe the feature would like to see added to OpenZFS

So far, it looks like this will be a major undertaking. Whoever was responsible for the namespace support is going to have to rebase the entire dang thing with alternate code paths for everything, because as of Linux 6.3, they replaced a whole mess of APIs so they either newly accept struct mnt_idmap * instead of struct user_namespace *, or accept the former in addition to the previous parameters. This has far reaching implications, I think. Good luck to whoever attempts the task.

How will this feature improve OpenZFS?

Implementing support for these major API changes will allow the code base to work with Linux 6.3 and newer kernels.

Additional context

As I said, I thought it was as simple as the inode_owner_or_capable function API changing, but it looks like a whole mess of the VFS interface was rewritten to accept idmaps instead of user namespaces, and some other interfaces such as locking were extended to add idmap parameters to several functions. I wish I had the spoons to take this on right now, but I do not. I'll see if I can help in any way possible, though. Or perhaps help with the effort tomorrow, or in the near future.

behlendorf commented 1 year ago

Thanks for the heads up. @youzhongyang you might want t start taking a look at this.

youzhongyang commented 1 year ago

Thanks for the heads up. @youzhongyang you might want t start taking a look at this.

I am working on it.

ptr1337 commented 1 year ago

Thanks for the heads up. @youzhongyang you might want t start taking a look at this.

I am working on it.

Thanks for working on this. Is it planned to get the 6.3 related commits into the 2.1.10 staging branch backported? Would be great, since 6.3 will be released soon.

RaitoBezarius commented 1 year ago

6.3 https://github.com/torvalds/linux/releases/tag/v6.3 was released & tagged.

behlendorf commented 1 year ago

Closing. 6.3 support was added to the master branch. We'll have to see how bad it will be to backport to the 2.1.x releases.

27a82cbb3e Linux 6.3 compat: Fix memcpy "detected field-spanning write" error d4dc53dad2 Linux 6.3 compat: idmapped mount API changes 8eb2f26057 Linux 6.3 compat: writepage_t first arg struct folio* c5431f1465 linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE ae0b1f66c7 linux 6.3 compat: add another bdev_io_acct case

skinkie commented 1 year ago

Closing. 6.3 support was added to the master branch. We'll have to see how bad it will be to backport to the 2.1.x releases.

Should META be updated then?