Inquiry about NFS Patch "NFS: Don't call generic_error_remove_page() while holding locks"
Subsystems (2)
Dear Developers,
I hope this message finds you well. I've recently been examining an NFS patch (linux-stable-v4.19.298 commit ID: fecb9d534dee) that I find intriguing, and I was hoping to gain some clarity on a few of its details.
The commit message states, "The NFS read code can trigger writeback while holding the page lock. If an error then triggers a call to nfs_write_error_remove_page(), we can deadlock." In the context as I understand it, I'm having trouble conceptualizing the specific scenario where this could lead to a deadlock.
I've scrutinized the relevant functions and code, including nfs_readpage and generic_error_remove_page(), but I can't seem to pinpoint the exact scenario where lock contention could lead to a deadlock.
I would greatly appreciate if you could help me understand this issue and how this patch addresses it. What were the specific workloads or system states you encountered in this process? Was this problem discovered under specific hardware or configurations? Or does the problem trigger under a certain sequence of operations?
Thank you for your assistance in advance, and I look forward to your response.
Best regards,
ZhaoLong Wang