Print this page
Possibility to physically reserve space without writing leaf blocks


 595  * -1, the range from offset to end-of-file is freed.
 596  */
 597 int dmu_free_range(objset_t *os, uint64_t object, uint64_t offset,
 598         uint64_t size, dmu_tx_t *tx);
 599 int dmu_free_long_range(objset_t *os, uint64_t object, uint64_t offset,
 600         uint64_t size);
 601 int dmu_free_long_object(objset_t *os, uint64_t object);
 602 
 603 /*
 604  * Convenience functions.
 605  *
 606  * Canfail routines will return 0 on success, or an errno if there is a
 607  * nonrecoverable I/O error.
 608  */
 609 #define DMU_READ_PREFETCH       0 /* prefetch */
 610 #define DMU_READ_NO_PREFETCH    1 /* don't prefetch */
 611 int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 612         void *buf, uint32_t flags);
 613 void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 614         const void *buf, dmu_tx_t *tx);

 615 void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 616         dmu_tx_t *tx);
 617 int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
 618 int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size);
 619 int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,
 620     dmu_tx_t *tx);
 621 int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size,
 622     dmu_tx_t *tx);
 623 int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
 624     uint64_t size, struct page *pp, dmu_tx_t *tx);
 625 struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size);
 626 void dmu_return_arcbuf(struct arc_buf *buf);
 627 void dmu_assign_arcbuf(dmu_buf_t *handle, uint64_t offset, struct arc_buf *buf,
 628     dmu_tx_t *tx);
 629 int dmu_xuio_init(struct xuio *uio, int niov);
 630 void dmu_xuio_fini(struct xuio *uio);
 631 int dmu_xuio_add(struct xuio *uio, struct arc_buf *abuf, offset_t off,
 632     size_t n);
 633 int dmu_xuio_cnt(struct xuio *uio);
 634 struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i);




 595  * -1, the range from offset to end-of-file is freed.
 596  */
 597 int dmu_free_range(objset_t *os, uint64_t object, uint64_t offset,
 598         uint64_t size, dmu_tx_t *tx);
 599 int dmu_free_long_range(objset_t *os, uint64_t object, uint64_t offset,
 600         uint64_t size);
 601 int dmu_free_long_object(objset_t *os, uint64_t object);
 602 
 603 /*
 604  * Convenience functions.
 605  *
 606  * Canfail routines will return 0 on success, or an errno if there is a
 607  * nonrecoverable I/O error.
 608  */
 609 #define DMU_READ_PREFETCH       0 /* prefetch */
 610 #define DMU_READ_NO_PREFETCH    1 /* don't prefetch */
 611 int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 612         void *buf, uint32_t flags);
 613 void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 614         const void *buf, dmu_tx_t *tx);
 615 void dmu_write_zero(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, dmu_tx_t *tx);
 616 void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 617         dmu_tx_t *tx);
 618 int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
 619 int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size);
 620 int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,
 621     dmu_tx_t *tx);
 622 int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size,
 623     dmu_tx_t *tx);
 624 int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
 625     uint64_t size, struct page *pp, dmu_tx_t *tx);
 626 struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size);
 627 void dmu_return_arcbuf(struct arc_buf *buf);
 628 void dmu_assign_arcbuf(dmu_buf_t *handle, uint64_t offset, struct arc_buf *buf,
 629     dmu_tx_t *tx);
 630 int dmu_xuio_init(struct xuio *uio, int niov);
 631 void dmu_xuio_fini(struct xuio *uio);
 632 int dmu_xuio_add(struct xuio *uio, struct arc_buf *abuf, offset_t off,
 633     size_t n);
 634 int dmu_xuio_cnt(struct xuio *uio);
 635 struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i);