+int llapi_mirror_punch(int fd, unsigned int id, off_t start, size_t length)
+{
+ int rc;
+
+ rc = llapi_mirror_set(fd, id);
+ if (rc < 0)
+ return rc;
+
+ rc = llapi_hole_punch(fd, start, length);
+ (void) llapi_mirror_clear(fd);
+
+ return rc;
+}
+
+bool llapi_mirror_is_sparse(int fd, unsigned int id)
+{
+ bool sparse;
+ int rc;
+
+ rc = llapi_mirror_set(fd, id);
+ if (rc < 0)
+ return false;
+
+ sparse = llapi_file_is_sparse(fd);
+ (void) llapi_mirror_clear(fd);
+
+ return sparse;
+}
+
+/**
+ * Seek data in a specified mirror with @id. This function looks for the
+ * first data segment from given offset and returns its offset and length
+ *
+ * \param fd file descriptor, should be opened with O_DIRECT
+ * \param id mirror id to be read from
+ * \param pos position for start data seek from
+ * \param size size of data segment found
+ *
+ * \result >= 0 Number of bytes has been read
+ * \result < 0 The last seen error
+ */
+off_t llapi_mirror_data_seek(int fd, unsigned int id, off_t pos, size_t *size)
+{
+ off_t data_off;
+ int rc;
+
+ rc = llapi_mirror_set(fd, id);
+ if (rc < 0)
+ return rc;
+
+ data_off = llapi_data_seek(fd, pos, size);
+ (void) llapi_mirror_clear(fd);
+
+ return data_off;
+}
+