Re: [RESEND PATCH] dm-ebs: Mark full buffer dirty even on partial write

Christoph Hellwig
2025-11-24T14:30:48Z

On Fri, Nov 21, 2025 at 02:21:34PM +0100, Uladzislau Rezki wrote:
> - offset &= -DM_BUFIO_WRITE_ALIGN;
> - end += DM_BUFIO_WRITE_ALIGN - 1;
> - end &= -DM_BUFIO_WRITE_ALIGN;
> + align = max(DM_BUFIO_WRITE_ALIGN, bdev_logical_block_size(b->c->bdev));
> + offset &= -align;
> + end += align - 1;
> + end &= -align;
> if (unlikely(end > b->c->block_size))
> end = b->c->block_size;
> <snip>
>
> and it fixes the setup which i described in the commit message, but i
> have question.

And this patch, using bdev_logical_block_size looks correct.

>
> Why in dm-ebs we need to offload partial buffer < ubf size?

I don't understand this question. What is ubf? What does partial
buffer mean in this context, and what does offload mean?