Re: [PATCH] btrfs-progs: handle balance and replace concurrency

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

 



On Wed, Dec 19, 2018 at 12:01:44AM +0800, Anand Jain wrote:
> Test case:
> Run replace
>  btrfs repl start -B -f /dev/sdd /dev/sdb /btrfs;
> while replace is still running, from another terminal try to start
> balance
>  btrfs bal start  --full-balance /btrfs; echo ...:$?
>  Done, had to relocate 0 out of 0 chunks
>  ...:0
> 
> which fails to report that balance failed to relocate because another
> exclusive operation is running.
> In fact kernel ioctl BTRFS_IOC_BALANCE(_V2) does return error code 8,
> but progs recast it to 0. Fix it by checking for the error code > 0.
> 
> After:
>  btrfs bal start --full-balance /btrfs; echo ...:$?
>  ERROR: balance: add/delete/balance/replace/resize operation in progress
>  ...:8
> 
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>

Applied, thanks.



[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