[dm-devel] [PATCH v2] dm log writes: make sure the log super sectors are written in order

Josef Bacik josef at toxicpanda.com
Thu Jun 13 14:42:25 UTC 2019


On Wed, Jun 05, 2019 at 09:27:08PM +0800, zhangyi (F) wrote:
> Currently, although we submit super bios in log-write thread orderly
> (the super.nr_entries is incremented by each logged entry), the
> submit_bio() cannot make sure that each super sector is written to log
> device in order. So the submitting bio of each super sector may be
> out-of-order, and then the final nr_entries maybe small than the real
> entries submitted.
> 
> This problem can be reproduced by the xfstests generic/455 with ext4,
> which may complained below after running the test:
> 
>   QA output created by 455
>  -Silence is golden
>  +mark 'end' does not exist
> 
> This patch serialize submitting super secotrs to make sure each super
> sectors are written to log disk in order, so that we can prevent the
> latest nr_entries be rewritten by some old super bios.
> 
> Signed-off-by: zhangyi (F) <yi.zhang at huawei.com>
> Suggested-by: Josef Bacik <josef at toxicpanda.com>
> ---
> Changes since v1:
>  - Switch to use completion instead of wait_queue to synchronize
>    submitting super bios.
> 

Reviewed-by: Josef Bacik <josef at toxicpanda.com>

Thanks,

Josef




More information about the dm-devel mailing list