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

5.18 requires __set_page_dirty_nobuffers -> filemap_dirty_folio change #13325

Closed
satmandu opened this issue Apr 12, 2022 · 1 comment · Fixed by #13380
Closed

5.18 requires __set_page_dirty_nobuffers -> filemap_dirty_folio change #13325

satmandu opened this issue Apr 12, 2022 · 1 comment · Fixed by #13380
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@satmandu
Copy link
Contributor

satmandu commented Apr 12, 2022

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 22.04
Kernel Version 5.18-rc4
Architecture x86_64
OpenZFS Version 2.1.4 w/ 5.18 patches from the 2.1.5 staging series.

Describe the problem you're observing

I'm getting filesystem related memory corruption (I suspect) which is causing kernel BUGS to be thrown during boot. I suspect they are connected to this change, since I'm seeing similar errors on two different x86_64 system (desktop and laptop) using the same kernels and the same zfs-dkms setups:
torvalds/linux@6b1f86f notes a change in 5.18-rc1:

"Primarily this series converts some of the address_space operations to
  take a folio instead of a page.

Of note also: fs: Convert trivial uses of __set_page_dirty_nobuffers to filemap_dirty_folio

I noticed a bunch of these issues on 5.18-rc4 with zfs-2.1.4 on multiple systems.

Describe how to reproduce the problem

Try to use zfs w/ 5.18-rc1.

Include any warning/errors/backtraces from the system logs

error w/ 5.18-rc2:

[   18.565421] BUG: kernel NULL pointer dereference, address: 0000000000000000
[   18.565427] #PF: supervisor instruction fetch in kernel mode
[   18.565430] #PF: error_code(0x0010) - not-present page
[   18.565431] PGD 0 P4D 0 
[   18.565435] Oops: 0010 [#1] PREEMPT SMP PTI
[   18.565438] CPU: 5 PID: 3146 Comm: tracker-miner-f Tainted: P        W  OE     5.18.0-rc2 #1
[   18.565441] Hardware name: Apple Inc. MacBookPro11,3/Mac-2BD1B31983FE1663, BIOS 432.60.3.0.0 10/27/2021
[   18.565443] RIP: 0010:0x0
[   18.565449] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[   18.565450] RSP: 0000:ffff9c72dbaf7d10 EFLAGS: 00010246
[   18.565452] RAX: 0000000000000000 RBX: ffff9c72dbaf7de0 RCX: 000000006255bb9f
[   18.565454] RDX: 0000000000000000 RSI: ffffcc4785173dc0 RDI: ffff8d4359b7c680
[   18.565456] RBP: ffff9c72dbaf7d20 R08: ffff8d43557ad7d0 R09: 0000000000000000
[   18.565458] R10: 0000000000000000 R11: 0000000000000000 R12: ffffcc4785173dc0
[   18.565459] R13: ffff8d4359b7c680 R14: 0000000000000200 R15: 00000001112b2067
[   18.565461] FS:  00007f3a30fde2c0(0000) GS:ffff8d46af340000(0000) knlGS:0000000000000000
[   18.565463] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   18.565465] CR2: ffffffffffffffd6 CR3: 000000011b782002 CR4: 00000000001706e0
[   18.565468] Call Trace:
[   18.565469]  <TASK>
[   18.565471]  folio_mark_dirty+0x39/0x60
[   18.565478]  filemap_page_mkwrite+0x130/0x1c0
[   18.565481]  do_page_mkwrite+0x5a/0xb0
[   18.565485]  do_wp_page+0x291/0x390
[   18.565488]  __handle_mm_fault+0xc4c/0x15f0
[   18.565491]  handle_mm_fault+0xba/0x290
[   18.565494]  do_user_addr_fault+0x1be/0x670
[   18.565499]  exc_page_fault+0x76/0x170
[   18.565503]  ? asm_exc_page_fault+0x8/0x30
[   18.565507]  asm_exc_page_fault+0x1e/0x30
[   18.565510] RIP: 0033:0x7f3a33886179
[   18.565512] Code: 48 8d 7b 70 0f 1f 44 00 00 8b 30 48 83 c0 08 01 d6 01 f1 8b 70 fc 01 ce 01 f2 48 39 f8 75 ea f3 0f 6f 43 48 89 4b 70 89 53 74 <0f> 11 45 30 f3 41 0f 6f 4c 24 10 0f 11 4d 40 f3 41 0f 6f 54 24 20
[   18.565515] RSP: 002b:00007ffd1d738100 EFLAGS: 00010246
[   18.565517] RAX: 0000556bead6da78 RBX: 0000556bead6da08 RCX: 0000000006180738
[   18.565519] RDX: 0000000009db9335 RSI: 0000000006180738 RDI: 0000556bead6da78
[   18.565520] RBP: 00007f3a3018b000 R08: 0000000000000002 R09: 0000000000000000
[   18.565522] R10: 0000000000001000 R11: 0000000000000206 R12: 0000556bead6da50
[   18.565523] R13: 0000000000000002 R14: 0000000000000001 R15: 0000556bead6da08
[   18.565527]  </TASK>
[   18.565528] Modules linked in: nls_utf8 cifs cifs_arc4 cifs_md4 fscache netfs qrtr cmac algif_hash algif_skcipher af_alg bnep nls_iso8859_1 intel_rapl_msr mei_pxp mei_hdcp joydev snd_hda_codec_cirrus intel_rapl_common snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp ledtrig_audio snd_hda_codec_hdmi kvm_intel applesmc snd_hda_intel snd_intel_dspcfg kvm snd_intel_sdw_acpi btusb snd_hda_codec btrtl btbcm btintel snd_hda_core btmtk snd_hwdep bluetooth wl(POE) snd_pcm ecdh_generic ecc snd_seq_midi rapl snd_seq_midi_event snd_rawmidi input_leds efi_pstore intel_cstate snd_seq cfg80211 snd_seq_device snd_timer snd mei_me bcm5974 apple_mfi_fastcharge mei soundcore acpi_als sbs industrialio_triggered_buffer kfifo_buf industrialio apple_gmux sbshc mac_hid apple_bl sch_fq_codel coretemp ipmi_devintf ipmi_msghandler msr parport_pc ppdev lp parport ip_tables x_tables autofs4 zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) zcommon(POE) znvpair(POE) spl(OE) z3fold lz4
[   18.565591]  lz4_compress hid_apple hid_generic usbhid uas hid usb_storage i915 nouveau mxm_wmi wmi drm_buddy drm_ttm_helper i2c_algo_bit ttm drm_dp_helper cec rc_core drm_kms_helper syscopyarea sysfillrect sysimgblt crct10dif_pclmul fb_sys_fops crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd nvme i2c_i801 drm nvme_core thunderbolt i2c_smbus lpc_ich xhci_pci xhci_pci_renesas video
[   18.565620] CR2: 0000000000000000
[   18.565622] ---[ end trace 0000000000000000 ]---
[   18.580948] RIP: 0010:0x0
[   18.580956] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[   18.580957] RSP: 0000:ffff9c72dbaf7d10 EFLAGS: 00010246
[   18.580961] RAX: 0000000000000000 RBX: ffff9c72dbaf7de0 RCX: 000000006255bb9f
[   18.580963] RDX: 0000000000000000 RSI: ffffcc4785173dc0 RDI: ffff8d4359b7c680
[   18.580964] RBP: ffff9c72dbaf7d20 R08: ffff8d43557ad7d0 R09: 0000000000000000
[   18.580966] R10: 0000000000000000 R11: 0000000000000000 R12: ffffcc4785173dc0
[   18.580967] R13: ffff8d4359b7c680 R14: 0000000000000200 R15: 00000001112b2067
[   18.580969] FS:  00007f3a30fde2c0(0000) GS:ffff8d46af340000(0000) knlGS:0000000000000000
[   18.580972] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   18.580974] CR2: ffffffffffffffd6 CR3: 000000011b782002 CR4: 00000000001706e0

with 5.18-rc1:

[   58.361307] kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
[   58.361313] kernel: #PF: supervisor instruction fetch in kernel mode
[   58.361315] kernel: #PF: error_code(0x0010) - not-present page
[   58.361317] kernel: PGD 0 P4D 0 
[   58.361320] kernel: Oops: 0010 [#1] PREEMPT SMP NOPTI
[   58.361324] kernel: CPU: 3 PID: 7720 Comm: jsvc Tainted: P        W  OE     5.18.0-051800rc1-generic #202204032230
[   58.361327] kernel: Hardware name: MSI MS-7998/C236A WORKSTATION (MS-7998), BIOS 2.A0 06/15/2018
[   58.361329] kernel: RIP: 0010:0x0
[   58.361334] kernel: Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[   58.361336] kernel: RSP: 0000:ffffb1954ed23cf0 EFLAGS: 00010246
[   58.361339] kernel: RAX: 0000000000000000 RBX: ffffb1954ed23de0 RCX: 00000000624a6e18
[   58.361342] kernel: RDX: 0000000000000000 RSI: ffffed87054f76c0 RDI: ffff9f5817f0ea40
[   58.361344] kernel: RBP: ffffb1954ed23d00 R08: ffff9f62fed80000 R09: ffffed87054f76f4
[   58.361346] kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffffed87054f76c0
[   58.361348] kernel: R13: ffff9f5817f0ea40 R14: 0000000000000200 R15: 00000001593fe067
[   58.361350] kernel: FS:  00007f943bfae740(0000) GS:ffff9f62fed80000(0000) knlGS:0000000000000000
[   58.361353] kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   58.361355] kernel: CR2: ffffffffffffffd6 CR3: 000000015699c006 CR4: 00000000003706e0
[   58.361358] kernel: Call Trace:
[   58.361359] kernel:  <TASK>
[   58.361361] kernel:  folio_mark_dirty+0x36/0x60
[   58.361367] kernel:  filemap_page_mkwrite+0x130/0x1c0
[   58.361371] kernel:  do_page_mkwrite+0x57/0xb0
[   58.361376] kernel:  do_fault+0x1bb/0x2f0
[   58.361379] kernel:  handle_pte_fault+0x1c5/0x230
[   58.361382] kernel:  __handle_mm_fault+0x3cb/0x700
[   58.361386] kernel:  handle_mm_fault+0xba/0x290
[   58.361389] kernel:  do_user_addr_fault+0x1be/0x670
[   58.361394] kernel:  exc_page_fault+0x76/0x170
[   58.361397] kernel:  ? asm_exc_page_fault+0x8/0x30
[   58.361401] kernel:  asm_exc_page_fault+0x1e/0x30
[   58.361405] kernel: RIP: 0033:0x7f943c1521ca
[   58.361407] kernel: Code: c5 fe 7f 07 c5 fe 7f 47 20 c5 fe 7f 47 40 c5 fe 7f 47 60 c5 f8 77 c3 66 0f 1f 84 00 00 00 00 00 40 0f b6 c6 48 89 d1 48 89 fa <f3> aa 48 89 d0 c5 f8 77 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90
[   58.361410] kernel: RSP: 002b:00007ffee9658b78 EFLAGS: 00010206
[   58.361413] kernel: RAX: 0000000000000000 RBX: 00007f943c1f1000 RCX: 0000000000008000
[   58.361415] kernel: RDX: 00007f943c1f1000 RSI: 0000000000000000 RDI: 00007f943c1f1000
[   58.361417] kernel: RBP: 00007ffee9658ce0 R08: 0000000000000009 R09: 0000000000000000
[   58.361419] kernel: R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffee9658be0
[   58.361421] kernel: R13: 0000000000008000 R14: 0000000000000009 R15: 000055bbed2a4860
[   58.361425] kernel:  </TASK>
[   58.361426] kernel: Modules linked in: overlay binfmt_misc nls_iso8859_1 intel_rapl_msr mei_hdcp mei_pxp intel_rapl_common intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp kvm_intel kvm rapl intel_cstate intel_wmi_thunderbolt efi_pstore xfs btusb ee1004 btrtl btbcm btintel btmtk snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi bluetooth snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec ecdh_generic ecc snd_hda_core joydev input_leds snd_hwdep snd_pcm cdc_acm snd_seq_midi snd_seq_midi_event snd_rawmidi intel_pch_thermal mei_me snd_seq mei snd_seq_device snd_timer snd soundcore mac_hid acpi_pad sch_fq_codel nct6775 hwmon_vid jc42 coretemp ipmi_devintf ipmi_msghandler msr nfsd parport_pc ppdev auth_rpcgss nfs_acl lockd grace lp parport sunrpc ip_tables x_tables autofs4 zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) zcommon(POE) znvpair(POE) spl(OE) raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq
[   58.361500] kernel:  libcrc32c raid0 multipath linear hid_magicmouse hid_logitech_hidpp raid1 hid_logitech_dj mlx4_ib hid_generic ib_uverbs mlx4_en ib_core uas usbhid hid usb_storage amdgpu mxm_wmi iommu_v2 gpu_sched i2c_algo_bit drm_ttm_helper ttm drm_dp_helper cec rc_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops nvme i2c_i801 e1000e drm nvme_core i2c_smbus mlx4_core mpt3sas crct10dif_pclmul ahci crc32_pclmul ghash_clmulni_intel aesni_intel xhci_pci crypto_simd raid_class cryptd scsi_transport_sas libahci xhci_pci_renesas wmi video
[   58.361545] kernel: CR2: 0000000000000000
[   58.361547] kernel: ---[ end trace 0000000000000000 ]---
[   58.474004] kernel: RIP: 0010:0x0
[   58.474017] kernel: Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[   58.474018] kernel: RSP: 0000:ffffb1954ed23cf0 EFLAGS: 00010246
[   58.474022] kernel: RAX: 0000000000000000 RBX: ffffb1954ed23de0 RCX: 00000000624a6e18
[   58.474024] kernel: RDX: 0000000000000000 RSI: ffffed87054f76c0 RDI: ffff9f5817f0ea40
[   58.474026] kernel: RBP: ffffb1954ed23d00 R08: ffff9f62fed80000 R09: ffffed87054f76f4
[   58.474028] kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffffed87054f76c0
[   58.474029] kernel: R13: ffff9f5817f0ea40 R14: 0000000000000200 R15: 00000001593fe067
[   58.474031] kernel: FS:  00007f943bfae740(0000) GS:ffff9f62fed80000(0000) knlGS:0000000000000000
[   58.474033] kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   58.474035] kernel: CR2: ffffffffffffffd6 CR3: 000000015699c006 CR4: 00000000003706e0

Another issue on 5.18-rc1:

Apr  4 00:06:24 mbp113 kernel: [    5.902647] BUG: kernel NULL pointer dereference, address: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902652] #PF: supervisor instruction fetch in kernel mode
Apr  4 00:06:24 mbp113 kernel: [    5.902654] #PF: error_code(0x0010) - not-present page
Apr  4 00:06:24 mbp113 kernel: [    5.902656] PGD 0 P4D 0 
Apr  4 00:06:24 mbp113 kernel: [    5.902659] Oops: 0010 [#1] PREEMPT SMP NOPTI
Apr  4 00:06:24 mbp113 kernel: [    5.902662] CPU: 2 PID: 854 Comm: systemd-journal Tainted: P           OE     5.18.0-051800rc1-generic #202204032230
Apr  4 00:06:24 mbp113 kernel: [    5.902664] Hardware name: Apple Inc. MacBookPro11,3/Mac-2BD1B31983FE1663, BIOS 432.60.3.0.0 10/27/2021
Apr  4 00:06:24 mbp113 kernel: [    5.902665] RIP: 0010:0x0
Apr  4 00:06:24 mbp113 kernel: [    5.902669] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
Apr  4 00:06:24 mbp113 kernel: [    5.902670] RSP: 0000:ffffbae64abd7cf0 EFLAGS: 00010246
Apr  4 00:06:24 mbp113 kernel: [    5.902671] RAX: 0000000000000000 RBX: ffffbae64abd7de0 RCX: 00000000a686ae50
Apr  4 00:06:24 mbp113 kernel: [    5.902673] RDX: 0000000000000000 RSI: fffffbf9c4d7ee80 RDI: ffff9c4287bbb4a0
Apr  4 00:06:24 mbp113 kernel: [    5.902674] RBP: ffffbae64abd7d00 R08: 0000000000000000 R09: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902675] R10: 0000000000000000 R11: ffff9c4287bb1868 R12: fffffbf9c4d7ee80
Apr  4 00:06:24 mbp113 kernel: [    5.902676] R13: ffff9c4287bbb4a0 R14: 0000000000000200 R15: 00000001344e9067
Apr  4 00:06:24 mbp113 kernel: [    5.902677] FS:  00007f3366c07900(0000) GS:ffff9c45ef280000(0000) knlGS:0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902679] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr  4 00:06:24 mbp113 kernel: [    5.902681] CR2: ffffffffffffffd6 CR3: 00000001011d2005 CR4: 00000000001706e0
Apr  4 00:06:24 mbp113 kernel: [    5.902682] Call Trace:
Apr  4 00:06:24 mbp113 kernel: [    5.902684]  <TASK>
Apr  4 00:06:24 mbp113 kernel: [    5.902685]  folio_mark_dirty+0x36/0x60
Apr  4 00:06:24 mbp113 kernel: [    5.902690]  filemap_page_mkwrite+0x130/0x1c0
Apr  4 00:06:24 mbp113 kernel: [    5.902694]  do_page_mkwrite+0x57/0xb0
Apr  4 00:06:24 mbp113 kernel: [    5.902698]  do_wp_page+0x275/0x310
Apr  4 00:06:24 mbp113 kernel: [    5.902700]  handle_pte_fault+0x20b/0x230
Apr  4 00:06:24 mbp113 kernel: [    5.902702]  __handle_mm_fault+0x3cb/0x700
Apr  4 00:06:24 mbp113 kernel: [    5.902704]  handle_mm_fault+0xba/0x290
Apr  4 00:06:24 mbp113 kernel: [    5.902706]  do_user_addr_fault+0x1be/0x670
Apr  4 00:06:24 mbp113 kernel: [    5.902709]  ? do_syscall_64+0x69/0x80
Apr  4 00:06:24 mbp113 kernel: [    5.902714]  exc_page_fault+0x76/0x170
Apr  4 00:06:24 mbp113 kernel: [    5.902716]  ? asm_exc_page_fault+0x8/0x30
Apr  4 00:06:24 mbp113 kernel: [    5.902720]  asm_exc_page_fault+0x1e/0x30
Apr  4 00:06:24 mbp113 kernel: [    5.902722] RIP: 0033:0x7f33679a5eb0
Apr  4 00:06:24 mbp113 kernel: [    5.902724] Code: c0 00 00 00 48 8b 80 c0 00 00 00 48 0b 83 c8 00 00 00 74 26 48 8d 3d 9f 0e 0d 00 e8 7a a3 e7 ff f3 0f 6f 80 c0 00 00 00 31 c0 <0f> 11 45 00 5b 5d 41 5c c3 0f 1f 80 00 00 00 00 48 8d 3d 7f 07 07
Apr  4 00:06:24 mbp113 kernel: [    5.902725] RSP: 002b:00007ffd45b15010 EFLAGS: 00010246
Apr  4 00:06:24 mbp113 kernel: [    5.902727] RAX: 0000000000000000 RBX: 00007f3366c07828 RCX: fffffffffffff000
Apr  4 00:06:24 mbp113 kernel: [    5.902728] RDX: 00007f3366c08320 RSI: a3d70a3d70a3d70b RDI: 00007f3367a76d40
Apr  4 00:06:24 mbp113 kernel: [    5.902729] RBP: 00007f3365be6028 R08: 0000000000000000 R09: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902730] R10: 00007ffd45b73080 R11: 0000000000000246 R12: 00007f3366c078e8
Apr  4 00:06:24 mbp113 kernel: [    5.902731] R13: 00000000ffffffff R14: 0000555ca88bdf90 R15: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902733]  </TASK>
Apr  4 00:06:24 mbp113 kernel: [    5.902734] Modules linked in: sch_fq_codel coretemp ipmi_devintf ipmi_msghandler msr parport_pc ppdev lp parport ip_tables x_tables autofs4 zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) zcommon(POE) znvpair(POE) spl(OE) z3fold lz4 lz4_compress ax88179_178a hid_apple usbnet uas hid_generic usbhid usb_storage hid mii i915 nouveau mxm_wmi wmi drm_buddy i2c_algo_bit drm_ttm_helper ttm drm_dp_helper cec rc_core drm_kms_helper syscopyarea sysfillrect spi_intel_platform crct10dif_pclmul crc32_pclmul sysimgblt ghash_clmulni_intel spi_intel aesni_intel crypto_simd cryptd fb_sys_fops nvme drm nvme_core i2c_i801 thunderbolt i2c_smbus lpc_ich xhci_pci xhci_pci_renesas video
Apr  4 00:06:24 mbp113 kernel: [    5.902768] CR2: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902769] ---[ end trace 0000000000000000 ]---
Apr  4 00:06:24 mbp113 kernel: [    5.902771] RIP: 0010:0x0
Apr  4 00:06:24 mbp113 kernel: [    5.902772] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
Apr  4 00:06:24 mbp113 kernel: [    5.902773] RSP: 0000:ffffbae64abd7cf0 EFLAGS: 00010246
Apr  4 00:06:24 mbp113 kernel: [    5.902774] RAX: 0000000000000000 RBX: ffffbae64abd7de0 RCX: 00000000a686ae50
Apr  4 00:06:24 mbp113 kernel: [    5.902776] RDX: 0000000000000000 RSI: fffffbf9c4d7ee80 RDI: ffff9c4287bbb4a0
Apr  4 00:06:24 mbp113 kernel: [    5.902777] RBP: ffffbae64abd7d00 R08: 0000000000000000 R09: 0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902777] R10: 0000000000000000 R11: ffff9c4287bb1868 R12: fffffbf9c4d7ee80
Apr  4 00:06:24 mbp113 kernel: [    5.902778] R13: ffff9c4287bbb4a0 R14: 0000000000000200 R15: 00000001344e9067
Apr  4 00:06:24 mbp113 kernel: [    5.902780] FS:  00007f3366c07900(0000) GS:ffff9c45ef280000(0000) knlGS:0000000000000000
Apr  4 00:06:24 mbp113 kernel: [    5.902781] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr  4 00:06:24 mbp113 kernel: [    5.902782] CR2: ffffffffffffffd6 CR3: 00000001011d2005 CR4: 00000000001706e0
@satmandu satmandu added the Type: Defect Incorrect behavior (e.g. crash, hang) label Apr 12, 2022
@satmandu satmandu changed the title 5.18: __set_page_dirty_nobuffers -> filemap_dirty_folio 5.18-rc1/rc2 change causes system instability with zfs installed, due to __set_page_dirty_nobuffers -> filemap_dirty_folio change? Apr 12, 2022
@satmandu satmandu changed the title 5.18-rc1/rc2 change causes system instability with zfs installed, due to __set_page_dirty_nobuffers -> filemap_dirty_folio change? 5.18-rc1/rc2 change requires __set_page_dirty_nobuffers -> filemap_dirty_folio change Apr 25, 2022
@satmandu
Copy link
Contributor Author

satmandu commented Apr 25, 2022

Current dmesg when running 5.18-rc4, using other updated 5.18 patches from the 2.1.5-staging tree.
dmesg.5.18-rc4.txt

@satmandu satmandu changed the title 5.18-rc1/rc2 change requires __set_page_dirty_nobuffers -> filemap_dirty_folio change 5.18 requires __set_page_dirty_nobuffers -> filemap_dirty_folio change Apr 25, 2022
@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Apr 25, 2022
satmandu added a commit to satmandu/zfs that referenced this issue Apr 26, 2022
…irty_folio

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
satmandu added a commit to satmandu/zfs that referenced this issue Apr 26, 2022
…irty_folio

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Signed-off by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
satmandu added a commit to satmandu/zfs that referenced this issue Apr 26, 2022
…irty_folio

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
satmandu added a commit to satmandu/zfs that referenced this issue Apr 26, 2022
…irty_folio

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
satmandu added a commit to satmandu/zfs that referenced this issue Apr 27, 2022
…irty_folio

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
satmandu added a commit to satmandu/zfs that referenced this issue Apr 27, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio
Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")
Authored by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes: openzfs#13325
behlendorf pushed a commit that referenced this issue Apr 27, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes #13325
Closes #13380
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Apr 27, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
behlendorf added a commit that referenced this issue Apr 28, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes #13325
Closes #13380
sdimitro pushed a commit to sdimitro/zfs that referenced this issue May 23, 2022
* Improve the inline descriptions of the ARC module parameters

These are displayed as the descriptions of the sysctl's on FreeBSD

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Allan Jude <[email protected]>
Closes openzfs#13334

* linux: module: weld all but spl.ko into zfs.ko

Originally it was thought it would be useful to split up the kmods
by functionality.  This would allow external consumers to only load
what was needed.  However, in practice we've never had a case where
this functionality would be needed, and conversely managing multiple
kmods can be awkward.  Therefore, this change merges all but the
spl.ko kmod in to a single zfs.ko kmod.

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274

* scripts: zfs.sh: remove cat

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274

* scripts: zfs.sh: make usage make sense

We don't pass the arguments as arguments

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274

* scripts: zfs.sh: unload zfs with dependencies

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274

* linux: module: uninstall legacy modules on (un)installation

This can be reverted once we're sure nobody's using them anymore
(post-3.0 release?)

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274

* zpool_history_unpack: return correct errno on nvlist_unpack failure

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Damian Szuberski <[email protected]>
Signed-off-by: WHR <[email protected]>
Closes openzfs#13321

* Document zfs inherit -S's interaction with noninheritable properties

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Damian Szuberski <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#11894
Closes openzfs#13335

* rpm -> deb doesn't fail when optional packages are missing

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#13331
Closes openzfs#13336

* man: ... -> … again

zfs-program.8 is left, but that's literal Lua syntax

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13255

* FreeBSD: Fix translation from ABD to physical pages

In hypothetical case of non-linear ABD with single segment, multiple
to page size but not aligned to it, vdev_geom_fill_unmap_cb() could
fill one page less into bio_ma array.

I am not sure it is exploitable, but better to be safe than sorry.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Mark Johnston <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes openzfs#13345

* Corrected oversight in ZERO_RANGE behavior

It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do
have differing semantics in some ways - in particular,
one requires KEEP_SIZE, and the other does not.

Also added a zero-range test to catch this, corrected a flaw
that made the punch-hole test succeed vacuously, and a typo
in file_write.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes openzfs#13329 
Closes openzfs#13338

* contrib: dracut: parse-zfs: drop initqueue-finished for i/f

The switch was released in dracut 009 in March 2011,
we can safely get rid of the compatibility hook

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: parse-zfs: stop pretending we support FILESYSTEM=

It was added in the original ae26d04 ("Add dracut support") commit
in 2011, and was then broken a bit later with the advent of
dracut-zfs-generator, or maybe earlier as part of other churn

Either way, it's broken, and has been in 2.0+ as well, and no-one
complained. Stop pretending we support it at all

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib; dracut: centralise root= parsing, actually support root=s

So far, everything parsed root= manually, which meant that while
zfs-parse.sh was updated, and supposedly supported + -> ' ' conversion,
it meant nothing

Instead, centralise parsing, and allow:
  root=
  root=zfs
  root=zfs:
  root=zfs:AUTO

  root=ZFS=data/set
  root=zfs:data/set
  root=zfs:ZFS=data/set (as a side-effect; allowed but undocumented)

  rootfstype=zfs AND root=data/set <=> root=data/set
  rootfstype=zfs AND root=         <=> root=zfs:AUTO

So rootfstype=zfs /also/ behaves as expected, and + decoding works

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib; dracut: flatten zfs-load-key, simplify zfs-env-bootfs

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: zfs-lib: simplify ask_for_password

The only user is mount-zfs.sh (non-systemd systems),
so reduce it to what it needs

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: zfs-lib: remove find_bootfs

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: inline single-use import_pool, move single-use ask_for_password

Also don't set ROOTFS_MOUNTED; the final mention was removed in dracut
011 from July 2011

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: don't require essentials to be under the same encroot

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: zfs-{rollback,snapshot}-bootfs: order after key loading

This fixes at least one race I got with an encrypted root

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: zfs-needshutdown: don't list

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* Add dracut.zfs.7

Thorough documentation with a dracut.bootup(7)-style flowchart,
dracut.cmdline(7)-style cmdline listing,
and per-file docs like the old README

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* contrib: dracut: remove getargbool polyfill

It was originally released in dracut 008 in February 2011;
we can probably drop it now

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13291

* Strengthen Linux kernel capabilities detection

- Add `CONFIG_BLOCK` Linux config requirement to
  `ZFS_AC_KERNEL_CONFIG_DEFINED`. OpenZFS won't compile without
  that block device support due to large amount of functional
  dependencies on it.

- Remove dependency on `groups_alloc()` in
  `ZFS_AC_KERNEL_SRC_GROUP_INFO_GID` to circumvent the missing stub
  in Linux 4.X kernel headers.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#13351

* scripts: zfs.sh: explicitly ignore unloaded modules when unloading

Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13356

* scripts: zfs.sh: explicitly unload all modules via rmmod

modprobe -r only works for depmodded modules, but this also means we
have to re-iterate legacy modules, and in the right order

Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13356

* linux: module: zfs: sysfs: constify types and attrs

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13357

* Linux 5.18 compat: kobj_type.default_attrs replaced with default_groups

Upstream-commit: cdb4f26a63c391317e335e6e683a614358e70aeb ("kobject:
 kobj_type: remove default_attrs")
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13357

* zvol_wait: Ignore locked zvols

"When an encrypted zvol is locked the zfs-volume-wait service does not
start.  The /sbin/zvol_wait should not wait for links when the volume
has property keystatus=unavailable."
-- https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1888405

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Damian Szuberski <[email protected]>
Thanks: James Dingwall <[email protected]>
Signed-off-by: Richard Laager <[email protected]>
Closes openzfs#10662

* man: zfs-send.8: fix -X synopses and description

Also clean up the horrendously verbose -X handling in zfs_main()

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13352

* tests: cli_user: zfs_001_neg: print the problematic lines

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13352

* Improve zpool status output, list all affected datasets

Currently, determining which datasets are affected by corruption is
a manual process.

The primary difficulty in reporting the list of affected snapshots is
that since the error was initially found, the snapshot where the error
originally occurred in, may have been deleted. To solve this issue, we
add the ID of the head dataset of the original snapshot which the error
was detected in, to the stored error report. Then any time a filesystem
is deleted, the errors associated with it are deleted as well. Any time
a clone promote occurs, we modify reports associated with the original
head to refer to the new head. The stored error reports are identified
by this head ID, the birth time of the block which the error occurred
in, as well as some information about the error itself are also stored.

Once this information is stored, we can find the set of datasets
affected by an error by walking back the list of snapshots in the given
head until we find one with the appropriate birth txg, and then traverse
through the snapshots of the clone family, terminating a branch if the
block was replaced in a given snapshot. Then we report this information
back to libzfs, and to the zpool status command, where it is displayed
as follows:

 pool: test
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
  scan: scrub repaired 0B in 00:00:00 with 800 errors on Fri Dec  3
08:27:57 2021
config:

        NAME        STATE     READ WRITE CKSUM
        test        ONLINE       0     0     0
          sdb       ONLINE       0     0 1.58K

errors: Permanent errors have been detected in the following files:

        test@1:/test.0.0
        /test/test.0.0
        /test/1clone/test.0.0

A new feature flag is introduced to mark the presence of this change, as
well as promotion and backwards compatibility logic. This is an updated
version of openzfs#9175. Rebase required fixing the tests, updating the ABI of
libzfs, updating the man pages, fixing bugs, fixing the error returns,
and updating the old on-disk error logs to the new format when
activating the feature.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Co-authored-by: TulsiJain <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes openzfs#9175
Closes openzfs#12812

* Improve log spacemap load time

Previous flushing algorithm limited only total number of log blocks to
the minimum of 256K and 4x number of metaslabs in the pool.  As result,
system with 1500 disks with 1000 metaslabs each, touching several new
metaslabs each TXG could grow spacemap log to huge size without much
benefits.  We've observed one of such systems importing pool for about
45 minutes.

This patch improves the situation from five sides:
 - By limiting maximum period for each metaslab to be flushed to 1000
TXGs, that effectively limits maximum number of per-TXG spacemap logs
to load to the same number.
 - By making flushing more smooth via accounting number of metaslabs
that were touched after the last flush and actually need another flush,
not just ms_unflushed_txg bump.
 - By applying zfs_unflushed_log_block_pct to the number of metaslabs
that were touched after the last flush, not all metaslabs in the pool.
 - By aggressively prefetching per-TXG spacemap logs up to 16 TXGs in
advance, making log spacemap load process for wide HDD pool CPU-bound,
accelerating it by many times.
 - By reducing zfs_unflushed_log_block_max from 256K to 128K, reducing
single-threaded by nature log processing time from ~10 to ~5 minutes.

As further optimization we could skip bumping ms_unflushed_txg for
metaslabs not touched since the last flush, but that would be an
incompatible change, requiring new pool feature.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes openzfs#12789

* autoconf: Pretend `CONFIG_MODULES` is always on

- Unconditionally inject `CONFIG_MODULES` make variable
  and `#define CONFIG_MODULES` to Kbuild in `ZFS_LINUX_COMPILE`
  autoconf function to emulate loadable kernel modules support.
  This allows OpenZFS to perform Linux checks despite
  `CONFIG_MODULES=n` in the actual Linux config.

- Add `ZFS_AC_KERNEL_CONFIG_MODULES` check which encompasses
  the logic from `ZFS_AC_KERNEL_TEST_MODULE` with additional
  diagnostic messages to the user

- Removed `ZFS_AC_KERNEL_TEST_MODULE` as it merely duplicates
  every check in `ZFS_AC_KERNEL_CONFIG_DEFINED`

- Moved `ZFS_AC_MODULE_SYMVERS` after `ZFS_AC_KERNEL_CONFIG_DEFINED`
  so the user has a chance to see the proper diagnostic from the
  steps before.

A workaround for Linux's

```
commit 3e3005df73b535cb849cf4ec8075d6aa3c460f68
Author: Masahiro Yamada <[email protected]>
Date:   Wed Mar 31 22:38:03 2021 +0900

kbuild: unify modules(_install) for in-tree and external modules

If you attempt to build or install modules ('make modules(_install)'
with CONFIG_MODULES disabled, you will get a clear error message, but
nothing for external module builds.

Factor out the modules and modules_install rules into the common part,
so you will get the same error message when you try to build external
modules with CONFIG_MODULES=n.

Signed-off-by: Masahiro Yamada <[email protected]>
```

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#10832
Closes openzfs#13361

* PPC get_user workaround

Linux 5.12 PPC 5.12 get_user() and __copy_from_user_inatomic()
inline helpers very indirectly include a reference to the GPL'd
array mmu_feature_keys[] and fails to build. Workaround this by
using copy_from_user() and throwing EFAULT for any calls to
__copy_from_user_inatomic(). This is a workaround until a fix
for Linux commit 7613f5a66becfd0e43a0f34de8518695888f5458
"powerpc/64s/kuap: Use mmu_has_feature()" is fully addressed.

Reviewed-by: Brian Behlendorf <[email protected]>
Authored-by: Colin Ian King <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes openzfs#11958
Closes openzfs#12590
Closes openzfs#13367

* zfs: holds: general cleanup

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13373

* zfs: holds: dequadratify

Before:
  15  0m0.177s
  30  0m0.653s
  45  0m1.289s
  60  0m2.129s
  75  0m3.264s
  90  0m4.397s
  100 0m5.996s
  117 0m8.552s

After:
  30  0m0.053s
  117 0m0.125s

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13372
Closes openzfs#13373

* Linux 5.18 compat: replace __set_page_dirty_nobuffers

Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380

* Fix O_APPEND for Linux 3.15 and older kernels

When using a Linux kernel which predates the iov_iter interface the
O_APPEND flag should be applied in zpl_aio_write() via the call to
generic_write_checks().  The updated pos variable  was incorrectly
ignored resulting in the current offset being used.

This issue should only realistically impact the RHEL/CentOS 7.x
kernels which are based on Linux 3.10.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#13370 
Closes openzfs#13377

Co-authored-by: Allan Jude <[email protected]>
Co-authored-by: наб <[email protected]>
Co-authored-by: Low-power <[email protected]>
Co-authored-by: Damian Szuberski <[email protected]>
Co-authored-by: Alexander Motin <[email protected]>
Co-authored-by: Rich Ercolani <[email protected]>
Co-authored-by: Richard Laager <[email protected]>
Co-authored-by: George Amanakis <[email protected]>
Co-authored-by: Satadru Pramanik <[email protected]>
Co-authored-by: Brian Behlendorf <[email protected]>
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Sep 6, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
beren12 pushed a commit to beren12/zfs that referenced this issue Sep 19, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
Replace __set_page_dirty_nobuffers with filemap_dirty_folio.

Upstream-commit: 6b1f86f8e9c7f9de7ca1cb987b2cf25e99b1ae3a
("Merge tag 'folio-5.18b' of
git://git.infradead.org/users/willy/pagecache ")

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Authored-by: Satadru Pramanik <[email protected]>
Signed-off-by: Satadru Pramanik <[email protected]>
Closes openzfs#13325
Closes openzfs#13380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants