Lines Matching refs:snap_id
195 u64 snap_id; member
337 u64 snap_id; /* for reads */ member
520 return rbd_dev->spec->snap_id != CEPH_NOSNAP; in rbd_is_snap()
639 u64 snap_id);
640 static int _rbd_dev_v2_snap_size(struct rbd_device *rbd_dev, u64 snap_id,
1138 static u32 rbd_dev_snap_index(struct rbd_device *rbd_dev, u64 snap_id) in rbd_dev_snap_index() argument
1143 found = bsearch(&snap_id, &snapc->snaps, snapc->num_snaps, in rbd_dev_snap_index()
1144 sizeof (snap_id), snapid_compare_reverse); in rbd_dev_snap_index()
1150 u64 snap_id) in rbd_dev_v1_snap_name() argument
1155 which = rbd_dev_snap_index(rbd_dev, snap_id); in rbd_dev_v1_snap_name()
1163 static const char *rbd_snap_name(struct rbd_device *rbd_dev, u64 snap_id) in rbd_snap_name() argument
1165 if (snap_id == CEPH_NOSNAP) in rbd_snap_name()
1170 return rbd_dev_v1_snap_name(rbd_dev, snap_id); in rbd_snap_name()
1172 return rbd_dev_v2_snap_name(rbd_dev, snap_id); in rbd_snap_name()
1175 static int rbd_snap_size(struct rbd_device *rbd_dev, u64 snap_id, in rbd_snap_size() argument
1179 if (snap_id == CEPH_NOSNAP) { in rbd_snap_size()
1184 which = rbd_dev_snap_index(rbd_dev, snap_id); in rbd_snap_size()
1193 ret = _rbd_dev_v2_snap_size(rbd_dev, snap_id, NULL, &size); in rbd_snap_size()
1204 u64 snap_id = rbd_dev->spec->snap_id; in rbd_dev_mapping_set() local
1208 ret = rbd_snap_size(rbd_dev, snap_id, &size); in rbd_dev_mapping_set()
1395 osd_req->r_snapid = obj_request->img_request->snap_id; in rbd_osd_format_read()
1590 img_req->snap_id = rbd_dev->spec->snap_id; in rbd_img_capture_header()
1694 static void rbd_object_map_name(struct rbd_device *rbd_dev, u64 snap_id, in rbd_object_map_name() argument
1697 if (snap_id == CEPH_NOSNAP) in rbd_object_map_name()
1702 rbd_dev->spec->image_id, snap_id); in rbd_object_map_name()
1827 rbd_object_map_name(rbd_dev, rbd_dev->spec->snap_id, &oid); in __rbd_object_map_load()
2034 static int rbd_object_map_update(struct rbd_obj_request *obj_req, u64 snap_id, in rbd_object_map_update() argument
2044 if (snap_id == CEPH_NOSNAP) { in rbd_object_map_update()
2059 rbd_object_map_name(rbd_dev, snap_id, &req->r_base_oid); in rbd_object_map_update()
2064 if (snap_id == CEPH_NOSNAP) { in rbd_object_map_update()
5106 return sprintf(buf, "%llu\n", rbd_dev->spec->snap_id); in rbd_snap_id_show()
5137 spec->snap_id, spec->snap_name, in rbd_parent_show()
5177 static DEVICE_ATTR(snap_id, 0444, rbd_snap_id_show, NULL);
5241 spec->snap_id = CEPH_NOSNAP; in rbd_spec_alloc()
5399 static int _rbd_dev_v2_snap_size(struct rbd_device *rbd_dev, u64 snap_id, in _rbd_dev_v2_snap_size() argument
5402 __le64 snapid = cpu_to_le64(snap_id); in _rbd_dev_v2_snap_size()
5426 (unsigned long long)snap_id, in _rbd_dev_v2_snap_size()
5476 static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id, in _rbd_dev_v2_snap_features() argument
5480 __le64 snap_id; in _rbd_dev_v2_snap_features() member
5490 features_in.snap_id = cpu_to_le64(snap_id); in _rbd_dev_v2_snap_features()
5513 (unsigned long long)snap_id, in _rbd_dev_v2_snap_features()
5536 __le64 snapid = cpu_to_le64(rbd_dev->spec->snap_id); in rbd_dev_v2_get_flags()
5557 u64 snap_id; member
5591 ceph_decode_64_safe(p, end, pii->snap_id, e_inval); in decode_parent_image_spec()
5666 ceph_decode_64_safe(&p, end, pii->snap_id, e_inval); in __get_parent_info_legacy()
5694 ceph_encode_64(&p, rbd_dev->spec->snap_id); in get_parent_info()
5720 __func__, pii.pool_id, pii.pool_ns, pii.image_id, pii.snap_id, in rbd_dev_v2_parent_info()
5769 parent_spec->snap_id = pii.snap_id; in rbd_dev_v2_parent_info()
5918 u64 snap_id; in rbd_v2_snap_id_by_name() local
5923 snap_id = snapc->snaps[which]; in rbd_v2_snap_id_by_name()
5924 snap_name = rbd_dev_v2_snap_name(rbd_dev, snap_id); in rbd_v2_snap_id_by_name()
5935 return found ? snap_id : CEPH_NOSNAP; in rbd_v2_snap_id_by_name()
5962 u64 snap_id; in rbd_spec_fill_snap_id() local
5964 snap_id = rbd_snap_id_by_name(rbd_dev, spec->snap_name); in rbd_spec_fill_snap_id()
5965 if (snap_id == CEPH_NOSNAP) in rbd_spec_fill_snap_id()
5968 spec->snap_id = snap_id; in rbd_spec_fill_snap_id()
5970 spec->snap_id = CEPH_NOSNAP; in rbd_spec_fill_snap_id()
5993 rbd_assert(spec->snap_id != CEPH_NOSNAP); in rbd_spec_fill_names()
6014 snap_name = rbd_snap_name(rbd_dev, spec->snap_id); in rbd_spec_fill_names()
6105 u64 snap_id) in rbd_dev_v2_snap_name() argument
6120 snapid = cpu_to_le64(snap_id); in rbd_dev_v2_snap_name()
6137 (unsigned long long)snap_id, snap_name); in rbd_dev_v2_snap_name()