Lines Matching refs:iars

91 	struct blk_independent_access_ranges *iars =  in blk_ia_ranges_sysfs_release()  local
94 kfree(iars); in blk_ia_ranges_sysfs_release()
110 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_register_independent_access_ranges() local
117 if (!iars) in disk_register_independent_access_ranges()
124 WARN_ON(iars->sysfs_registered); in disk_register_independent_access_ranges()
125 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype, in disk_register_independent_access_ranges()
129 kobject_put(&iars->kobj); in disk_register_independent_access_ranges()
133 for (i = 0; i < iars->nr_ia_ranges; i++) { in disk_register_independent_access_ranges()
134 ret = kobject_init_and_add(&iars->ia_range[i].kobj, in disk_register_independent_access_ranges()
135 &blk_ia_range_ktype, &iars->kobj, in disk_register_independent_access_ranges()
139 kobject_del(&iars->ia_range[i].kobj); in disk_register_independent_access_ranges()
140 kobject_del(&iars->kobj); in disk_register_independent_access_ranges()
141 kobject_put(&iars->kobj); in disk_register_independent_access_ranges()
146 iars->sysfs_registered = true; in disk_register_independent_access_ranges()
154 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_unregister_independent_access_ranges() local
160 if (!iars) in disk_unregister_independent_access_ranges()
163 if (iars->sysfs_registered) { in disk_unregister_independent_access_ranges()
164 for (i = 0; i < iars->nr_ia_ranges; i++) in disk_unregister_independent_access_ranges()
165 kobject_del(&iars->ia_range[i].kobj); in disk_unregister_independent_access_ranges()
166 kobject_del(&iars->kobj); in disk_unregister_independent_access_ranges()
167 kobject_put(&iars->kobj); in disk_unregister_independent_access_ranges()
169 kfree(iars); in disk_unregister_independent_access_ranges()
176 disk_find_ia_range(struct blk_independent_access_ranges *iars, in disk_find_ia_range() argument
182 for (i = 0; i < iars->nr_ia_ranges; i++) { in disk_find_ia_range()
183 iar = &iars->ia_range[i]; in disk_find_ia_range()
193 struct blk_independent_access_ranges *iars) in disk_check_ia_ranges() argument
200 if (WARN_ON_ONCE(!iars->nr_ia_ranges)) in disk_check_ia_ranges()
208 for (i = 0; i < iars->nr_ia_ranges; i++) { in disk_check_ia_ranges()
209 tmp = disk_find_ia_range(iars, sector); in disk_check_ia_ranges()
215 iar = &iars->ia_range[i]; in disk_check_ia_ranges()
265 struct blk_independent_access_ranges *iars; in disk_alloc_independent_access_ranges() local
267 iars = kzalloc_node(struct_size(iars, ia_range, nr_ia_ranges), in disk_alloc_independent_access_ranges()
269 if (iars) in disk_alloc_independent_access_ranges()
270 iars->nr_ia_ranges = nr_ia_ranges; in disk_alloc_independent_access_ranges()
271 return iars; in disk_alloc_independent_access_ranges()
287 struct blk_independent_access_ranges *iars) in disk_set_independent_access_ranges() argument
293 if (iars && !disk_check_ia_ranges(disk, iars)) { in disk_set_independent_access_ranges()
294 kfree(iars); in disk_set_independent_access_ranges()
295 iars = NULL; in disk_set_independent_access_ranges()
297 if (iars && !disk_ia_ranges_changed(disk, iars)) { in disk_set_independent_access_ranges()
298 kfree(iars); in disk_set_independent_access_ranges()
310 disk->ia_ranges = iars; in disk_set_independent_access_ranges()