summaryrefslogtreecommitdiffstats
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-07-07 03:54:19 -0400
committerJens Axboe <axboe@fb.com>2016-07-07 10:51:52 -0400
commit41285fad511a2c3746bee7ccb3b2f21b70305c14 (patch)
tree960420e74ab3069dff06c171f31041c3883f0b0b /include/linux/lightnvm.h
parent8c39eddbf2842861f6c7412bd498c9d880b1c9e8 (diff)
lightnvm: remove _unlocked variant of [get/put]_blk
The [get/put]_blk API enables targets to get ownership of blocks at runtime. This information is currently not recorded on disk, and the information is therefore lost on power failure. To restore the metadata, the [get/put]_blk must persist its metadata. In that case, we need to control the outer lock, so that we can disable them while updating the on-disk metadata. Fortunately, the _unlocked versions can be removed, which allows us to move the lock into the [get/put]_blk functions. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index d619f6dde7df..e9836cfb6fde 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -491,8 +491,6 @@ struct nvmm_type {
491 nvmm_remove_tgt_fn *remove_tgt; 491 nvmm_remove_tgt_fn *remove_tgt;
492 492
493 /* Block administration callbacks */ 493 /* Block administration callbacks */
494 nvmm_get_blk_fn *get_blk_unlocked;
495 nvmm_put_blk_fn *put_blk_unlocked;
496 nvmm_get_blk_fn *get_blk; 494 nvmm_get_blk_fn *get_blk;
497 nvmm_put_blk_fn *put_blk; 495 nvmm_put_blk_fn *put_blk;
498 nvmm_open_blk_fn *open_blk; 496 nvmm_open_blk_fn *open_blk;
@@ -522,10 +520,6 @@ struct nvmm_type {
522extern int nvm_register_mgr(struct nvmm_type *); 520extern int nvm_register_mgr(struct nvmm_type *);
523extern void nvm_unregister_mgr(struct nvmm_type *); 521extern void nvm_unregister_mgr(struct nvmm_type *);
524 522
525extern struct nvm_block *nvm_get_blk_unlocked(struct nvm_dev *,
526 struct nvm_lun *, unsigned long);
527extern void nvm_put_blk_unlocked(struct nvm_dev *, struct nvm_block *);
528
529extern struct nvm_block *nvm_get_blk(struct nvm_dev *, struct nvm_lun *, 523extern struct nvm_block *nvm_get_blk(struct nvm_dev *, struct nvm_lun *,
530 unsigned long); 524 unsigned long);
531extern void nvm_put_blk(struct nvm_dev *, struct nvm_block *); 525extern void nvm_put_blk(struct nvm_dev *, struct nvm_block *);