mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user