Home
last modified time | relevance | path

Searched refs:bioc (Results 1 – 15 of 15) sorted by relevance

/openbmc/qemu/io/
H A Dchannel-buffer.c66 if (bioc->offset >= bioc->usage) { in qio_channel_buffer_readv()
69 if ((bioc->offset + want) > bioc->usage) { in qio_channel_buffer_readv()
70 want = bioc->usage - bioc->offset; in qio_channel_buffer_readv()
98 bioc->capacity = bioc->offset + towrite; in qio_channel_buffer_writev()
99 bioc->data = g_realloc(bioc->data, bioc->capacity); in qio_channel_buffer_writev()
102 if (bioc->offset > bioc->usage) { in qio_channel_buffer_writev()
103 memset(bioc->data, 0, bioc->offset - bioc->usage); in qio_channel_buffer_writev()
104 bioc->usage = bioc->offset; in qio_channel_buffer_writev()
108 memcpy(bioc->data + bioc->usage, in qio_channel_buffer_writev()
147 bioc->capacity = bioc->usage = bioc->offset = 0; in qio_channel_buffer_close()
[all …]
/openbmc/qemu/migration/
H A Dchannel-block.c59 QIOChannelBlock *bioc = QIO_CHANNEL_BLOCK(ioc); in qio_channel_block_readv() local
64 ret = bdrv_readv_vmstate(bioc->bs, &qiov, bioc->offset); in qio_channel_block_readv()
70 bioc->offset += qiov.size; in qio_channel_block_readv()
89 ret = bdrv_writev_vmstate(bioc->bs, &qiov, bioc->offset); in qio_channel_block_writev()
95 bioc->offset += qiov.size; in qio_channel_block_writev()
123 bioc->offset = offset; in qio_channel_block_seek()
126 bioc->offset += whence; in qio_channel_block_seek()
135 return bioc->offset; in qio_channel_block_seek()
144 int rv = bdrv_flush(bioc->bs); in qio_channel_block_close()
152 g_clear_pointer(&bioc->bs, bdrv_unref); in qio_channel_block_close()
[all …]
H A Dcolo.c421 bioc->usage = 0; in colo_do_checkpoint_transaction()
481 qemu_put_buffer(s->to_dst_file, bioc->data, bioc->usage); in colo_do_checkpoint_transaction()
526 QIOChannelBuffer *bioc; in colo_process_checkpoint() local
557 fb = qemu_file_new_output(QIO_CHANNEL(bioc)); in colo_process_checkpoint()
558 object_unref(OBJECT(bioc)); in colo_process_checkpoint()
702 if (value > bioc->capacity) { in colo_incoming_process_checkpoint()
703 bioc->capacity = value; in colo_incoming_process_checkpoint()
704 bioc->data = g_realloc(bioc->data, bioc->capacity); in colo_incoming_process_checkpoint()
712 bioc->usage = total_size; in colo_incoming_process_checkpoint()
851 fb = qemu_file_new_input(QIO_CHANNEL(bioc)); in colo_process_incoming_thread()
[all …]
H A Dmigration.c2401 QIOChannelBuffer *bioc; in postcopy_start() local
2483 bioc = qio_channel_buffer_new(4096); in postcopy_start()
2484 qio_channel_set_name(QIO_CHANNEL(bioc), "migration-postcopy-buffer"); in postcopy_start()
2485 fb = qemu_file_new_output(QIO_CHANNEL(bioc)); in postcopy_start()
2486 object_unref(OBJECT(bioc)); in postcopy_start()
2516 if (qemu_savevm_send_packaged(ms->to_dst_file, bioc->data, bioc->usage)) { in postcopy_start()
2763 qemu_put_buffer(s->to_dst_file, s->bioc->data, s->bioc->usage); in bg_migration_completion()
3444 s->bioc = qio_channel_buffer_new(512 * 1024); in bg_migration_thread()
3445 qio_channel_set_name(QIO_CHANNEL(s->bioc), "vmstate-buffer"); in bg_migration_thread()
3446 fb = qemu_file_new_output(QIO_CHANNEL(s->bioc)); in bg_migration_thread()
[all …]
H A Dmigration.h271 QIOChannelBuffer *bioc; member
H A Dsavevm.c2320 QIOChannelBuffer *bioc; in loadvm_handle_cmd_packaged() local
2330 bioc = qio_channel_buffer_new(length); in loadvm_handle_cmd_packaged()
2331 qio_channel_set_name(QIO_CHANNEL(bioc), "migration-loadvm-buffer"); in loadvm_handle_cmd_packaged()
2333 bioc->data, in loadvm_handle_cmd_packaged()
2336 object_unref(OBJECT(bioc)); in loadvm_handle_cmd_packaged()
2341 bioc->usage += length; in loadvm_handle_cmd_packaged()
2344 QEMUFile *packf = qemu_file_new_input(QIO_CHANNEL(bioc)); in loadvm_handle_cmd_packaged()
2349 object_unref(OBJECT(bioc)); in loadvm_handle_cmd_packaged()
/openbmc/linux/fs/btrfs/
H A Dbio.c394 btrfs_put_bioc(bioc); in btrfs_raid56_end_io()
400 struct btrfs_io_context *bioc = stripe->bioc; in btrfs_orig_write_end_io() local
406 atomic_inc(&bioc->error); in btrfs_orig_write_end_io()
414 if (atomic_read(&bioc->error) > bioc->max_errors) in btrfs_orig_write_end_io()
420 btrfs_put_bioc(bioc); in btrfs_orig_write_end_io()
492 bioc->stripes[dev_nr].bioc = bioc; in btrfs_submit_mirrored_bio()
499 if (!bioc) { in __btrfs_submit_bio()
510 bio->bi_private = bioc; in __btrfs_submit_bio()
520 bioc->orig_bio = bio; in __btrfs_submit_bio()
539 struct btrfs_io_context *bioc; member
[all …]
H A Draid56.h20 struct btrfs_io_context *bioc; member
172 static inline int nr_bioc_data_stripes(const struct btrfs_io_context *bioc) in nr_bioc_data_stripes() argument
174 return bioc->num_stripes - btrfs_nr_parity_stripes(bioc->map_type); in nr_bioc_data_stripes()
185 void raid56_parity_recover(struct bio *bio, struct btrfs_io_context *bioc,
187 void raid56_parity_write(struct bio *bio, struct btrfs_io_context *bioc);
190 struct btrfs_io_context *bioc,
H A Draid56.c104 btrfs_put_bioc(rbio->bioc); in free_raid_bio()
570 if (last->bioc->full_stripe_logical != cur->bioc->full_stripe_logical) in rbio_can_merge()
663 if (cur->bioc->full_stripe_logical != rbio->bioc->full_stripe_logical) in lock_stripe_add()
905 const unsigned int real_stripes = bioc->num_stripes - bioc->replace_nr_stripes; in alloc_rbio()
946 btrfs_get_bioc(bioc); in alloc_rbio()
947 rbio->bioc = bioc; in alloc_rbio()
1151 const struct btrfs_io_context *bioc = rbio->bioc; in bio_get_trace_info() local
1154 ASSERT(bioc); in bio_get_trace_info()
1645 rbio = alloc_rbio(fs_info, bioc); in raid56_parity_write()
2402 struct btrfs_io_context *bioc = rbio->bioc; in finish_parity_scrub() local
[all …]
H A Dvolumes.c5906 bioc = kzalloc( in alloc_btrfs_io_context()
5913 if (!bioc) in alloc_btrfs_io_context()
5918 bioc->fs_info = fs_info; in alloc_btrfs_io_context()
5922 return bioc; in alloc_btrfs_io_context()
5928 refcount_inc(&bioc->refs); in btrfs_get_bioc()
5933 if (!bioc) in btrfs_put_bioc()
5936 kfree(bioc); in btrfs_put_bioc()
6456 if (!bioc) { in btrfs_map_block()
6506 *bioc_ret = bioc; in btrfs_map_block()
8106 if (!bioc) in btrfs_map_repair_block()
[all …]
H A Dvolumes.h388 struct btrfs_io_context *bioc; member
594 void btrfs_get_bioc(struct btrfs_io_context *bioc);
595 void btrfs_put_bioc(struct btrfs_io_context *bioc);
H A Dscrub.c892 struct btrfs_io_context *bioc = NULL; in scrub_stripe_report_errors() local
899 stripe->logical, &mapped_len, &bioc, in scrub_stripe_report_errors()
907 physical = bioc->stripes[stripe_index].physical; in scrub_stripe_report_errors()
908 dev = bioc->stripes[stripe_index].dev; in scrub_stripe_report_errors()
909 btrfs_put_bioc(bioc); in scrub_stripe_report_errors()
1852 struct btrfs_io_context *bioc = NULL; in scrub_raid56_parity_stripe() local
1972 &length, &bioc, NULL, NULL, 1); in scrub_raid56_parity_stripe()
1974 btrfs_put_bioc(bioc); in scrub_raid56_parity_stripe()
1978 rbio = raid56_parity_alloc_scrub_rbio(bio, bioc, scrub_dev, &extent_bitmap, in scrub_raid56_parity_stripe()
1980 btrfs_put_bioc(bioc); in scrub_raid56_parity_stripe()
H A Dzoned.c1893 struct btrfs_io_context *bioc = NULL; in read_zone_info() local
1900 &mapped_length, &bioc, NULL, NULL, 1); in read_zone_info()
1901 if (ret || !bioc || mapped_length < PAGE_SIZE) { in read_zone_info()
1906 if (bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) { in read_zone_info()
1912 nmirrors = (int)bioc->num_stripes; in read_zone_info()
1914 u64 physical = bioc->stripes[i].physical; in read_zone_info()
1915 struct btrfs_device *dev = bioc->stripes[i].dev; in read_zone_info()
1929 btrfs_put_bioc(bioc); in read_zone_info()
H A Dcheck-integrity.c1462 struct btrfs_io_context *bioc = NULL; in btrfsic_map_block() local
1467 ret = btrfs_map_block(fs_info, BTRFS_MAP_READ, bytenr, &length, &bioc, in btrfsic_map_block()
1481 if (bioc) in btrfsic_map_block()
1482 map = &bioc->stripes[0]; in btrfsic_map_block()
1500 kfree(bioc); in btrfsic_map_block()
/openbmc/linux/include/trace/events/
H A Dbtrfs.h2454 TP_fast_assign_btrfs(rbio->bioc->fs_info,
2455 __entry->full_stripe = rbio->bioc->full_stripe_logical;
2462 __entry->total_stripes = rbio->bioc->num_stripes;