zfs icon indicating copy to clipboard operation
zfs copied to clipboard

Beginning support for Linux 6.3

Open kode54 opened this issue 1 year ago • 3 comments

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.

kode54 avatar Mar 14 '23 06:03 kode54

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

behlendorf avatar Mar 16 '23 21:03 behlendorf

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

I am working on it.

youzhongyang avatar Mar 17 '23 01:03 youzhongyang

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.

ptr1337 avatar Apr 11 '23 07:04 ptr1337

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

RaitoBezarius avatar Apr 23 '23 20:04 RaitoBezarius

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

behlendorf avatar May 08 '23 20:05 behlendorf

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?

skinkie avatar May 27 '23 13:05 skinkie