Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support idmapped mount for kernel 6.3 #14682

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

youzhongyang
Copy link
Contributor

@youzhongyang youzhongyang commented Mar 28, 2023

This PR adds changes needed for idmapped mount support in kernel 6.3.

Signed-off-by: Youzhong Yang yyang@mathworks.com

Motivation and Context

Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap type for mounts (struct mnt_idmap), we need to detect these changes and make zfs work with the new APIs.

Description

The new struct mnt_idmap is hidden and those essential APIs such as make_vfsuid, make_vfsgid, from_vfsuid, and from_vfsgid are defined as GPL only. We have to work around this.

The approach is to redefine struct mnt_idmap in the same way as it is in kernel 6.3. In the future if its definition is changed, our test cases should be able to catch it.

How Has This Been Tested?

  • Ran zfs test suite under kernel 6.3-rc2. Test suite run against 6.3-rc4 is still in progress.
  • Ran zfs test suite under kernel 5.15.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@youzhongyang
Copy link
Contributor Author

6.3-rc4 test results:

Results Summary
PASS     1634
FAIL       9
SKIP      15

Running Time:   04:25:03
Percent passed: 98.6%
Log directory:  /var/tmp/test_results/20230328T093756

Tests with results other than PASS that are expected:
    FAIL casenorm/mixed_formd_delete (https://github.com/openzfs/zfs/issues/7633)
    FAIL casenorm/mixed_formd_lookup (https://github.com/openzfs/zfs/issues/7633)
    FAIL casenorm/mixed_formd_lookup_ci (https://github.com/openzfs/zfs/issues/7633)
    FAIL casenorm/mixed_none_lookup_ci (https://github.com/openzfs/zfs/issues/7633)
    FAIL casenorm/sensitive_formd_delete (https://github.com/openzfs/zfs/issues/7633)
    FAIL casenorm/sensitive_formd_lookup (https://github.com/openzfs/zfs/issues/7633)
    SKIP cli_root/zfs_unshare/zfs_unshare_006_pos (Not applicable)
    FAIL cli_root/zpool_import/import_rewind_device_replaced (Arbitrary pool rewind is not guaranteed)
    SKIP cli_root/zpool_import/zpool_import_missing_003_pos (https://github.com/openzfs/zfs/issues/6839)
    SKIP pam/setup (pamtester might be not available)
    FAIL refreserv/refreserv_004_pos (Known issue)
    SKIP removal/removal_with_zdb (Known issue)
    SKIP rsend/rsend_008_pos (https://github.com/openzfs/zfs/issues/6066)
    FAIL vdev_zaps/vdev_zaps_007_pos (Known issue)

Tests with result of PASS that are unexpected:

Tests with results other than PASS that are unexpected:
[yyang@fedora-dev ~]$ uname -a
Linux fedora-dev 6.3.0-0.rc4.35.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Mar 27 13:45:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

@kode54
Copy link

kode54 commented Mar 29, 2023

My dmesg log is aglow with a flood of:

zio pool=zroot vdev=/dev/disk/by-id/nvme-WDS100T3X0C-00SJG0_192725805072-part3 error=5 type=5 offset=0 size=0 flags=1049728

@youzhongyang
Copy link
Contributor Author

My dmesg log is aglow with a flood of:

zio pool=zroot vdev=/dev/disk/by-id/nvme-WDS100T3X0C-00SJG0_192725805072-part3 error=5 type=5 offset=0 size=0 flags=1049728

Thanks for testing. This is what I got when creating a zpool using virtual disks:

[   84.351059] ------------[ cut here ]------------
[   84.351064] WARNING: CPU: 2 PID: 1500 at block/blk-core.c:757 submit_bio_noacct+0x1aa/0x4d0
[   84.351077] Modules linked in: zfs(POE) spl(OE) rpcrdma rdma_cm iw_cm ib_cm ib_core nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 rfkill ip_set nf_tables nfnetlink qrtr vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock binfmt_misc vfat fat vmw_balloon intel_rapl_msr intel_rapl_common rapl pktcdvd joydev vmw_vmci i2c_piix4 nfsd auth_rpcgss nfs_acl lockd grace sunrpc zram xfs crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic ghash_clmulni_intel vmwgfx sha512_ssse3 serio_raw vmxnet3 drm_ttm_helper ttm vmw_pvscsi ata_generic pata_acpi fuse
[   84.351199] CPU: 2 PID: 1500 Comm: txg_sync Tainted: P        W  OE     -------  ---  6.3.0-0.rc4.35.fc39.x86_64 #1
[   84.351204] Hardware name: VMware, Inc. VMware7,1/440BX Desktop Reference Platform, BIOS VMW71.00V.18227214.B64.2106252220 06/25/2021
[   84.351208] RIP: 0010:submit_bio_noacct+0x1aa/0x4d0
[   84.351218] Code: e8 25 f7 00 00 00 83 f8 01 0f 85 b2 fe ff ff e9 cc fe ff ff 40 0f b6 c5 83 f8 01 0f 84 ed 00 00 00 83 f8 0d 0f 84 e4 00 00 00 <0f> 0b b8 0a 00 00 00 eb b9 83 f8 0f 0f 84 6c 02 00 00 83 f8 11 0f
[   84.351223] RSP: 0018:ffffb23084073c40 EFLAGS: 00010297
[   84.351228] RAX: 0000000000000000 RBX: ffff9041c2be5200 RCX: ffff9041c2be5200
[   84.351232] RDX: 0000000080000000 RSI: 0000000000040000 RDI: ffff9041c2be5200
[   84.351236] RBP: 0000000000040000 R08: ffffb23084073b80 R09: ffff9041f3178000
[   84.351240] R10: 0000000000000001 R11: ffff9041c5f5f190 R12: ffff9041c05ab840
[   84.351244] R13: ffff9041c9d215c0 R14: 0000000001ffb000 R15: ffff9041c5f5f190
[   84.351249] FS:  0000000000000000(0000) GS:ffff9048dfc80000(0000) knlGS:0000000000000000
[   84.351254] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   84.351258] CR2: 0000559407bec010 CR3: 000000010bac6006 CR4: 00000000001706e0
[   84.351286] Call Trace:
[   84.351289]  <TASK>
[   84.351295]  vdev_submit_bio+0x22/0x30 [zfs]
[   84.352495]  vdev_disk_io_flush+0x47/0xb0 [zfs]
[   84.353643]  vdev_disk_io_start+0x355/0x450 [zfs]
[   84.354805]  zio_vdev_io_start+0x1a7/0x520 [zfs]
[   84.355977]  zio_nowait+0xfe/0x290 [zfs]
[   84.357173]  zio_ioctl+0xd0/0xe0 [zfs]
[   84.358343]  zio_flush+0x24/0x30 [zfs]
[   84.359497]  vdev_config_sync+0xdf/0x300 [zfs]
[   84.360687]  spa_sync_rewrite_vdev_config+0x85/0x1d0 [zfs]
[   84.361859]  ? vdev_count_verify_zaps+0x48/0xf0 [zfs]
[   84.363076]  spa_sync+0x33c/0x890 [zfs]
[   84.364282]  txg_sync_thread+0x26f/0x3b0 [zfs]
[   84.365450]  ? __pfx_txg_sync_thread+0x10/0x10 [zfs]
[   84.366641]  ? __pfx_thread_generic_wrapper+0x10/0x10 [spl]
[   84.366709]  thread_generic_wrapper+0x60/0x90 [spl]
[   84.366775]  kthread+0xe6/0x110
[   84.366784]  ? __pfx_kthread+0x10/0x10
[   84.366792]  ret_from_fork+0x29/0x50
[   84.366809]  </TASK>
[   84.366811] ---[ end trace 0000000000000000 ]---
[   84.366815] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.366874] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.366935] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.366998] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.372547] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.372624] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.372684] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.372740] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.373971] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.374027] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.374089] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.374155] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.379229] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.379300] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.379372] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.379430] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.436823] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.437303] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.437764] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.438219] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.439828] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.439893] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.439958] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.440014] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.453340] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.453409] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.453480] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.453540] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.454783] zio pool=tank vdev=/dev/sdd1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.454841] zio pool=tank vdev=/dev/sde1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.454899] zio pool=tank vdev=/dev/sdb1 error=5 type=5 offset=0 size=0 flags=1049728
[   84.454955] zio pool=tank vdev=/dev/sdc1 error=5 type=5 offset=0 size=0 flags=1049728

This traces down to the line of code in blk-core.c:

https://github.com/torvalds/linux/blob/master/block/blk-core.c#L756

This seems to be a kernel block driver behavior change.

@youzhongyang
Copy link
Contributor Author

The commit "block: add a sanity check for non-write flush/fua bios" introduced the change.

I patched bio_set_flush() and tested again, it's now all clear. I am not sure if this is the right approach, need to think about how we should tackle this issue.

diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h
index c7405ffab..c5c6385be 100644
--- a/include/os/linux/kernel/linux/blkdev_compat.h
+++ b/include/os/linux/kernel/linux/blkdev_compat.h
@@ -426,7 +426,7 @@ static inline void
 bio_set_flush(struct bio *bio)
 {
 #if defined(HAVE_REQ_PREFLUSH) /* >= 4.10 */
-       bio_set_op_attrs(bio, 0, REQ_PREFLUSH);
+       bio_set_op_attrs(bio, 0, REQ_PREFLUSH | REQ_OP_WRITE);
 #elif defined(WRITE_FLUSH_FUA) /* >= 2.6.37 and <= 4.9 */
        bio_set_op_attrs(bio, 0, WRITE_FLUSH_FUA);
 #else

@behlendorf
Copy link
Contributor

@youzhongyang thanks for sorting out both of these 6.3 issues. I'll work on getting this reviewed.

Signed-off-by: Youzhong Yang <yyang@mathworks.com>
@youzhongyang
Copy link
Contributor Author

This PR has been updated and rebased. The writepage_t change is now gone from the PR.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sorting this out by adding all the needed compatibility code. Everything here looks good, the CI passes, and I see the change is mostly mechanical. I'll get this merged right away.

@behlendorf behlendorf merged commit d4dc53d into openzfs:master Apr 10, 2023
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 10, 2023
@satmandu
Copy link
Contributor

With this PR merged I was able to build a module for 6.3-rc6. But then booting I get this error:

[   31.658170] ------------[ cut here ]------------
[   31.658176] memcpy: detected field-spanning write (size 832) of single field "((void*)((dn->dn_phys)->dn_bonus + (((dn->dn_phys)->dn_nblkptr - 1) * sizeof (blkptr_t))))" at /var/lib/dkms/zfs/2.1.99.20230410/build/module/zfs/dbuf.c:4112 (size 320)
[   31.658194] WARNING: CPU: 0 PID: 539 at /var/lib/dkms/zfs/2.1.99.20230410/build/module/zfs/dbuf.c:4112 dbuf_sync_leaf+0x585/0x770 [zfs]
[   31.658398] Modules linked in: lp(+) parport efi_pstore dmi_sysfs ip_tables x_tables autofs4 zfs(POE) spl(OE) raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_magicmouse hid_logitech_hidpp hid_logitech_dj mlx4_ib hid_generic ib_uverbs mlx4_en ib_core uas usbhid hid usb_storage amdgpu iommu_v2 gpu_sched drm_buddy i2c_algo_bit drm_ttm_helper ttm crct10dif_pclmul crc32_pclmul drm_display_helper ghash_clmulni_intel sha512_ssse3 cec rc_core aesni_intel mxm_wmi iTCO_wdt drm_kms_helper syscopyarea sysfillrect sysimgblt intel_pmc_bxt iTCO_vendor_support crypto_simd mpt3sas nvme raid_class drm cryptd mlx4_core e1000e scsi_transport_sas i2c_i801 i2c_smbus ahci nvme_core xhci_pci libahci xhci_pci_renesas video wmi
[   31.658458] CPU: 0 PID: 539 Comm: dp_sync_taskq Tainted: P           OE      6.3.0-rc6 #2
[   31.658461] Hardware name: MSI MS-7998/C236A WORKSTATION (MS-7998), BIOS 2.A0 06/15/2018
[   31.658463] RIP: 0010:dbuf_sync_leaf+0x585/0x770 [zfs]
[   31.658643] Code: 0f 87 cd 42 1e 00 a8 01 75 22 48 89 d1 48 89 de 48 c7 c2 88 a4 bc c1 48 c7 c7 30 a5 bc c1 c6 05 b1 8b 2e 00 01 e8 1b c6 b7 d3 <0f> 0b 49 8b 4d 60 0f b6 41 03 48 8d b1 c0 00 00 00 83 e8 01 48 98
[   31.658646] RSP: 0000:ffffa4f2416d3bd8 EFLAGS: 00010282
[   31.658649] RAX: 0000000000000000 RBX: 0000000000000340 RCX: 0000000000000027
[   31.658651] RDX: ffff955b3ec20548 RSI: 0000000000000001 RDI: ffff955b3ec20540
[   31.658653] RBP: ffffa4f2416d3c90 R08: ffffffffc1bca578 R09: 0000000000000000
[   31.658654] R10: 0000000000ffff0a R11: 0000000000000636 R12: ffff95500c6c2ab8
[   31.658655] R13: ffff9550350d47b0 R14: ffff95501a259800 R15: ffff955013072c00
[   31.658657] FS:  0000000000000000(0000) GS:ffff955b3ec00000(0000) knlGS:0000000000000000
[   31.658659] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   31.658661] CR2: 000055687ddef568 CR3: 00000001151a3005 CR4: 00000000003706f0
[   31.658663] Call Trace:
[   31.658665]  <TASK>
[   31.658668]  ? zpl_get_file_info+0x88/0x240 [zfs]
[   31.658863]  ? mutex_lock+0x12/0x40
[   31.658869]  dbuf_sync_list+0xad/0x110 [zfs]
[   31.659046]  dnode_sync+0x461/0xb40 [zfs]
[   31.659240]  ? __schedule+0x48e/0x15a0
[   31.659244]  ? dnode_multilist_index_func+0x96/0xb0 [zfs]
[   31.659420]  ? mutex_lock+0x12/0x40
[   31.659424]  sync_dnodes_task+0x76/0xb0 [zfs]
[   31.659599]  taskq_thread+0x27e/0x490 [spl]
[   31.659615]  ? wake_up_q+0x90/0x90
[   31.659620]  ? taskq_thread_spawn+0x50/0x50 [spl]
[   31.659634]  kthread+0xe6/0x110
[   31.659636]  ? kthread_complete_and_exit+0x20/0x20
[   31.659639]  ret_from_fork+0x1f/0x30
[   31.659644]  </TASK>
[   31.659645] ---[ end trace 0000000000000000 ]---

Happy to open an issue for this if that would be helpful.

andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Apr 11, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap 
type for mounts (struct mnt_idmap), we need to detect these changes 
and make zfs work with the new APIs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Apr 11, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap 
type for mounts (struct mnt_idmap), we need to detect these changes 
and make zfs work with the new APIs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
@youzhongyang
Copy link
Contributor Author

I've seen this too:

[ 1667.309351] memcpy: detected field-spanning write (size 3904) of single field "((void*)((dn->dn_phys)->dn_bonus + (((dn->dn_phys)->dn_nblkptr - 1) * sizeof (blkptr_t))))" at /tmp/zfs-build-root-YvJzdwOd/BUILD/zfs-kmod-2.1.99/_kmod_build_6.3.0-0.rc5.20230405git76f598ba7d8e.44.fc39.x86_64/../zfs-2.1.99/module/zfs/dbuf.c:4112 (size 320)
[ 1667.357445] memcpy: detected field-spanning write (size 3904) of single field "((void*)((&ddnp[i])->dn_bonus + (((&ddnp[i])->dn_nblkptr - 1) * sizeof (blkptr_t))))" at /tmp/zfs-build-root-YvJzdwOd/BUILD/zfs-kmod-2.1.99/_kmod_build_6.3.0-0.rc5.20230405git76f598ba7d8e.44.fc39.x86_64/../zfs-2.1.99/module/os/linux/zfs/zio_crypt.c:902 (size 320)

I don't see why the dn_bonus can't be 3904 bytes. How could it assume it's only 320 bytes (uint8_t dn_bonus[DN_OLD_MAX_BONUSLEN] where DN_OLD_MAX_BONUSLEN=320)? This looks more or less a bug in include/linux/fortify-string.h.

We should think about how we can make it happy.

andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Apr 11, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap 
type for mounts (struct mnt_idmap), we need to detect these changes 
and make zfs work with the new APIs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Apr 12, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap 
type for mounts (struct mnt_idmap), we need to detect these changes 
and make zfs work with the new APIs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
@arda2012
Copy link

arda2012 commented May 7, 2023

Thanks for adding support for this. Is any backport to 2.1 planned, resp. is 2.2 planned for near future, or should we switch to master for now ? I know the correct approach would be to stick to an LTS kernel for now :-)

@kode54
Copy link

kode54 commented May 7, 2023

Also never to use ZFS with bleeding edge hardware. Mainly never buying hardware less than 5 years old.

behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 2, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap
type for mounts (struct mnt_idmap), we need to detect these changes
and make zfs work with the new APIs.

NOTE: This backport only includes the configure checks to detect
the 6.3 idmap API changes.  It does not include support for idmap.
When provided the idmap variable is ignored in most case in the
same way the user_ns argument was ignored.  This change is solely
to provide compatibility with the new interfaces.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 2, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap
type for mounts (struct mnt_idmap), we need to detect these changes
and make zfs work with the new APIs.

NOTE: This backport only includes the configure checks to detect
the 6.3 idmap API changes.  It does not include support for idmap.
When provided the idmap variable is ignored in most case in the
same way the user_ns argument was ignored.  This change is solely
to provide compatibility with the new interfaces.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes openzfs#14682
tonyhutter pushed a commit that referenced this pull request Jun 5, 2023
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap
type for mounts (struct mnt_idmap), we need to detect these changes
and make zfs work with the new APIs.

NOTE: This backport only includes the configure checks to detect
the 6.3 idmap API changes.  It does not include support for idmap.
When provided the idmap variable is ignored in most case in the
same way the user_ns argument was ignored.  This change is solely
to provide compatibility with the new interfaces.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes #14682
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants