Re: [PATCH 1/3] btrfs-progs: Fix infinite loop of btrfs-image

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

 



On Wed, Sep 09, 2015 at 09:32:21PM +0800, Zhao Lei wrote:
> Bug:
>  # btrfs-image -t0 -c9 /dev/sda6 /tmp/btrfs_image.img
>  (hang)
>  # btrfs-image -r -t0 /tmp/btrfs_image.img /dev/sda6
>  (hang)
> 
> Reason:
>  Program need to create at least 1 thread for compress/decompress.
>  but if user specify -t0 in argument, it overwrite the default value
>  of 1, then the program really created 0 thread, and caused above
>  error.
> 
> Fix:
>  We can add a check, to make program not allow -t0 argument,
>  but there are still exist another problem.
>  for ex, in node with 4 cpus:
>  btrfs-image -c9 -t1: 4 threads (1 means use nr_cpus)
>              -c9 -t2: 2 threads
>              -c9 -t3: 3 threads
>              ...
>  (-t1 have more threads than -t2 and -t3)
> 
>  So we change to use value of 0 as "use nr_cpus threads", then:
>  btrfs-image [no -t arg]: use nr_cpus threads
>              -t0:         use nr_cpus threads
>              -t val:      use val threads.
> 
> Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>

All 3 patches applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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