Lines Matching refs:bi

225 	struct blk_integrity *bi = &disk->queue->integrity;  in integrity_attr_show()  local
229 return entry->show(bi, page); in integrity_attr_show()
237 struct blk_integrity *bi = &disk->queue->integrity; in integrity_attr_store() local
243 ret = entry->store(bi, page, count); in integrity_attr_store()
248 static ssize_t integrity_format_show(struct blk_integrity *bi, char *page) in integrity_format_show() argument
250 if (bi->profile && bi->profile->name) in integrity_format_show()
251 return sprintf(page, "%s\n", bi->profile->name); in integrity_format_show()
256 static ssize_t integrity_tag_size_show(struct blk_integrity *bi, char *page) in integrity_tag_size_show() argument
258 return sprintf(page, "%u\n", bi->tag_size); in integrity_tag_size_show()
261 static ssize_t integrity_interval_show(struct blk_integrity *bi, char *page) in integrity_interval_show() argument
264 bi->interval_exp ? 1 << bi->interval_exp : 0); in integrity_interval_show()
267 static ssize_t integrity_verify_store(struct blk_integrity *bi, in integrity_verify_store() argument
274 bi->flags |= BLK_INTEGRITY_VERIFY; in integrity_verify_store()
276 bi->flags &= ~BLK_INTEGRITY_VERIFY; in integrity_verify_store()
281 static ssize_t integrity_verify_show(struct blk_integrity *bi, char *page) in integrity_verify_show() argument
283 return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); in integrity_verify_show()
286 static ssize_t integrity_generate_store(struct blk_integrity *bi, in integrity_generate_store() argument
293 bi->flags |= BLK_INTEGRITY_GENERATE; in integrity_generate_store()
295 bi->flags &= ~BLK_INTEGRITY_GENERATE; in integrity_generate_store()
300 static ssize_t integrity_generate_show(struct blk_integrity *bi, char *page) in integrity_generate_show() argument
302 return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); in integrity_generate_show()
305 static ssize_t integrity_device_show(struct blk_integrity *bi, char *page) in integrity_device_show() argument
308 (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE) != 0); in integrity_device_show()
399 struct blk_integrity *bi = &disk->queue->integrity; in blk_integrity_register() local
401 bi->flags = BLK_INTEGRITY_VERIFY | BLK_INTEGRITY_GENERATE | in blk_integrity_register()
403 bi->interval_exp = template->interval_exp ? : in blk_integrity_register()
405 bi->profile = template->profile ? template->profile : &nop_profile; in blk_integrity_register()
406 bi->tuple_size = template->tuple_size; in blk_integrity_register()
407 bi->tag_size = template->tag_size; in blk_integrity_register()
429 struct blk_integrity *bi = &disk->queue->integrity; in blk_integrity_unregister() local
431 if (!bi->profile) in blk_integrity_unregister()
437 memset(bi, 0, sizeof(*bi)); in blk_integrity_unregister()