summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/gennvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-07-07 09:54:16 +0200
committerJens Axboe <axboe@fb.com>2016-07-07 08:51:52 -0600
commitb76eb20bb0c6f4f9c2e1ad493f73c52817b8aaff (patch)
treeb066ae87ea129c6b01bcab50e24efc8acb3e62b0 /drivers/lightnvm/gennvm.h
parent5e60edb7dcedd6bdcf946ba765f51e8d363d65a8 (diff)
lightnvm: move target mgmt into media mgr
To enable persistent block management to easily control creation and removal of targets, we move target management into the media manager. The LightNVM core continues to maintain which target types are registered, while the media manager now keeps track of its initialized targets. Two new callbacks for the media manager are introduced. create_tgt and remove_tgt. Note that remove_tgt returns 0 on successfully removing a target, and returns 1 if the target was not found. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/gennvm.h')
-rw-r--r--drivers/lightnvm/gennvm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/lightnvm/gennvm.h b/drivers/lightnvm/gennvm.h
index bf0621963c7c..8ecfa817d21d 100644
--- a/drivers/lightnvm/gennvm.h
+++ b/drivers/lightnvm/gennvm.h
@@ -40,6 +40,9 @@ struct gen_dev {
int nr_luns;
struct gen_lun *luns;
struct list_head area_list;
+
+ struct mutex lock;
+ struct list_head targets;
};
struct gen_area {