Re: [PATCH v2 2/2] btrfs: relocation: review the call sites which can be interruped by signal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 09, 2020 at 06:15:09PM +0800, Qu Wenruo wrote:
> On 2020/7/9 下午5:54, David Sterba wrote:
> > On Thu, Jul 09, 2020 at 04:33:33PM +0800, Qu Wenruo wrote:
> >> @@ -4135,7 +4135,7 @@ int btrfs_balance(struct btrfs_fs_info *fs_info,
> >>  	mutex_lock(&fs_info->balance_mutex);
> >>  	if (ret == -ECANCELED && atomic_read(&fs_info->balance_pause_req))
> >>  		btrfs_info(fs_info, "balance: paused");
> >> -	else if (ret == -ECANCELED && atomic_read(&fs_info->balance_cancel_req))
> >> +	else if (ret == -ECANCELED  || ret == -EINTR)
> > 
> > Why do you remove atomic_read(&fs_info->balance_cancel_req) ?
> 
> Because now btrfs_should_cancel_balance() can return ECANCELED without
> balance_cancel_req increased due to pending fatal signal.

Ah right, I misread it as || which would remove one reason for
cancellation.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux