libceph: define struct ceph_sparse_extent and add some helpers
authorJeff Layton <jlayton@kernel.org>
Wed, 16 Mar 2022 19:23:00 +0000 (15:23 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 22 Aug 2023 07:01:47 +0000 (09:01 +0200)
commita679e50f728648f7b2f3b349e082448abd388038
treefeb342e8c57d332a4d417d3c62d3c7e85308c12b
parent08b8a0440eeec83f8330349f829908858fd52d31
libceph: define struct ceph_sparse_extent and add some helpers

When the OSD sends back a sparse read reply, it contains an array of
these structures. Define the structure and add a couple of helpers for
dealing with them.

Also add a place in struct ceph_osd_req_op to store the extent buffer,
and code to free it if it's populated when the req is torn down.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/osd_client.h
net/ceph/osd_client.c