aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorFedor Uporov <[email protected]>2021-10-26 17:07:53 -0700
committerGitHub <[email protected]>2021-10-26 17:07:53 -0700
commitd5a5ec46934c00d1c2e59ece2a32aad1ba9c982e (patch)
tree5151f717296e030357538e8d34d1a2d41d0412c8 /module/zfs
parent6f57f1e3820fb4f1ef39f5b9fe52d5f5714984c9 (diff)
Remove unused function zvol_set_volblocksize()
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Fedor Uporov <[email protected]> Closes #12688
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zvol.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index 5438e8f92..d50cce7d7 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -408,51 +408,6 @@ zvol_check_volblocksize(const char *name, uint64_t volblocksize)
}
/*
- * Set ZFS_PROP_VOLBLOCKSIZE set entry point.
- */
-int
-zvol_set_volblocksize(const char *name, uint64_t volblocksize)
-{
- zvol_state_t *zv;
- dmu_tx_t *tx;
- int error;
-
- zv = zvol_find_by_name(name, RW_READER);
-
- if (zv == NULL)
- return (SET_ERROR(ENXIO));
-
- ASSERT(MUTEX_HELD(&zv->zv_state_lock));
- ASSERT(RW_READ_HELD(&zv->zv_suspend_lock));
-
- if (zv->zv_flags & ZVOL_RDONLY) {
- mutex_exit(&zv->zv_state_lock);
- rw_exit(&zv->zv_suspend_lock);
- return (SET_ERROR(EROFS));
- }
-
- tx = dmu_tx_create(zv->zv_objset);
- dmu_tx_hold_bonus(tx, ZVOL_OBJ);
- error = dmu_tx_assign(tx, TXG_WAIT);
- if (error) {
- dmu_tx_abort(tx);
- } else {
- error = dmu_object_set_blocksize(zv->zv_objset, ZVOL_OBJ,
- volblocksize, 0, tx);
- if (error == ENOTSUP)
- error = SET_ERROR(EBUSY);
- dmu_tx_commit(tx);
- if (error == 0)
- zv->zv_volblocksize = volblocksize;
- }
-
- mutex_exit(&zv->zv_state_lock);
- rw_exit(&zv->zv_suspend_lock);
-
- return (SET_ERROR(error));
-}
-
-/*
* Replay a TX_TRUNCATE ZIL transaction if asked. TX_TRUNCATE is how we
* implement DKIOCFREE/free-long-range.
*/