Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 2 files:

Smatch caller information:

fs/btrfs/dev-replace.c btrfs_dev_replace_finishing() -> btrfs_assign_next_active_device()

Type Parameter Key Value
PARAM_VALUE 0 device 4096-ptr_max
PARAM_VALUE 0 device->devid 0
PARAM_VALUE 0 device->post_commit_list.next 4096-ptr_max
PARAM_VALUE 1 next_device 4096-ptr_max
CAPPED_DATA 0 device 1
CAPPED_DATA 0 &device->post_commit_list 1
PARAM_COMPARE 0 &device->post_commit_list == $0->post_commit_list.next
NOCHECK_CALL
LOCK2 &dev_replace->lock_finishing_cancel_unmount
LOCK2 &dev_replace->rwsem
LOCK2 &fs_devices->device_list_mutex
LOCK2 &fs_info->chunk_mutex
TYPE_LOCK (struct btrfs_dev_replace)->lock_finishing_cancel_unmount
TYPE_LOCK (struct btrfs_dev_replace)->rwsem
TYPE_LOCK (struct btrfs_fs_devices)->device_list_mutex
TYPE_LOCK (struct btrfs_fs_info)->chunk_mutex

fs/btrfs/volumes.c btrfs_destroy_dev_replace_tgtdev() -> btrfs_assign_next_active_device()

Type Parameter Key Value
PARAM_VALUE 0 device 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.entry.next->next 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.entry.prev->next 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.entry.prev->prev 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.parent 0
PARAM_VALUE 0 device->devid_kobj.parent->release->timer->entry.pprev 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.parent->release.work.entry.next->prev 4096-ptr_max
PARAM_VALUE 0 device->devid_kobj.sd 0
PARAM_VALUE 0 device->devid_kobj.sd->__parent 0
PARAM_VALUE 0 device->devid_kobj.state_in_sysfs 0
PARAM_VALUE 0 device->fs_info 4096-ptr_max
PARAM_VALUE 0 device->fs_info->fs_devices 4096-ptr_max
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.first_waiter->list.prev->next 5159360019465732096
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.osq.tail.counter 0-s32max
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.wait_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.wait_lock.owner (-1)
PARAM_VALUE 0 device->fs_info->fs_devices->device_list_mutex.wait_lock.owner_cpu u32max
PARAM_VALUE 0 device->kobj_unregister.done 0-4294967293,u32max
PARAM_VALUE 0 device->kobj_unregister.wait.lock.dep_map->name 0-255
PARAM_VALUE 0 device->kobj_unregister.wait.lock.owner (-1)
PARAM_VALUE 0 device->kobj_unregister.wait.lock.owner_cpu u32max
PARAM_VALUE 0 device->kobj_unregister.wait.task_list.prev->next 4096-ptr_max
PARAM_VALUE 0 device->kobj_unregister.wait.task_list.prev->next->next 4096-ptr_max
PARAM_VALUE 1 next_device 0
DATA_SOURCE 0 device $0
NOCHECK_CALL
LOCK2 &fs_devices->device_list_mutex
HALF_LOCKED2 &dev_replace->lock_finishing_cancel_unmount
TYPE_LOCK (struct btrfs_fs_devices)->device_list_mutex

fs/btrfs/volumes.c btrfs_init_new_device() -> btrfs_assign_next_active_device()

Type Parameter Key Value
PARAM_VALUE 1 next_device 4096-ptr_max
PARAM_VALUE 1 next_device->alloc_state.fs_info 0,4096-ptr_max
PARAM_VALUE 1 next_device->alloc_state.inode 0,4096-ptr_max
PARAM_VALUE 1 next_device->alloc_state.owner 10
PARAM_VALUE 1 next_device->bdev 4096-ptr_max
PARAM_VALUE 1 next_device->bdev->bd_disk->queue->dev->power.wakeirq->status 0-4294967295
PARAM_VALUE 1 next_device->bdev->bd_mapping->invalidate_lock.first_waiter->handoff_set 0-1
PARAM_VALUE 1 next_device->bdev->bd_mapping->invalidate_lock.first_waiter->type 0-1
PARAM_VALUE 1 next_device->bdev_file 4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->__f_path.dentry 4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->__f_path.mnt 0
PARAM_VALUE 1 next_device->bdev_file->f_cred 0,4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->f_ep 0
PARAM_VALUE 1 next_device->bdev_file->f_flags 0,32768-u32max
PARAM_VALUE 1 next_device->bdev_file->f_inode 4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->f_iocb_flags 0,2,16,18,131072,131074,131088,131090
PARAM_VALUE 1 next_device->bdev_file->f_mapping 4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->f_mapping->host->i_mapping->invalidate_lock.first_waiter->type 0-1
PARAM_VALUE 1 next_device->bdev_file->f_mapping->host->i_rwsem.first_waiter->handoff_set 0-1
PARAM_VALUE 1 next_device->bdev_file->f_mapping->host->i_rwsem.first_waiter->type 0-1
PARAM_VALUE 1 next_device->bdev_file->f_mode 0,64-u32max
PARAM_VALUE 1 next_device->bdev_file->f_op 8212791493360840704
PARAM_VALUE 1 next_device->bdev_file->f_owner 0
PARAM_VALUE 1 next_device->bdev_file->f_pos 0
PARAM_VALUE 1 next_device->bdev_file->f_pos_lock.magic 4096-ptr_max
PARAM_VALUE 1 next_device->bdev_file->f_ra.async_size 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.mmap_miss 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.order 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.prev_pos 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.ra_pages 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.size 0
PARAM_VALUE 1 next_device->bdev_file->f_ra.start 0
PARAM_VALUE 1 next_device->bdev_file->f_ref.refcnt.counter 0
PARAM_VALUE 1 next_device->bdev_file->f_sb_err 0
PARAM_VALUE 1 next_device->bdev_file->f_security 0
PARAM_VALUE 1 next_device->bdev_file->private_data 4096-ptr_max
PARAM_VALUE 1 next_device->commit_total_bytes 0-9223372036854775807
PARAM_VALUE 1 next_device->dev_alloc_list.next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_alloc_list.next->next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_alloc_list.prev 4096-ptr_max
PARAM_VALUE 1 next_device->dev_alloc_list.prev->next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_alloc_list.prev->prev 4096-ptr_max
PARAM_VALUE 1 next_device->dev_list.next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_list.next->next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_list.prev 4096-ptr_max
PARAM_VALUE 1 next_device->dev_list.prev->next 4096-ptr_max
PARAM_VALUE 1 next_device->dev_list.prev->prev 4096-ptr_max
PARAM_VALUE 1 next_device->dev_stats_valid 1
PARAM_VALUE 1 next_device->devt 1-u32max
PARAM_VALUE 1 next_device->disk_total_bytes 0-9223372036854775807
PARAM_VALUE 1 next_device->fs_info 4096-ptr_max
PARAM_VALUE 1 next_device->fs_info->dev_root->node->lock.first_waiter->handoff_set 0-1
PARAM_VALUE 1 next_device->fs_info->dev_root->node->lock.first_waiter->type 0-1
PARAM_VALUE 1 next_device->fs_info->exclusive_operation 3
PARAM_VALUE 1 next_device->fs_info->fs_devices 4096-ptr_max
PARAM_VALUE 1 next_device->fs_info->sb 4096-ptr_max
PARAM_VALUE 1 next_device->post_commit_list.next 4096-ptr_max
PARAM_VALUE 1 next_device->post_commit_list.next->next 4096-ptr_max
PARAM_VALUE 1 next_device->post_commit_list.prev 4096-ptr_max
PARAM_VALUE 1 next_device->post_commit_list.prev->next 4096-ptr_max
PARAM_VALUE 1 next_device->post_commit_list.prev->prev 4096-ptr_max
PARAM_VALUE 1 next_device->total_bytes 0-9223372036854775807
BUF_SIZE 1 next_device 936
BUF_SIZE 1 next_device->bdev 2136
CAPPED_DATA 1 next_device->commit_total_bytes 1
CAPPED_DATA 1 next_device->disk_total_bytes 1
CAPPED_DATA 1 next_device->total_bytes 1
DATA_SOURCE 1 next_device r btrfs_alloc_device
CAPABLE 0 21
NOCHECK_CALL
NO_OVERFLOW_SIMPLE 1 next_device->alloc_state.fs_info->nodesize
NO_OVERFLOW_SIMPLE 1 next_device->alloc_state.fs_info->sectorsize
LOCK2 &fs_devices->device_list_mutex
LOCK2 &sb->s_umount
LOCK2 global &uuid_mutex
TYPE_LOCK (struct btrfs_fs_devices)->device_list_mutex
TYPE_LOCK (struct super_block)->s_umount

fs/btrfs/volumes.c btrfs_rm_device() -> btrfs_assign_next_active_device()

Type Parameter Key Value
PARAM_VALUE 0 device 4096-ptr_max
PARAM_VALUE 0 device->bdev 0,4096-ptr_max
PARAM_VALUE 0 device->bdev->bd_fsfreeze_count.counter 0-s32max
PARAM_VALUE 0 device->dev_list.next->prev 4096-ptr_max
PARAM_VALUE 0 device->disk_total_bytes 0-18446744073709551104
PARAM_VALUE 0 device->fs_devices 4096-ptr_max
PARAM_VALUE 0 device->fs_info 4096-ptr_max
PARAM_VALUE 0 device->fs_info->block_group_cache_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->chunk_mutex.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->list.prev->next 5159360019465732096
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->task->blocked_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->task->blocked_lock.owner (-1)
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->task->blocked_lock.owner_cpu 4294967295
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->task->blocked_lock.raw_lock.val.counter s32min-s32max
PARAM_VALUE 0 device->fs_info->chunk_mutex.first_waiter->task->usage.refs.counter s32min-s32max
PARAM_VALUE 0 device->fs_info->chunk_mutex.osq.tail.counter 0-s32max
PARAM_VALUE 0 device->fs_info->data_sinfo->lock.rlock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->dev_replace.replace_wait.head.prev->next 4096-ptr_max
PARAM_VALUE 0 device->fs_info->dev_replace.replace_wait.head.prev->next->next 4096-ptr_max
PARAM_VALUE 0 device->fs_info->dev_root->qgroup_meta_rsv_lock.rlock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->discard_ctl.work->timer->entry.pprev 4096-ptr_max
PARAM_VALUE 0 device->fs_info->fs_devices->per_profile_lock.rlock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->mapping_tree_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->reclaim_bgs_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->reclaim_bgs_lock.first_waiter->list.prev->next 5159360019465732096
PARAM_VALUE 0 device->fs_info->scrub_lock.dep_map->name 0-255
PARAM_VALUE 0 device->fs_info->scrub_lock.first_waiter->list.prev->next 5159360019465732096
PARAM_VALUE 0 device->fs_info->scrub_lock.first_waiter->list.prev->prev 5159360019465732096
PARAM_VALUE 0 device->fs_info->scrub_lock.osq.tail.counter 0-s32max
PARAM_VALUE 0 device->post_commit_list.next 4096-ptr_max
PARAM_VALUE 0 device->scrub_ctx 0,4096-ptr_max
PARAM_VALUE 0 device->scrub_ctx->cancel_req.counter s32min-s32max
PARAM_VALUE 1 next_device 0
CAPPED_DATA 0 device 1
DATA_SOURCE 0 device r btrfs_find_device
CAPABLE 0 21
NOCHECK_CALL
LOCK2 &fs_devices->device_list_mutex
TYPE_LOCK (struct btrfs_fs_devices)->device_list_mutex