Re: Why does rangelock_enqueue() hang for hours?

From: Bakul Shah <bakul_at_iitbombay.org>
Date: Thu, 23 Oct 2025 18:29:18 UTC
On Oct 22, 2025, at 8:52 AM, Rick Macklem <rick.macklem@gmail.com> wrote:
> 
> Peter, you could try the attached trivial patch (untested).
> 
> I'm not sure if this is a reasonable thing to do, but at least you can report
> back to let us know if it fixes your problem?

One thing I had suggested was to use multiple copy_file_range() calls,
say 4MB each in cp or cat as neither provide any atomic guarantees --
normally they would repeat read && write until done. At the very least
this kicks the can down the road!

This way reads would be blocked only when they catch up with writes.