mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-05-23 15:04:59 +03:00
Delete dead code: dbuf_loan_arcbuf
It's been dead ever since 5fa356ea44
Sponsored by: ConnectWise
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes #17119
This commit is contained in:
parent
4800181b3b
commit
f13d760aa8
@ -401,7 +401,6 @@ dbuf_dirty_record_t *dbuf_dirty_lightweight(dnode_t *dn, uint64_t blkid,
|
||||
boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
|
||||
int dmu_buf_get_bp_from_dbuf(dmu_buf_impl_t *db, blkptr_t **bp);
|
||||
int dmu_buf_untransform_direct(dmu_buf_impl_t *db, spa_t *spa);
|
||||
arc_buf_t *dbuf_loan_arcbuf(dmu_buf_impl_t *db);
|
||||
void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data,
|
||||
bp_embedded_type_t etype, enum zio_compress comp,
|
||||
int uncompressed_size, int compressed_size, int byteorder, dmu_tx_t *tx);
|
||||
|
@ -1274,33 +1274,6 @@ dbuf_alloc_arcbuf(dmu_buf_impl_t *db)
|
||||
return (arc_alloc_buf(spa, db, DBUF_GET_BUFC_TYPE(db), db->db.db_size));
|
||||
}
|
||||
|
||||
/*
|
||||
* Loan out an arc_buf for read. Return the loaned arc_buf.
|
||||
*/
|
||||
arc_buf_t *
|
||||
dbuf_loan_arcbuf(dmu_buf_impl_t *db)
|
||||
{
|
||||
arc_buf_t *abuf;
|
||||
|
||||
ASSERT(db->db_blkid != DMU_BONUS_BLKID);
|
||||
mutex_enter(&db->db_mtx);
|
||||
if (arc_released(db->db_buf) || zfs_refcount_count(&db->db_holds) > 1) {
|
||||
int blksz = db->db.db_size;
|
||||
spa_t *spa = db->db_objset->os_spa;
|
||||
|
||||
mutex_exit(&db->db_mtx);
|
||||
abuf = arc_loan_buf(spa, B_FALSE, blksz);
|
||||
memcpy(abuf->b_data, db->db.db_data, blksz);
|
||||
} else {
|
||||
abuf = db->db_buf;
|
||||
arc_loan_inuse_buf(abuf, db);
|
||||
db->db_buf = NULL;
|
||||
dbuf_clear_data(db);
|
||||
mutex_exit(&db->db_mtx);
|
||||
}
|
||||
return (abuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate which level n block references the data at the level 0 offset
|
||||
* provided.
|
||||
@ -5390,7 +5363,6 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
|
||||
EXPORT_SYMBOL(dbuf_find);
|
||||
EXPORT_SYMBOL(dbuf_is_metadata);
|
||||
EXPORT_SYMBOL(dbuf_destroy);
|
||||
EXPORT_SYMBOL(dbuf_loan_arcbuf);
|
||||
EXPORT_SYMBOL(dbuf_whichblock);
|
||||
EXPORT_SYMBOL(dbuf_read);
|
||||
EXPORT_SYMBOL(dbuf_unoverride);
|
||||
|
Loading…
Reference in New Issue
Block a user