Lines Matching defs:tgt
208 struct dm_target *tgt = t->targets + i;
210 if (tgt->type->dtr)
211 tgt->type->dtr(tgt);
213 dm_put_target_type(tgt->type);
667 struct dm_target *tgt;
677 tgt = t->targets + t->num_targets;
678 memset(tgt, 0, sizeof(*tgt));
685 tgt->type = dm_get_target_type(type);
686 if (!tgt->type) {
691 if (dm_target_needs_singleton(tgt->type)) {
693 tgt->error = "singleton target type must appear alone in table";
699 if (dm_target_always_writeable(tgt->type) && !(t->mode & FMODE_WRITE)) {
700 tgt->error = "target type may not be included in a read-only table";
705 if (t->immutable_target_type != tgt->type) {
706 tgt->error = "immutable target type cannot be mixed with other target types";
709 } else if (dm_target_is_immutable(tgt->type)) {
711 tgt->error = "immutable target type cannot be mixed with other target types";
714 t->immutable_target_type = tgt->type;
717 if (dm_target_has_integrity(tgt->type))
720 tgt->table = t;
721 tgt->begin = start;
722 tgt->len = len;
723 tgt->error = "Unknown error";
728 if (!adjoin(t, tgt)) {
729 tgt->error = "Gap in table";
735 tgt->error = "couldn't split parameters (insufficient memory)";
739 r = tgt->type->ctr(tgt, argc, argv);
744 t->highs[t->num_targets++] = tgt->begin + tgt->len - 1;
746 if (!tgt->num_discard_bios && tgt->discards_supported)
753 DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);
754 dm_put_target_type(tgt->type);
893 struct dm_target *tgt;
909 tgt = t->targets + i;
910 if (dm_target_hybrid(tgt))
912 else if (dm_target_request_based(tgt))
974 tgt = dm_table_get_immutable_target(t);
975 if (!tgt) {
978 } else if (tgt->max_io_len) {
984 if (!tgt->type->iterate_devices ||
985 !tgt->type->iterate_devices(tgt, device_is_rq_stackable, NULL)) {