| /linux/drivers/md/dm-vdo/ |
| H A D | vdo.c | 87 static bool vdo_is_equal(struct vdo *vdo, const void *context) in vdo_is_equal() argument 89 return (vdo == context); in vdo_is_equal() 101 static struct vdo * __must_check filter_vdos_locked(vdo_filter_fn filter, in filter_vdos_locked() 104 struct vdo *vdo; in filter_vdos_locked() local 106 list_for_each_entry(vdo, ®istry.links, registration) { in filter_vdos_locked() 107 if (filter(vdo, context)) in filter_vdos_locked() 108 return vdo; in filter_vdos_locked() 119 struct vdo *vdo_find_matching(vdo_filter_fn filter, const void *context) in vdo_find_matching() 121 struct vdo *vdo; in vdo_find_matching() local 124 vdo = filter_vdos_locked(filter, context); in vdo_find_matching() [all …]
|
| H A D | dm-vdo-target.c | 890 static struct vdo *get_vdo_for_target(struct dm_target *ti) in get_vdo_for_target() 892 return ((struct device_config *) ti->private)->vdo; in get_vdo_for_target() 898 struct vdo *vdo = get_vdo_for_target(ti); in vdo_map_bio() local 900 const struct admin_state_code *code = vdo_get_admin_state_code(&vdo->admin.state); in vdo_map_bio() 906 vdo_count_bios(&vdo->stats.bios_in, bio); in vdo_map_bio() 911 vdo_launch_flush(vdo, bio); in vdo_map_bio() 918 (vdo == vdo_get_work_queue_owner(current_work_queue)->vdo)); in vdo_map_bio() 919 vdo_launch_bio(vdo->data_vio_pool, bio); in vdo_map_bio() 925 struct vdo *vdo = get_vdo_for_target(ti); in vdo_io_hints() local 927 limits->logical_block_size = vdo->device_config->logical_block_size; in vdo_io_hints() [all …]
|
| H A D | vdo.h | 57 struct vdo *vdo; member 166 struct vdo { struct 275 static inline bool vdo_uses_bio_ack_queue(struct vdo *vdo) in vdo_uses_bio_ack_queue() argument 277 return vdo->device_config->thread_counts.bio_ack_threads > 0; in vdo_uses_bio_ack_queue() 287 typedef bool (*vdo_filter_fn)(struct vdo *vdo, const void *context); 290 struct vdo * __must_check vdo_find_matching(vdo_filter_fn filter, const void *context); 292 int __must_check vdo_make_thread(struct vdo *vdo, thread_id_t thread_id, 296 static inline int __must_check vdo_make_default_thread(struct vdo *vdo, in vdo_make_default_thread() argument 299 return vdo_make_thread(vdo, thread_id, NULL, 1, NULL); in vdo_make_default_thread() 303 char **reason, struct vdo **vdo_ptr); [all …]
|
| H A D | flush.c | 26 struct vdo *vdo; member 117 vdo_initialize_completion(&flush->completion, flusher->vdo, in allocate_flush() 135 int vdo_make_flusher(struct vdo *vdo) in vdo_make_flusher() argument 137 int result = vdo_allocate(1, struct flusher, __func__, &vdo->flusher); in vdo_make_flusher() 142 vdo->flusher->vdo = vdo; in vdo_make_flusher() 143 vdo->flusher->thread_id = vdo->thread_config.packer_thread; in vdo_make_flusher() 144 vdo_set_admin_state_code(&vdo->flusher->state, VDO_ADMIN_STATE_NORMAL_OPERATION); in vdo_make_flusher() 145 vdo_initialize_completion(&vdo->flusher->completion, vdo, in vdo_make_flusher() 148 spin_lock_init(&vdo->flusher->lock); in vdo_make_flusher() 149 bio_list_init(&vdo->flusher->waiting_flush_bios); in vdo_make_flusher() [all …]
|
| H A D | repair.c | 207 const struct thread_config *thread_config = &completion->vdo->thread_config; in prepare_repair_completion() 242 repair->completion.vdo->block_map->zones[0].page_cache.rebuilding = false; in free_repair_completion() 253 struct vdo *vdo = completion->vdo; in finish_repair() local 256 vdo_assert_on_admin_thread(vdo, __func__); in finish_repair() 258 if (vdo->load_state != VDO_REBUILD_FOR_UPGRADE) in finish_repair() 259 vdo->states.vdo.complete_recoveries++; in finish_repair() 261 vdo_initialize_recovery_journal_post_repair(vdo->recovery_journal, in finish_repair() 262 vdo->states.vdo.complete_recoveries, in finish_repair() 268 if (vdo_state_requires_read_only_rebuild(vdo->load_state)) { in finish_repair() 281 vdo_continue_completion(parent, vdo_allocate_reference_counters(vdo->depot)); in finish_repair() [all …]
|
| H A D | dump.c | 55 static void do_dump(struct vdo *vdo, unsigned int dump_options_requested, in do_dump() argument 62 active = get_data_vio_pool_active_requests(vdo->data_vio_pool); in do_dump() 63 maximum = get_data_vio_pool_maximum_requests(vdo->data_vio_pool); in do_dump() 64 outstanding = (atomic64_read(&vdo->stats.bios_submitted) - in do_dump() 65 atomic64_read(&vdo->stats.bios_completed)); in do_dump() 68 vdo_get_device_name(vdo->device_config->owning_target)); in do_dump() 69 if (((dump_options_requested & FLAG_SHOW_QUEUES) != 0) && (vdo->threads != NULL)) { in do_dump() 72 for (id = 0; id < vdo->thread_config.thread_count; id++) in do_dump() 73 vdo_dump_work_queue(vdo->threads[id].queue); in do_dump() 76 vdo_dump_hash_zones(vdo->hash_zones); in do_dump() [all …]
|
| H A D | completion.c | 52 struct vdo *vdo, in vdo_initialize_completion() argument 56 completion->vdo = vdo; in vdo_initialize_completion() 114 struct vdo *vdo = completion->vdo; in vdo_enqueue_completion() local 117 if (VDO_ASSERT(thread_id < vdo->thread_config.thread_count, in vdo_enqueue_completion() 120 vdo->thread_config.thread_count) != VDO_SUCCESS) in vdo_enqueue_completion() 126 vdo_enqueue_work_queue(vdo->threads[thread_id].queue, completion); in vdo_enqueue_completion()
|
| H A D | logical-zone.c | 54 struct vdo *vdo = zones->vdo; in initialize_zone() local 62 if (zone_number < vdo->thread_config.logical_zone_count - 1) in initialize_zone() 65 vdo_initialize_completion(&zone->completion, vdo, in initialize_zone() 69 zone->thread_id = vdo->thread_config.logical_threads[zone_number]; in initialize_zone() 70 zone->block_map_zone = &vdo->block_map->zones[zone_number]; in initialize_zone() 74 allocation_zone_number = zone->thread_id % vdo->thread_config.physical_zone_count; in initialize_zone() 75 zone->allocation_zone = &vdo->physical_zones->zones[allocation_zone_number]; in initialize_zone() 77 return vdo_make_default_thread(vdo, zone->thread_id); in initialize_zone() 87 int vdo_make_logical_zones(struct vdo *vdo, struct logical_zones **zones_ptr) in vdo_make_logical_zones() argument 92 zone_count_t zone_count = vdo->thread_config.logical_zone_count; in vdo_make_logical_zones() [all …]
|
| H A D | vio.c | 44 struct vdo *vdo = vio->completion.vdo; in pbn_from_vio_bio() local 47 return ((pbn == VDO_GEOMETRY_BLOCK_LOCATION) ? pbn : pbn + vdo->geometry.bio_offset); in pbn_from_vio_bio() 78 int allocate_vio_components(struct vdo *vdo, enum vio_type vio_type, in allocate_vio_components() argument 100 initialize_vio(vio, bio, block_count, vio_type, priority, vdo); in allocate_vio_components() 118 int create_multi_block_metadata_vio(struct vdo *vdo, enum vio_type vio_type, in create_multi_block_metadata_vio() argument 138 result = allocate_vio_components(vdo, vio_type, priority, parent, block_count, in create_multi_block_metadata_vio() 176 struct vdo *vdo = vio->completion.vdo; in vdo_set_bio_properties() local 177 struct device_config *config = vdo->device_config; in vdo_set_bio_properties() 179 pbn -= vdo->geometry.bio_offset; in vdo_set_bio_properties() 261 struct vdo *vdo = vio->completion.vdo; in update_vio_error_stats() local [all …]
|
| H A D | vio.h | 58 return vio->completion.vdo->thread_config.bio_threads[vio->bio_zone]; in get_vio_bio_zone_thread_id() 80 int allocate_vio_components(struct vdo *vdo, enum vio_type vio_type, 83 int __must_check create_multi_block_metadata_vio(struct vdo *vdo, enum vio_type vio_type, 88 static inline int __must_check create_metadata_vio(struct vdo *vdo, enum vio_type vio_type, in create_metadata_vio() argument 93 return create_multi_block_metadata_vio(vdo, vio_type, priority, parent, 1, data, in create_metadata_vio() 111 enum vio_priority priority, struct vdo *vdo) in initialize_vio() argument 120 vdo_initialize_completion(&vio->completion, vdo, VIO_COMPLETION); in initialize_vio() 197 int __must_check make_vio_pool(struct vdo *vdo, size_t pool_size, size_t block_count,
|
| H A D | io-submitter.c | 76 struct atomic_statistics *stats = &vio->completion.vdo->stats; in count_all_bios() 109 struct vdo *vdo = vio->completion.vdo; in send_bio_to_device() local 112 atomic64_inc(&vdo->stats.bios_submitted); in send_bio_to_device() 114 bio_set_dev(bio, vdo_get_backing_device(vdo)); in send_bio_to_device() 142 struct io_submitter *submitter = vio->completion.vdo->io_submitter; in get_bio_list() 275 struct vdo *vdo = vio->completion.vdo; in try_bio_map_merge() local 277 &vdo->io_submitter->bio_queue_data[vio->bio_zone]; in try_bio_map_merge() 348 const struct admin_state_code *code = vdo_get_admin_state(completion->vdo); in __submit_metadata_vio() 379 unsigned int max_requests_active, struct vdo *vdo, in vdo_make_io_submitter() argument 421 result = vdo_make_thread(vdo, vdo->thread_config.bio_threads[i], in vdo_make_io_submitter() [all …]
|
| H A D | data-vio.c | 246 struct vdo *vdo = vdo_from_data_vio(data_vio); in initialize_lbn_lock() local 254 lock->zone = &vdo->logical_zones->zones[zone_number]; in initialize_lbn_lock() 261 struct vdo *vdo = vdo_from_data_vio(data_vio); in launch_locked_request() local 263 if (vdo_is_read_only(vdo)) { in launch_locked_request() 275 struct vdo *vdo = vdo_from_data_vio(data_vio); in acknowledge_data_vio() local 287 vdo_count_bios(&vdo->stats.bios_acknowledged, bio); in acknowledge_data_vio() 289 vdo_count_bios(&vdo->stats.bios_acknowledged_partial, bio); in acknowledge_data_vio() 426 struct vdo *vdo = vdo_from_data_vio(data_vio); in attempt_logical_block_lock() local 432 if (data_vio->logical.lbn >= vdo->states.vdo.config.logical_blocks) { in attempt_logical_block_lock() 528 static void launch_bio(struct vdo *vdo, struct data_vio *data_vio, struct bio *bio) in launch_bio() argument [all …]
|
| H A D | message-stats.h | 11 int vdo_write_config(struct vdo *vdo, char **buf, unsigned int *maxlen); 12 int vdo_write_stats(struct vdo *vdo, char *buf, unsigned int maxlen);
|
| H A D | dump.h | 11 int vdo_dump(struct vdo *vdo, unsigned int argc, char *const *argv, const char *why); 13 void vdo_dump_all(struct vdo *vdo, const char *why);
|
| H A D | flush.h | 28 int __must_check vdo_make_flusher(struct vdo *vdo); 38 void vdo_launch_flush(struct vdo *vdo, struct bio *bio);
|
| H A D | logical-zone.h | 57 struct vdo *vdo; member 66 int __must_check vdo_make_logical_zones(struct vdo *vdo,
|
| H A D | physical-zone.c | 326 static int initialize_zone(struct vdo *vdo, struct physical_zones *zones) in initialize_zone() argument 343 zone->thread_id = vdo->thread_config.physical_threads[zone_number]; in initialize_zone() 344 zone->allocator = &vdo->depot->allocators[zone_number]; in initialize_zone() 345 zone->next = &zones->zones[(zone_number + 1) % vdo->thread_config.physical_zone_count]; in initialize_zone() 346 result = vdo_make_default_thread(vdo, zone->thread_id); in initialize_zone() 362 int vdo_make_physical_zones(struct vdo *vdo, struct physical_zones **zones_ptr) in vdo_make_physical_zones() argument 366 zone_count_t zone_count = vdo->thread_config.physical_zone_count; in vdo_make_physical_zones() 377 result = initialize_zone(vdo, zones); in vdo_make_physical_zones()
|
| H A D | block-map.h | 51 struct vdo *vdo; member 255 struct vdo *vdo; member 334 block_count_t logical_blocks, struct vdo *vdo,
|
| H A D | types.h | 211 struct vdo *vdo; member 314 struct vdo *vdo; member 333 struct vdo;
|
| H A D | Makefile | 5 obj-$(CONFIG_DM_VDO) += dm-vdo.o 7 dm-vdo-objs := \ 14 dm-vdo-target.o \ 40 vdo.o \
|
| H A D | slab-depot.c | 187 read_only = vdo_is_read_only(slab->allocator->depot->vdo); in check_if_slab_drained() 240 (vdo_is_read_only(allocator->depot->vdo) ? in check_summary_drain_complete() 252 int result = (vdo_is_read_only(allocator->depot->vdo) ? in notify_summary_waiters() 299 vdo_enter_read_only_mode(completion->vdo, completion->result); in handle_write_error() 330 if (vdo_is_read_only(depot->vdo)) { in launch_write() 372 if (vdo_is_read_only(block->vio.completion.vdo)) { in update_slab_summary_entry() 431 vdo_enter_read_only_mode(completion->vdo, completion->result); in handle_flush_error() 476 vdo_is_read_only(journal->slab->allocator->depot->vdo)) { in reap_slab_journal() 577 vdo_enter_read_only_mode(journal->slab->allocator->depot->vdo, result); in release_journal_locks() 629 vdo_is_read_only(journal->slab->allocator->depot->vdo) || in update_tail_block_location() [all …]
|
| H A D | dedupe.c | 1605 struct vdo *vdo = vdo_from_data_vio(data_vio); in decode_uds_advice() local 1629 atomic64_inc(&vdo->stats.invalid_advice_pbn_count); in decode_uds_advice() 1633 result = vdo_get_physical_zone(vdo, advice->pbn, &advice->zone); in decode_uds_advice() 1638 atomic64_inc(&vdo->stats.invalid_advice_pbn_count); in decode_uds_advice() 2169 static int initialize_index(struct vdo *vdo, struct hash_zones *zones) in initialize_index() argument 2173 struct volume_geometry geometry = vdo->geometry; in initialize_index() 2194 .bdev = vdo->device_config->owned_device->bdev, in initialize_index() 2206 result = vdo_make_thread(vdo, vdo->thread_config.dedupe_thread, &uds_queue_type, in initialize_index() 2214 vdo_initialize_completion(&zones->completion, vdo, VDO_HASH_ZONES_COMPLETION); in initialize_index() 2216 vdo->thread_config.dedupe_thread); in initialize_index() [all …]
|
| /linux/include/linux/usb/ |
| H A D | pd_vdo.h | 78 #define PD_VDO_VID(vdo) ((vdo) >> 16) argument 79 #define PD_VDO_SVDM(vdo) (((vdo) >> 15) & 1) argument 80 #define PD_VDO_SVDM_VER(vdo) (((vdo) >> 13) & 0x3) argument 81 #define PD_VDO_OPOS(vdo) (((vdo) >> 8) & 0x7) argument 82 #define PD_VDO_CMD(vdo) ((vdo) & 0x1f) argument 83 #define PD_VDO_CMDT(vdo) (((vdo) >> 6) & 0x3) argument 154 #define PD_IDH_PTYPE(vdo) (((vdo) >> 27) & 0x7) argument 155 #define PD_IDH_VID(vdo) ((vdo) & 0xffff) argument 156 #define PD_IDH_MODAL_SUPP(vdo) ((vdo) & (1 << 26)) argument 157 #define PD_IDH_DFP_PTYPE(vdo) (((vdo) >> 23) & 0x7) argument [all …]
|
| H A D | typec_altmode.h | 27 * @vdo: VDO returned by Discover Modes USB PD command 37 u32 vdo; 70 int (*enter)(struct typec_altmode *altmode, u32 *vdo); 72 void (*attention)(struct typec_altmode *altmode, u32 vdo); 74 const u32 *vdo, int cnt); 80 int typec_altmode_enter(struct typec_altmode *altmode, u32 *vdo); 82 int typec_altmode_attention(struct typec_altmode *altmode, u32 vdo); 84 const u32 header, const u32 *vdo, int count); 97 int (*enter)(struct typec_altmode *altmode, enum typec_plug_index sop, u32 *vdo); 100 const u32 hdr, const u32 *vdo, in 29 u32 vdo; global() member [all...] |
| /linux/drivers/usb/typec/altmodes/ |
| H A D | displayport.c | 106 signal = DP_CAP_DP_SIGNALLING(dp->port->vdo) & DP_CAP_DP_SIGNALLING(dp->alt->vdo); in dp_altmode_configure() 108 signal &= DP_CAP_DP_SIGNALLING(dp->plug_prime->vdo); in dp_altmode_configure() 117 pin_assign = DP_CAP_UFP_D_PIN_ASSIGN(dp->alt->vdo) & in dp_altmode_configure() 118 DP_CAP_DFP_D_PIN_ASSIGN(dp->port->vdo); in dp_altmode_configure() 121 pin_assign &= DP_CAP_DFP_D_PIN_ASSIGN(dp->plug_prime->vdo); in dp_altmode_configure() 126 pin_assign = DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo) & in dp_altmode_configure() 127 DP_CAP_PIN_ASSIGN_DFP_D(dp->port->vdo); in dp_altmode_configure() 130 pin_assign &= DP_CAP_UFP_D_PIN_ASSIGN(dp->plug_prime->vdo); in dp_altmode_configure() 270 u32 vdo; in dp_altmode_work() 265 u32 vdo; dp_altmode_work() local 341 dp_altmode_attention(struct typec_altmode * alt,const u32 vdo) dp_altmode_attention() argument 368 dp_altmode_vdm(struct typec_altmode * alt,const u32 hdr,const u32 * vdo,int count) dp_altmode_vdm() argument 439 dp_cable_altmode_vdm(struct typec_altmode * alt,enum typec_plug_index sop,const u32 hdr,const u32 * vdo,int count) dp_cable_altmode_vdm() argument [all...] |