public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] btrfs: fix race between balance and cancel/pause
       [not found] <9cdf58c2f045863e98a52d7f9d5102ba12b87f07.1687496547.git.josef@toxicpanda.com>
@ 2023-08-08  2:47 ` xiaoshoukui
  2023-08-09 13:16   ` Josef Bacik
  0 siblings, 1 reply; 3+ messages in thread
From: xiaoshoukui @ 2023-08-08  2:47 UTC (permalink / raw)
  To: josef, dsterba; +Cc: clm, dsterba, linux-btrfs, linux-kernel, xiaoshoukui

I think this patch does not fully fix the issue.

This patch just fix assertion panic, but in the race situation, the ioctl pause 
request still returns an incorrect value 0 to the user which mislead the user the
pause request finished successfully. In fact, the balance request has not been paused.

Test results and analysis are as follows:
https://lore.kernel.org/linux-btrfs/20230726030617.109018-1-xiaoshoukui@gmail.com/T/#me125d17fa59e9e671149cc76d410ced747f488b1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: fix race between balance and cancel/pause
  2023-08-08  2:47 ` [PATCH] btrfs: fix race between balance and cancel/pause xiaoshoukui
@ 2023-08-09 13:16   ` Josef Bacik
  2023-08-10  5:45     ` xiaoshoukui
  0 siblings, 1 reply; 3+ messages in thread
From: Josef Bacik @ 2023-08-09 13:16 UTC (permalink / raw)
  To: xiaoshoukui; +Cc: dsterba, clm, dsterba, linux-btrfs, linux-kernel, xiaoshoukui

On Mon, Aug 07, 2023 at 10:47:48PM -0400, xiaoshoukui wrote:
> I think this patch does not fully fix the issue.
> 
> This patch just fix assertion panic, but in the race situation, the ioctl pause 
> request still returns an incorrect value 0 to the user which mislead the user the
> pause request finished successfully. In fact, the balance request has not been paused.
> 
> Test results and analysis are as follows:
> https://lore.kernel.org/linux-btrfs/20230726030617.109018-1-xiaoshoukui@gmail.com/T/#me125d17fa59e9e671149cc76d410ced747f488b1

They're just two different issues.  My patch is concerned with the panic, yours
is concerned with getting the correct return value out to the user.

Rebase your patch ontop of Sterba's tree with my fix and send it along, getting
an accurate errno out to the user is a reasonable goal.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: fix race between balance and cancel/pause
  2023-08-09 13:16   ` Josef Bacik
@ 2023-08-10  5:45     ` xiaoshoukui
  0 siblings, 0 replies; 3+ messages in thread
From: xiaoshoukui @ 2023-08-10  5:45 UTC (permalink / raw)
  To: josef
  Cc: clm, dsterba, dsterba, linux-btrfs, linux-kernel, xiaoshoukui,
	xiaoshoukui

> They're just two different issues.  My patch is concerned with the panic, yours
> is concerned with getting the correct return value out to the user.

Agreed.

> Rebase your patch ontop of Sterba's tree with my fix and send it along, getting
> an accurate errno out to the user is a reasonable goal.  Thanks,

Send the patch through below thread, pls review. Thanks.
https://lore.kernel.org/linux-btrfs/20230810034810.23934-1-xiaoshoukui@gmail.com/T/#u

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-10  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <9cdf58c2f045863e98a52d7f9d5102ba12b87f07.1687496547.git.josef@toxicpanda.com>
2023-08-08  2:47 ` [PATCH] btrfs: fix race between balance and cancel/pause xiaoshoukui
2023-08-09 13:16   ` Josef Bacik
2023-08-10  5:45     ` xiaoshoukui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox