On Mon, 3 Mar 2025, Bryn M. Reeves wrote:

> On Mon, Mar 03, 2025 at 11:24:27AM +0100, Mikulas Patocka wrote:
> > This is the dm-loop target - a replacement for the regular loop driver 
> > with better performance. The dm-loop target builds a map of the file in 
> > the constructor and it just remaps bios according to this map.
> > 
> > Signed-off-by: Mikulas Patocka <mpato...@redhat.com>
> 
> This looks like it is based on my dm-loop patch from almost 20 years
> ago.

Yes, it is. I copied some of the code from it.

> Afaik the locking problems that hch pointed out back then are still
> valid now - stashing the bmap lookup in memory lead to weird and hard to
> debug problems back then and I don't think this has changed.

The dm-loop driver does the same thing as swapfile activation - so I 
presume that if swapfile activation is correct, then dm-loop is also 
correct.

The S_SWAPFILE flag prevents the kernel from truncating, extending or 
deleting the file - it just returns "Text file busy".

Mikulas


Reply via email to