RE: [PATCH V5 for-6.11/block] loop: Fix a race between loop detach and loop open
From: Gulam Mohamed
Date: Tue Jun 18 2024 - 12:10:01 EST
Hi Christoph,
> -----Original Message-----
> From: Christoph Hellwig <hch@xxxxxx>
> Sent: Saturday, June 15, 2024 10:15 AM
> To: Gulam Mohamed <gulam.mohamed@xxxxxxxxxx>
> Cc: linux-block@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> yukuai1@xxxxxxxxxxxxxxx; hch@xxxxxx; axboe@xxxxxxxxx
> Subject: Re: [PATCH V5 for-6.11/block] loop: Fix a race between loop detach
> and loop open
>
> Umm, so this is back to not just doing autoclear all the time?
>
> What I suggested was to go to my RFC patch that still does the unconditional
> autclear, but which sets rundown when there was just a single opener.
Actually we thought that there could be a race between openers due to which disk_openers could be more than 1 and due to which the Lo_rundown cannot be set. Hence LTP test could fail. But if I understand correctly, I think the LTP test is meant to run separately without any other processes opening the loop device. I will send the next version with the change which sets rundown when there is just a single opener.