Hi,
On 2026-05-13 16:39:30-04:00, Peter Xu wrote:
> On Mon, May 04, 2026 at 04:30:18PM +0400, Marc-André Lureau wrote:
> > + range = g_new0(RamBlockAttributeRange, 1);
> > + range->start = start_offset;
> > + range->length = length;
> > + range->shared = is_shared;
> > +
> > + if (has_rdm) {
>
> Is this only for extra safety? My understanding is when reaching here,
> attr!=NULL, which means we have at least one disgard manager source, then
> the manager must be there. So I wonder if we could assert. But not a big
> deal. Maybe I overlooked that it is needed?
Correct, a RAM block attribute ensures the presence of a discard manager.
This should remain valid in the future, I'll use assert().