Transforming a bufferlist iterator into new bufferlist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a bufferlist use case that I can't quite resolve. I'm packing
up a struct and a blob, but not sure how to seek to the beginning of
the blob correctly during decode:

1. Setup bufferlist

  /* add header */
  struct header hdr;
  ::encode(hdr, bl);

  /* add payload blob */
  bl.append(buf, len);

2. Later in decode ...

  /* get header */
  bufferlist::iterator it = in.begin();
  ::decode(hdr, it);

  **problem: Want to get a bufferlist for the payload, which is
presumably exactly where the iterator now points. How should that
transformation happen with zero-copy?

Thanks,
Noah
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux