aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zvol_os.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-03 15:54:29 -0700
committerBrian Behlendorf <[email protected]>2019-10-03 15:54:29 -0700
commit2cc479d049eb84b9cd7da9f2d64266429f3c3201 (patch)
tree381a50d3c3cd19d920ae915b64d7e97429b86b28 /module/os/linux/zfs/zvol_os.c
parent64b6c47d90b95d9eb9c39aec40e3c6e8374d2721 (diff)
Rename rangelock_ functions to zfs_rangelock_
A rangelock KPI already exists on FreeBSD. Add a zfs_ prefix as per our convention to prevent any conflict with existing symbols. Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9402
Diffstat (limited to 'module/os/linux/zfs/zvol_os.c')
-rw-r--r--module/os/linux/zfs/zvol_os.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index 2cb0cfca7..52725499a 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -142,7 +142,7 @@ zvol_write(void *arg)
if (error)
break;
}
- rangelock_exit(zvr->lr);
+ zfs_rangelock_exit(zvr->lr);
int64_t nwritten = start_resid - uio.uio_resid;
dataset_kstats_update_write_kstats(&zv->zv_zso->zvo_kstat, nwritten);
@@ -213,7 +213,7 @@ zvol_discard(void *arg)
ZVOL_OBJ, start, size);
}
unlock:
- rangelock_exit(zvr->lr);
+ zfs_rangelock_exit(zvr->lr);
if (error == 0 && sync)
zil_commit(zv->zv_zilog, ZVOL_OBJ);
@@ -259,7 +259,7 @@ zvol_read(void *arg)
break;
}
}
- rangelock_exit(zvr->lr);
+ zfs_rangelock_exit(zvr->lr);
int64_t nread = start_resid - uio.uio_resid;
dataset_kstats_update_read_kstats(&zv->zv_zso->zvo_kstat, nread);
@@ -344,7 +344,7 @@ zvol_request(struct request_queue *q, struct bio *bio)
* are asynchronous, we take it here synchronously to make
* sure overlapped I/Os are properly ordered.
*/
- zvr->lr = rangelock_enter(&zv->zv_rangelock, offset, size,
+ zvr->lr = zfs_rangelock_enter(&zv->zv_rangelock, offset, size,
RL_WRITER);
/*
* Sync writes and discards execute zil_commit() which may need
@@ -383,7 +383,7 @@ zvol_request(struct request_queue *q, struct bio *bio)
rw_enter(&zv->zv_suspend_lock, RW_READER);
- zvr->lr = rangelock_enter(&zv->zv_rangelock, offset, size,
+ zvr->lr = zfs_rangelock_enter(&zv->zv_rangelock, offset, size,
RL_READER);
if (zvol_request_sync || taskq_dispatch(zvol_taskq,
zvol_read, zvr, TQ_SLEEP) == TASKQID_INVALID)
@@ -799,7 +799,7 @@ zvol_alloc(dev_t dev, const char *name)
zv->zv_open_count = 0;
strlcpy(zv->zv_name, name, MAXNAMELEN);
- rangelock_init(&zv->zv_rangelock, NULL, NULL);
+ zfs_rangelock_init(&zv->zv_rangelock, NULL, NULL);
rw_init(&zv->zv_suspend_lock, NULL, RW_DEFAULT, NULL);
zv->zv_zso->zvo_disk->major = zvol_major;
@@ -861,7 +861,7 @@ zvol_free(zvol_state_t *zv)
ASSERT(zv->zv_zso->zvo_disk->private_data == NULL);
rw_destroy(&zv->zv_suspend_lock);
- rangelock_fini(&zv->zv_rangelock);
+ zfs_rangelock_fini(&zv->zv_rangelock);
del_gendisk(zv->zv_zso->zvo_disk);
blk_cleanup_queue(zv->zv_zso->zvo_queue);