diff options
author | Matthew Ahrens <[email protected]> | 2017-02-08 09:27:48 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-08 09:27:48 -0800 |
commit | 4a5d7f82679d848bcfb95d6c841f0418b24bfeab (patch) | |
tree | 05fc645e5ec3ddbdc7f9a8b71baa4e9c406cebbc /module/zfs/zvol.c | |
parent | 23d70cdef108005ecf4d862e0af01d08dabbc9c7 (diff) |
Allow c99 code to compile
Add the appropriate compiler flags to accept c99 code. This will help to
minimize differences with upstream, and aid porting changes. One change was
necessary in zvol.c because the DEFINE_IDA() macro does not work with the new
compiler flags.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Chunwei Chen <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #5756
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r-- | module/zfs/zvol.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index e5cd47afd..abe77ecd4 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -65,7 +65,8 @@ static list_t zvol_state_list; #define ZVOL_HT_SIZE 1024 static struct hlist_head *zvol_htable; #define ZVOL_HT_HEAD(hash) (&zvol_htable[(hash) & (ZVOL_HT_SIZE-1)]) -static DEFINE_IDA(zvol_ida); + +static struct ida zvol_ida; /* * The in-core state of each volume. @@ -2161,6 +2162,7 @@ zvol_init(void) list_create(&zvol_state_list, sizeof (zvol_state_t), offsetof(zvol_state_t, zv_next)); mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL); + ida_init(&zvol_ida); zvol_htable = kmem_alloc(ZVOL_HT_SIZE * sizeof (struct hlist_head), KM_SLEEP); |