> > > > > + * remove it from the pending extent list, so later when the > > > add > > > + * response for the extent arrives, the device can reject the > > > + * extent as it is not in the pending list. > > > + */ > > > + ent = cxl_dc_extent_exists(&dcd->dc.extents_pending_to_add, > > > + &extents[i]); > > > + if (ent) { > > > + QTAILQ_REMOVE(&dcd->dc.extents_pending_to_add, ent, > > > node); > > > + g_free(ent); > > > + skip_extent = true; > > > + } else if (!cxl_dc_extent_exists(&dcd->dc.extents, > > > &extents[i])) { > > > + /* If the exact extent is not in the accepted list, skip > > > */ > > > + skip_extent = true; > > > + } > > I think we need to reject case of some extents skipped and others not. > > That's not supported yet so we need to complain if we get it at least. > > Maybe we need > > to do two passes so we know this has happened early (or perhaps this is a > > later > > patch in which case a todo here would help). > > If the second skip_extent case, I will reject earlier instead of > skipping. That was me misunderstanding the flow. I think this is fine as you have it already.
Jonathan