Re: [RFC PATCH 22/35] libceph, rbd: Convert ceph_osdc_notify() reply to ceph_databuf

David Howells
2025-03-20T14:44:27Z

Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> wrote:

> > } else if (!completion_done(&lreq->notify_finish_wait)) {
> > - struct ceph_msg_data *data =
> > - msg->num_data_items ? &msg->data[0] : NULL;
> > -
> > - if (data) {
> > - if (lreq->preply_pages) {
> > - WARN_ON(data->type !=
> > - CEPH_MSG_DATA_PAGES);
> > - *lreq->preply_pages = data->pages;
> > - *lreq->preply_len = data->length;
> > - data->own_pages = false;
> > - }
> > + if (msg->num_data_items && lreq->reply) {
> > + struct ceph_msg_data *data = &msg->data[0];
>
> This low-level access slightly worry me. I don't see any real problem
> here. But, maybe, we need to hide this access into some iterator-like
> function? However, it could be not feasible for the scope of this patchset.

Yeah. This is something that precedes my changes and I think it needs fixing
apart from it.

David