Lines Matching full:disk

112  * @gd1:	Disk to compare
113 * @gd2: Disk to compare
224 struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); in integrity_attr_show() local
225 struct blk_integrity *bi = &disk->queue->integrity; in integrity_attr_show()
236 struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); in integrity_attr_store() local
237 struct blk_integrity *bi = &disk->queue->integrity; in integrity_attr_store()
388 * @disk: struct gendisk pointer to make integrity-aware
397 void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) in blk_integrity_register() argument
399 struct blk_integrity *bi = &disk->queue->integrity; in blk_integrity_register()
404 ilog2(queue_logical_block_size(disk->queue)); in blk_integrity_register()
409 blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue); in blk_integrity_register()
412 if (disk->queue->ksm) { in blk_integrity_register()
414 blk_ksm_unregister(disk->queue); in blk_integrity_register()
422 * @disk: disk whose integrity profile to unregister
427 void blk_integrity_unregister(struct gendisk *disk) in blk_integrity_unregister() argument
429 blk_queue_flag_clear(QUEUE_FLAG_STABLE_WRITES, disk->queue); in blk_integrity_unregister()
430 memset(&disk->queue->integrity, 0, sizeof(struct blk_integrity)); in blk_integrity_unregister()
434 void blk_integrity_add(struct gendisk *disk) in blk_integrity_add() argument
436 if (kobject_init_and_add(&disk->integrity_kobj, &integrity_ktype, in blk_integrity_add()
437 &disk_to_dev(disk)->kobj, "%s", "integrity")) in blk_integrity_add()
440 kobject_uevent(&disk->integrity_kobj, KOBJ_ADD); in blk_integrity_add()
443 void blk_integrity_del(struct gendisk *disk) in blk_integrity_del() argument
445 kobject_uevent(&disk->integrity_kobj, KOBJ_REMOVE); in blk_integrity_del()
446 kobject_del(&disk->integrity_kobj); in blk_integrity_del()
447 kobject_put(&disk->integrity_kobj); in blk_integrity_del()