Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
return _raw->can_zero_copy();
}
- int buffer::ptr::zero_copy_to_fd(int fd, int64_t *offset) const
- {
- return _raw->zero_copy_to_fd(fd, (loff_t*)offset);
- }
-
// -- buffer::list::iterator --
/*
buffer::list::iterator operator=(const buffer::list::iterator& other)
void copy_out(unsigned o, unsigned l, char *dest) const;
bool can_zero_copy() const;
- int zero_copy_to_fd(int fd, int64_t *offset) const;
unsigned wasted() const;
private:
mutable iterator last_p;
- int zero_copy_to_fd(int fd) const;
public:
// cons/des
virtual bool can_zero_copy() const {
return false;
}
- virtual int zero_copy_to_fd(int fd, loff_t *offset) {
- return -ENOTSUP;
- }
virtual bool is_shareable() {
// true if safe to reference/share the existing buffer copy
// false if it is not safe to share the buffer, e.g., due to special