peer_device 827 drivers/block/drbd/drbd_debugfs.c void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) peer_device 829 drivers/block/drbd/drbd_debugfs.c struct dentry *conn_dir = peer_device->connection->debugfs_conn; peer_device 833 drivers/block/drbd/drbd_debugfs.c snprintf(vnr_buf, sizeof(vnr_buf), "%u", peer_device->device->vnr); peer_device 835 drivers/block/drbd/drbd_debugfs.c peer_device->debugfs_peer_dev = dentry; peer_device 838 drivers/block/drbd/drbd_debugfs.c void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) peer_device 840 drivers/block/drbd/drbd_debugfs.c drbd_debugfs_remove(&peer_device->debugfs_peer_dev); peer_device 21 drivers/block/drbd/drbd_debugfs.h void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device); peer_device 22 drivers/block/drbd/drbd_debugfs.h void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device); peer_device 37 drivers/block/drbd/drbd_debugfs.h static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { } peer_device 38 drivers/block/drbd/drbd_debugfs.h static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { } peer_device 81 drivers/block/drbd/drbd_int.h #define __drbd_printk_peer_device(level, peer_device, fmt, args...) \ peer_device 82 drivers/block/drbd/drbd_int.h dev_printk(level, disk_to_dev((peer_device)->device->vdisk), fmt, ## args) peer_device 396 drivers/block/drbd/drbd_int.h struct drbd_peer_device *peer_device; peer_device 1045 drivers/block/drbd/drbd_int.h #define for_each_peer_device(peer_device, device) \ peer_device 1046 drivers/block/drbd/drbd_int.h list_for_each_entry(peer_device, &device->peer_devices, peer_devices) peer_device 1048 drivers/block/drbd/drbd_int.h #define for_each_peer_device_rcu(peer_device, device) \ peer_device 1049 drivers/block/drbd/drbd_int.h list_for_each_entry_rcu(peer_device, &device->peer_devices, peer_devices) peer_device 1051 drivers/block/drbd/drbd_int.h #define for_each_peer_device_safe(peer_device, tmp, device) \ peer_device 1052 drivers/block/drbd/drbd_int.h list_for_each_entry_safe(peer_device, tmp, &device->peer_devices, peer_devices) peer_device 481 drivers/block/drbd/drbd_main.c struct drbd_peer_device *peer_device; peer_device 485 drivers/block/drbd/drbd_main.c peer_device = idr_get_next(&connection->peer_devices, &vnr); peer_device 486 drivers/block/drbd/drbd_main.c if (peer_device) peer_device 487 drivers/block/drbd/drbd_main.c minor = device_to_minor(peer_device->device); peer_device 632 drivers/block/drbd/drbd_main.c void *drbd_prepare_command(struct drbd_peer_device *peer_device, struct drbd_socket *sock) peer_device 634 drivers/block/drbd/drbd_main.c return conn_prepare_command(peer_device->connection, sock); peer_device 686 drivers/block/drbd/drbd_main.c int drbd_send_command(struct drbd_peer_device *peer_device, struct drbd_socket *sock, peer_device 692 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, peer_device->device->vnr, peer_device 718 drivers/block/drbd/drbd_main.c int drbd_send_sync_param(struct drbd_peer_device *peer_device) peer_device 723 drivers/block/drbd/drbd_main.c const int apv = peer_device->connection->agreed_pro_version; peer_device 728 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 729 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 734 drivers/block/drbd/drbd_main.c nc = rcu_dereference(peer_device->connection->net_conf); peer_device 747 drivers/block/drbd/drbd_main.c if (get_ldev(peer_device->device)) { peer_device 748 drivers/block/drbd/drbd_main.c dc = rcu_dereference(peer_device->device->ldev->disk_conf); peer_device 754 drivers/block/drbd/drbd_main.c put_ldev(peer_device->device); peer_device 769 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, cmd, size, NULL, 0); peer_device 827 drivers/block/drbd/drbd_main.c static int _drbd_send_uuids(struct drbd_peer_device *peer_device, u64 uuid_flags) peer_device 829 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 837 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 838 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 851 drivers/block/drbd/drbd_main.c uuid_flags |= rcu_dereference(peer_device->connection->net_conf)->discard_my_data ? 1 : 0; peer_device 858 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_UUIDS, sizeof(*p), NULL, 0); peer_device 861 drivers/block/drbd/drbd_main.c int drbd_send_uuids(struct drbd_peer_device *peer_device) peer_device 863 drivers/block/drbd/drbd_main.c return _drbd_send_uuids(peer_device, 0); peer_device 866 drivers/block/drbd/drbd_main.c int drbd_send_uuids_skip_initial_sync(struct drbd_peer_device *peer_device) peer_device 868 drivers/block/drbd/drbd_main.c return _drbd_send_uuids(peer_device, 8); peer_device 889 drivers/block/drbd/drbd_main.c void drbd_gen_and_send_sync_uuid(struct drbd_peer_device *peer_device) peer_device 891 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 907 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 908 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 911 drivers/block/drbd/drbd_main.c drbd_send_command(peer_device, sock, P_SYNC_UUID, sizeof(*p), NULL, 0); peer_device 940 drivers/block/drbd/drbd_main.c int drbd_send_sizes(struct drbd_peer_device *peer_device, int trigger_reply, enum dds_flags flags) peer_device 942 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 950 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 951 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 956 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_features & DRBD_FF_WSAME) peer_device 979 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_pro_version <= 94) peer_device 981 drivers/block/drbd/drbd_main.c else if (peer_device->connection->agreed_pro_version < 100) peer_device 991 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_SIZES, packet_size, NULL, 0); peer_device 998 drivers/block/drbd/drbd_main.c int drbd_send_current_state(struct drbd_peer_device *peer_device) peer_device 1003 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1004 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1007 drivers/block/drbd/drbd_main.c p->state = cpu_to_be32(peer_device->device->state.i); /* Within the send mutex */ peer_device 1008 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_STATE, sizeof(*p), NULL, 0); peer_device 1021 drivers/block/drbd/drbd_main.c int drbd_send_state(struct drbd_peer_device *peer_device, union drbd_state state) peer_device 1026 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1027 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1031 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_STATE, sizeof(*p), NULL, 0); peer_device 1034 drivers/block/drbd/drbd_main.c int drbd_send_state_req(struct drbd_peer_device *peer_device, union drbd_state mask, union drbd_state val) peer_device 1039 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1040 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1045 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_STATE_CHG_REQ, sizeof(*p), NULL, 0); peer_device 1064 drivers/block/drbd/drbd_main.c void drbd_send_sr_reply(struct drbd_peer_device *peer_device, enum drbd_state_rv retcode) peer_device 1069 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->meta; peer_device 1070 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1073 drivers/block/drbd/drbd_main.c drbd_send_command(peer_device, sock, P_STATE_CHG_REPLY, sizeof(*p), NULL, 0); peer_device 1342 drivers/block/drbd/drbd_main.c static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1348 drivers/block/drbd/drbd_main.c if (peer_device->device->state.conn < C_CONNECTED) peer_device 1351 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->meta; peer_device 1352 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1358 drivers/block/drbd/drbd_main.c p->seq_num = cpu_to_be32(atomic_inc_return(&peer_device->device->packet_seq)); peer_device 1359 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, cmd, sizeof(*p), NULL, 0); peer_device 1365 drivers/block/drbd/drbd_main.c void drbd_send_ack_dp(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1368 drivers/block/drbd/drbd_main.c if (peer_device->connection->peer_integrity_tfm) peer_device 1369 drivers/block/drbd/drbd_main.c data_size -= crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); peer_device 1370 drivers/block/drbd/drbd_main.c _drbd_send_ack(peer_device, cmd, dp->sector, cpu_to_be32(data_size), peer_device 1374 drivers/block/drbd/drbd_main.c void drbd_send_ack_rp(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1377 drivers/block/drbd/drbd_main.c _drbd_send_ack(peer_device, cmd, rp->sector, rp->blksize, rp->block_id); peer_device 1386 drivers/block/drbd/drbd_main.c int drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1389 drivers/block/drbd/drbd_main.c return _drbd_send_ack(peer_device, cmd, peer_device 1397 drivers/block/drbd/drbd_main.c int drbd_send_ack_ex(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1400 drivers/block/drbd/drbd_main.c return _drbd_send_ack(peer_device, cmd, peer_device 1406 drivers/block/drbd/drbd_main.c int drbd_send_rs_deallocated(struct drbd_peer_device *peer_device, peer_device 1412 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1413 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1419 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_RS_DEALLOCATED, sizeof(*p), NULL, 0); peer_device 1422 drivers/block/drbd/drbd_main.c int drbd_send_drequest(struct drbd_peer_device *peer_device, int cmd, peer_device 1428 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1429 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1435 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, cmd, sizeof(*p), NULL, 0); peer_device 1438 drivers/block/drbd/drbd_main.c int drbd_send_drequest_csum(struct drbd_peer_device *peer_device, sector_t sector, int size, peer_device 1446 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1447 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1453 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, cmd, sizeof(*p), digest, digest_size); peer_device 1456 drivers/block/drbd/drbd_main.c int drbd_send_ov_request(struct drbd_peer_device *peer_device, sector_t sector, int size) peer_device 1461 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1462 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1468 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_OV_REQUEST, sizeof(*p), NULL, 0); peer_device 1526 drivers/block/drbd/drbd_main.c static int _drbd_no_send_page(struct drbd_peer_device *peer_device, struct page *page, peer_device 1533 drivers/block/drbd/drbd_main.c socket = peer_device->connection->data.socket; peer_device 1535 drivers/block/drbd/drbd_main.c err = drbd_send_all(peer_device->connection, socket, addr, size, msg_flags); peer_device 1538 drivers/block/drbd/drbd_main.c peer_device->device->send_cnt += size >> 9; peer_device 1542 drivers/block/drbd/drbd_main.c static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *page, peer_device 1545 drivers/block/drbd/drbd_main.c struct socket *socket = peer_device->connection->data.socket; peer_device 1556 drivers/block/drbd/drbd_main.c return _drbd_no_send_page(peer_device, page, offset, size, msg_flags); peer_device 1559 drivers/block/drbd/drbd_main.c drbd_update_congested(peer_device->connection); peer_device 1566 drivers/block/drbd/drbd_main.c if (we_should_drop_the_connection(peer_device->connection, socket)) peer_device 1570 drivers/block/drbd/drbd_main.c drbd_warn(peer_device->device, "%s: size=%d len=%d sent=%d\n", peer_device 1579 drivers/block/drbd/drbd_main.c clear_bit(NET_CONGESTED, &peer_device->connection->flags); peer_device 1583 drivers/block/drbd/drbd_main.c peer_device->device->send_cnt += size >> 9; peer_device 1588 drivers/block/drbd/drbd_main.c static int _drbd_send_bio(struct drbd_peer_device *peer_device, struct bio *bio) peer_device 1597 drivers/block/drbd/drbd_main.c err = _drbd_no_send_page(peer_device, bvec.bv_page, peer_device 1610 drivers/block/drbd/drbd_main.c static int _drbd_send_zc_bio(struct drbd_peer_device *peer_device, struct bio *bio) peer_device 1619 drivers/block/drbd/drbd_main.c err = _drbd_send_page(peer_device, bvec.bv_page, peer_device 1631 drivers/block/drbd/drbd_main.c static int _drbd_send_zc_ee(struct drbd_peer_device *peer_device, peer_device 1642 drivers/block/drbd/drbd_main.c err = _drbd_send_page(peer_device, page, 0, l, peer_device 1672 drivers/block/drbd/drbd_main.c int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 1674 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 1683 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1684 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1685 drivers/block/drbd/drbd_main.c digest_size = peer_device->connection->integrity_tfm ? peer_device 1686 drivers/block/drbd/drbd_main.c crypto_shash_digestsize(peer_device->connection->integrity_tfm) : 0; peer_device 1693 drivers/block/drbd/drbd_main.c dp_flags = bio_flags_to_wire(peer_device->connection, req->master_bio); peer_device 1697 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_pro_version >= 100) { peer_device 1712 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, device->vnr, sock, cmd, sizeof(*t), NULL, 0); peer_device 1728 drivers/block/drbd/drbd_main.c drbd_csum_bio(peer_device->connection->integrity_tfm, req->master_bio, digest_out); peer_device 1731 drivers/block/drbd/drbd_main.c __send_command(peer_device->connection, device->vnr, sock, P_WSAME, peer_device 1736 drivers/block/drbd/drbd_main.c __send_command(peer_device->connection, device->vnr, sock, P_DATA, peer_device 1751 drivers/block/drbd/drbd_main.c err = _drbd_send_bio(peer_device, req->master_bio); peer_device 1753 drivers/block/drbd/drbd_main.c err = _drbd_send_zc_bio(peer_device, req->master_bio); peer_device 1760 drivers/block/drbd/drbd_main.c drbd_csum_bio(peer_device->connection->integrity_tfm, req->master_bio, digest); peer_device 1780 drivers/block/drbd/drbd_main.c int drbd_send_block(struct drbd_peer_device *peer_device, enum drbd_packet cmd, peer_device 1783 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 1789 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1790 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1792 drivers/block/drbd/drbd_main.c digest_size = peer_device->connection->integrity_tfm ? peer_device 1793 drivers/block/drbd/drbd_main.c crypto_shash_digestsize(peer_device->connection->integrity_tfm) : 0; peer_device 1802 drivers/block/drbd/drbd_main.c drbd_csum_ee(peer_device->connection->integrity_tfm, peer_req, p + 1); peer_device 1803 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, device->vnr, sock, cmd, sizeof(*p) + digest_size, NULL, peer_req->i.size); peer_device 1805 drivers/block/drbd/drbd_main.c err = _drbd_send_zc_ee(peer_device, peer_req); peer_device 1811 drivers/block/drbd/drbd_main.c int drbd_send_out_of_sync(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 1816 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; peer_device 1817 drivers/block/drbd/drbd_main.c p = drbd_prepare_command(peer_device, sock); peer_device 1822 drivers/block/drbd/drbd_main.c return drbd_send_command(peer_device, sock, P_OUT_OF_SYNC, sizeof(*p), NULL, 0); peer_device 2227 drivers/block/drbd/drbd_main.c struct drbd_peer_device *peer_device, *tmp_peer_device; peer_device 2262 drivers/block/drbd/drbd_main.c for_each_peer_device_safe(peer_device, tmp_peer_device, device) { peer_device 2263 drivers/block/drbd/drbd_main.c kref_put(&peer_device->connection->kref, drbd_destroy_connection); peer_device 2264 drivers/block/drbd/drbd_main.c kfree(peer_device); peer_device 2780 drivers/block/drbd/drbd_main.c struct drbd_peer_device *peer_device, *tmp_peer_device; peer_device 2865 drivers/block/drbd/drbd_main.c peer_device = kzalloc(sizeof(struct drbd_peer_device), GFP_KERNEL); peer_device 2866 drivers/block/drbd/drbd_main.c if (!peer_device) peer_device 2868 drivers/block/drbd/drbd_main.c peer_device->connection = connection; peer_device 2869 drivers/block/drbd/drbd_main.c peer_device->device = device; peer_device 2871 drivers/block/drbd/drbd_main.c list_add(&peer_device->peer_devices, &device->peer_devices); peer_device 2874 drivers/block/drbd/drbd_main.c id = idr_alloc(&connection->peer_devices, peer_device, vnr, vnr + 1, GFP_KERNEL); peer_device 2881 drivers/block/drbd/drbd_main.c INIT_WORK(&peer_device->send_acks_work, drbd_send_acks_wf); peer_device 2894 drivers/block/drbd/drbd_main.c for_each_peer_device(peer_device, device) peer_device 2895 drivers/block/drbd/drbd_main.c drbd_connected(peer_device); peer_device 2898 drivers/block/drbd/drbd_main.c for_each_peer_device(peer_device, device) peer_device 2899 drivers/block/drbd/drbd_main.c drbd_debugfs_peer_device_add(peer_device); peer_device 2907 drivers/block/drbd/drbd_main.c peer_device = idr_remove(&connection->peer_devices, vnr); peer_device 2908 drivers/block/drbd/drbd_main.c if (peer_device) peer_device 2911 drivers/block/drbd/drbd_main.c for_each_peer_device_safe(peer_device, tmp_peer_device, device) { peer_device 2912 drivers/block/drbd/drbd_main.c list_del(&peer_device->peer_devices); peer_device 2913 drivers/block/drbd/drbd_main.c kfree(peer_device); peer_device 2937 drivers/block/drbd/drbd_main.c struct drbd_peer_device *peer_device; peer_device 2940 drivers/block/drbd/drbd_main.c for_each_peer_device(peer_device, device) peer_device 2941 drivers/block/drbd/drbd_main.c drbd_debugfs_peer_device_cleanup(peer_device); peer_device 3058 drivers/block/drbd/drbd_main.c struct drbd_peer_device *peer_device; peer_device 3062 drivers/block/drbd/drbd_main.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 3063 drivers/block/drbd/drbd_main.c struct drbd_device *device = peer_device->device; peer_device 447 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 451 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 452 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 455 drivers/block/drbd/drbd_nl.c rcu_dereference(peer_device->device->ldev->disk_conf); peer_device 618 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 619 drivers/block/drbd/drbd_nl.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; peer_device 748 drivers/block/drbd/drbd_nl.c drbd_send_uuids(peer_device); peer_device 749 drivers/block/drbd/drbd_nl.c drbd_send_current_state(peer_device); peer_device 1272 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device = first_peer_device(device); peer_device 1273 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = peer_device->connection; peer_device 1278 drivers/block/drbd/drbd_nl.c drbd_info(peer_device, "WRITE_SAME disabled by config\n"); peer_device 1283 drivers/block/drbd/drbd_nl.c drbd_info(peer_device, "peer does not support WRITE_SAME\n"); peer_device 1300 drivers/block/drbd/drbd_nl.c drbd_warn(peer_device, "logical block sizes do not match (me:%u, peer:%u); this may cause problems.\n", peer_device 1303 drivers/block/drbd/drbd_nl.c drbd_dbg(peer_device, "logical block size mismatch: WRITE_SAME disabled.\n"); peer_device 1313 drivers/block/drbd/drbd_nl.c drbd_warn(peer_device, "logical block size set to %u\n", peer_lbs); peer_device 1315 drivers/block/drbd/drbd_nl.c drbd_warn(peer_device, peer_device 1324 drivers/block/drbd/drbd_nl.c drbd_dbg(peer_device, "WRITE_SAME disabled (peer device not capable)\n"); peer_device 1682 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 1684 drivers/block/drbd/drbd_nl.c for_each_peer_device(peer_device, device) peer_device 1685 drivers/block/drbd/drbd_nl.c drbd_send_sync_param(peer_device); peer_device 1794 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 1817 drivers/block/drbd/drbd_nl.c peer_device = first_peer_device(device); peer_device 1818 drivers/block/drbd/drbd_nl.c connection = peer_device->connection; peer_device 2260 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2265 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2266 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 2282 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2287 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2288 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 2303 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2326 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 2327 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 2348 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2356 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 2357 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 2525 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2528 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 2529 drivers/block/drbd/drbd_nl.c drbd_send_sync_param(peer_device); peer_device 2556 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device) peer_device 2558 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 2574 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 2673 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 2681 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 2684 drivers/block/drbd/drbd_nl.c peer_device_to_info(&peer_device_info, peer_device); peer_device 2686 drivers/block/drbd/drbd_nl.c notify_peer_device_state(NULL, 0, peer_device, &peer_device_info, NOTIFY_CREATE | flags); peer_device 2692 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 2693 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 3637 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device) peer_device 3639 drivers/block/drbd/drbd_nl.c struct drbd_device *device = peer_device->device; peer_device 3678 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device = NULL; peer_device 3710 drivers/block/drbd/drbd_nl.c for_each_peer_device(peer_device, device) peer_device 3711 drivers/block/drbd/drbd_nl.c if (peer_device == (struct drbd_peer_device *)cb->args[2]) peer_device 3717 drivers/block/drbd/drbd_nl.c peer_device = list_entry(&device->peer_devices, struct drbd_peer_device, peer_devices); peer_device 3720 drivers/block/drbd/drbd_nl.c list_for_each_entry_continue_rcu(peer_device, &device->peer_devices, peer_devices) { peer_device 3721 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) peer_device 3742 drivers/block/drbd/drbd_nl.c err = nla_put_drbd_cfg_context(skb, device->resource, peer_device->connection, device); peer_device 3745 drivers/block/drbd/drbd_nl.c peer_device_to_info(&peer_device_info, peer_device); peer_device 3749 drivers/block/drbd/drbd_nl.c peer_device_to_statistics(&peer_device_statistics, peer_device); peer_device 3754 drivers/block/drbd/drbd_nl.c cb->args[2] = (long)peer_device; peer_device 4382 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 4388 drivers/block/drbd/drbd_nl.c for_each_peer_device(peer_device, device) { peer_device 4389 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) peer_device 4398 drivers/block/drbd/drbd_nl.c for_each_peer_device(peer_device, device) { peer_device 4401 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) peer_device 4403 drivers/block/drbd/drbd_nl.c peer_device_to_info(&peer_device_info, peer_device); peer_device 4405 drivers/block/drbd/drbd_nl.c notify_peer_device_state(NULL, 0, peer_device, &peer_device_info, peer_device 4418 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 4438 drivers/block/drbd/drbd_nl.c for_each_peer_device(peer_device, device) { peer_device 4439 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) peer_device 4441 drivers/block/drbd/drbd_nl.c notify_peer_device_state(NULL, 0, peer_device, NULL, peer_device 4521 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device; peer_device 4523 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { peer_device 4524 drivers/block/drbd/drbd_nl.c retcode = drbd_set_role(peer_device->device, R_SECONDARY, 0); peer_device 4784 drivers/block/drbd/drbd_nl.c struct drbd_peer_device *peer_device, peer_device 4789 drivers/block/drbd/drbd_nl.c struct drbd_resource *resource = peer_device->device->resource; peer_device 4809 drivers/block/drbd/drbd_nl.c if (nla_put_drbd_cfg_context(skb, resource, peer_device->connection, peer_device->device) || peer_device 4814 drivers/block/drbd/drbd_nl.c peer_device_to_statistics(&peer_device_statistics, peer_device); peer_device 4828 drivers/block/drbd/drbd_nl.c drbd_err(peer_device, "Error %d while broadcasting event. Event seq:%u\n", peer_device 222 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 226 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 227 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 260 drivers/block/drbd/drbd_receiver.c struct page *drbd_alloc_pages(struct drbd_peer_device *peer_device, unsigned int number, peer_device 263 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 270 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); peer_device 358 drivers/block/drbd/drbd_receiver.c drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, peer_device 361 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 377 drivers/block/drbd/drbd_receiver.c page = drbd_alloc_pages(peer_device, nr_pages, peer_device 389 drivers/block/drbd/drbd_receiver.c peer_req->peer_device = peer_device; peer_device 887 drivers/block/drbd/drbd_receiver.c int drbd_connected(struct drbd_peer_device *peer_device) peer_device 889 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 895 drivers/block/drbd/drbd_receiver.c device->state_mutex = peer_device->connection->agreed_pro_version < 100 ? peer_device 896 drivers/block/drbd/drbd_receiver.c &peer_device->connection->cstate_mutex : peer_device 899 drivers/block/drbd/drbd_receiver.c err = drbd_send_sync_param(peer_device); peer_device 901 drivers/block/drbd/drbd_receiver.c err = drbd_send_sizes(peer_device, 0, 0); peer_device 903 drivers/block/drbd/drbd_receiver.c err = drbd_send_uuids(peer_device); peer_device 905 drivers/block/drbd/drbd_receiver.c err = drbd_send_current_state(peer_device); peer_device 924 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 1089 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 1090 drivers/block/drbd/drbd_receiver.c mutex_lock(peer_device->device->state_mutex); peer_device 1097 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 1098 drivers/block/drbd/drbd_receiver.c mutex_unlock(peer_device->device->state_mutex); peer_device 1101 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 1102 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 1111 drivers/block/drbd/drbd_receiver.c drbd_connected(peer_device); peer_device 1312 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 1321 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 1322 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 1659 drivers/block/drbd/drbd_receiver.c conn_wait_active_ee_empty(peer_req->peer_device->connection); peer_device 1753 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 1757 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 1758 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 1858 drivers/block/drbd/drbd_receiver.c read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, peer_device 1861 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 1867 drivers/block/drbd/drbd_receiver.c void *dig_in = peer_device->connection->int_dig_in; peer_device 1868 drivers/block/drbd/drbd_receiver.c void *dig_vv = peer_device->connection->int_dig_vv; peer_device 1875 drivers/block/drbd/drbd_receiver.c if (!trim && peer_device->connection->peer_integrity_tfm) { peer_device 1876 drivers/block/drbd/drbd_receiver.c digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); peer_device 1881 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); peer_device 1899 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "data size (%u) != drbd logical block size (%u)\n", peer_device 1904 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "data size (%u) != backend logical block size (%u)\n", peer_device 1932 drivers/block/drbd/drbd_receiver.c peer_req = drbd_alloc_peer_req(peer_device, id, sector, ds, data_size, GFP_NOIO); peer_device 1954 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, data, len); peer_device 1968 drivers/block/drbd/drbd_receiver.c drbd_csum_ee_size(peer_device->connection->peer_integrity_tfm, peer_req, dig_vv, data_size); peer_device 1983 drivers/block/drbd/drbd_receiver.c static int drbd_drain_block(struct drbd_peer_device *peer_device, int data_size) peer_device 1992 drivers/block/drbd/drbd_receiver.c page = drbd_alloc_pages(peer_device, 1, 1); peer_device 1998 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, data, len); peer_device 2004 drivers/block/drbd/drbd_receiver.c drbd_free_pages(peer_device->device, page, 0); peer_device 2008 drivers/block/drbd/drbd_receiver.c static int recv_dless_read(struct drbd_peer_device *peer_device, struct drbd_request *req, peer_device 2015 drivers/block/drbd/drbd_receiver.c void *dig_in = peer_device->connection->int_dig_in; peer_device 2016 drivers/block/drbd/drbd_receiver.c void *dig_vv = peer_device->connection->int_dig_vv; peer_device 2019 drivers/block/drbd/drbd_receiver.c if (peer_device->connection->peer_integrity_tfm) { peer_device 2020 drivers/block/drbd/drbd_receiver.c digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); peer_device 2021 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); peer_device 2029 drivers/block/drbd/drbd_receiver.c peer_device->device->recv_cnt += data_size>>9; peer_device 2032 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device->device, sector == bio->bi_iter.bi_sector); peer_device 2037 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, mapped, expect); peer_device 2045 drivers/block/drbd/drbd_receiver.c drbd_csum_bio(peer_device->connection->peer_integrity_tfm, bio, dig_vv); peer_device 2047 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "Digest integrity check FAILED. Broken NICs?\n"); peer_device 2052 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device->device, data_size == 0); peer_device 2064 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 2065 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 2073 drivers/block/drbd/drbd_receiver.c err = drbd_send_ack(peer_device, P_RS_WRITE_ACK, peer_req); peer_device 2078 drivers/block/drbd/drbd_receiver.c err = drbd_send_ack(peer_device, P_NEG_ACK, peer_req); peer_device 2085 drivers/block/drbd/drbd_receiver.c static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t sector, peer_device 2088 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 2091 drivers/block/drbd/drbd_receiver.c peer_req = read_in_block(peer_device, ID_SYNCER, sector, pi); peer_device 2144 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 2151 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 2152 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 2154 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 2167 drivers/block/drbd/drbd_receiver.c err = recv_dless_read(peer_device, req, sector, pi->size); peer_device 2179 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 2185 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 2186 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 2188 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 2197 drivers/block/drbd/drbd_receiver.c err = recv_resync_read(peer_device, sector, pi); peer_device 2202 drivers/block/drbd/drbd_receiver.c err = drbd_drain_block(peer_device, pi->size); peer_device 2204 drivers/block/drbd/drbd_receiver.c drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size); peer_device 2238 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 2239 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 2249 drivers/block/drbd/drbd_receiver.c err = drbd_send_ack(peer_device, pcmd, peer_req); peer_device 2253 drivers/block/drbd/drbd_receiver.c err = drbd_send_ack(peer_device, P_NEG_ACK, peer_req); peer_device 2272 drivers/block/drbd/drbd_receiver.c drbd_may_finish_epoch(peer_device->connection, peer_req->epoch, EV_PUT + (cancel ? EV_CLEANUP : 0)); peer_device 2281 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 2284 drivers/block/drbd/drbd_receiver.c err = drbd_send_ack(peer_device, ack, peer_req); peer_device 2285 drivers/block/drbd/drbd_receiver.c dec_unacked(peer_device->device); peer_device 2299 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_req->peer_device->connection; peer_device 2320 drivers/block/drbd/drbd_receiver.c static void update_peer_seq(struct drbd_peer_device *peer_device, unsigned int peer_seq) peer_device 2322 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 2325 drivers/block/drbd/drbd_receiver.c if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) { peer_device 2381 drivers/block/drbd/drbd_receiver.c static int wait_for_and_update_peer_seq(struct drbd_peer_device *peer_device, const u32 peer_seq) peer_device 2383 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 2388 drivers/block/drbd/drbd_receiver.c if (!test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) peer_device 2404 drivers/block/drbd/drbd_receiver.c tp = rcu_dereference(peer_device->connection->net_conf)->two_primaries; peer_device 2414 drivers/block/drbd/drbd_receiver.c timeout = rcu_dereference(peer_device->connection->net_conf)->ping_timeo*HZ/10; peer_device 2479 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_req->peer_device->connection; peer_device 2534 drivers/block/drbd/drbd_receiver.c queue_work(connection->ack_sender, &peer_req->peer_device->send_acks_work); peer_device 2587 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 2598 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 2599 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 2601 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 2606 drivers/block/drbd/drbd_receiver.c err = wait_for_and_update_peer_seq(peer_device, peer_seq); peer_device 2607 drivers/block/drbd/drbd_receiver.c drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size); peer_device 2609 drivers/block/drbd/drbd_receiver.c err2 = drbd_drain_block(peer_device, pi->size); peer_device 2622 drivers/block/drbd/drbd_receiver.c peer_req = read_in_block(peer_device, p->block_id, sector, pi); peer_device 2636 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, peer_req->i.size > 0); peer_device 2637 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, op == REQ_OP_DISCARD); peer_device 2638 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, peer_req->pages == NULL); peer_device 2644 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, peer_req->i.size > 0); peer_device 2645 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, op == REQ_OP_WRITE_ZEROES); peer_device 2646 drivers/block/drbd/drbd_receiver.c D_ASSERT(peer_device, peer_req->pages == NULL); peer_device 2665 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); peer_device 2667 drivers/block/drbd/drbd_receiver.c if (peer_device->connection->agreed_pro_version < 100) { peer_device 2689 drivers/block/drbd/drbd_receiver.c drbd_send_ack(peer_device, P_RECV_ACK, peer_req); peer_device 2696 drivers/block/drbd/drbd_receiver.c err = wait_for_and_update_peer_seq(peer_device, peer_seq); peer_device 2710 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, peer_seq); peer_device 2837 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 2847 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 2848 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 2850 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 2871 drivers/block/drbd/drbd_receiver.c drbd_send_ack_rp(peer_device, P_NEG_DREPLY, p); peer_device 2877 drivers/block/drbd/drbd_receiver.c drbd_send_ack_rp(peer_device, P_NEG_RS_DREPLY , p); peer_device 2882 drivers/block/drbd/drbd_receiver.c drbd_send_ack_ex(peer_device, P_OV_RESULT, sector, size, ID_IN_SYNC); peer_device 2892 drivers/block/drbd/drbd_receiver.c return drbd_drain_block(peer_device, pi->size); peer_device 2898 drivers/block/drbd/drbd_receiver.c peer_req = drbd_alloc_peer_req(peer_device, p->block_id, sector, size, peer_device 2940 drivers/block/drbd/drbd_receiver.c if (drbd_recv_all(peer_device->connection, di->digest, pi->size)) peer_device 2944 drivers/block/drbd/drbd_receiver.c D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); peer_device 2963 drivers/block/drbd/drbd_receiver.c peer_device->connection->agreed_pro_version >= 90) { peer_device 3051 drivers/block/drbd/drbd_receiver.c static int drbd_asb_recover_0p(struct drbd_peer_device *peer_device) __must_hold(local) peer_device 3053 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 3065 drivers/block/drbd/drbd_receiver.c after_sb_0p = rcu_dereference(peer_device->connection->net_conf)->after_sb_0p; peer_device 3101 drivers/block/drbd/drbd_receiver.c rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) peer_device 3118 drivers/block/drbd/drbd_receiver.c rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) peer_device 3134 drivers/block/drbd/drbd_receiver.c static int drbd_asb_recover_1p(struct drbd_peer_device *peer_device) __must_hold(local) peer_device 3136 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 3141 drivers/block/drbd/drbd_receiver.c after_sb_1p = rcu_dereference(peer_device->connection->net_conf)->after_sb_1p; peer_device 3155 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_0p(peer_device); peer_device 3162 drivers/block/drbd/drbd_receiver.c rv = drbd_asb_recover_0p(peer_device); peer_device 3167 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_0p(peer_device); peer_device 3191 drivers/block/drbd/drbd_receiver.c static int drbd_asb_recover_2p(struct drbd_peer_device *peer_device) __must_hold(local) peer_device 3193 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 3198 drivers/block/drbd/drbd_receiver.c after_sb_2p = rcu_dereference(peer_device->connection->net_conf)->after_sb_2p; peer_device 3212 drivers/block/drbd/drbd_receiver.c rv = drbd_asb_recover_0p(peer_device); peer_device 3217 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_0p(peer_device); peer_device 3270 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 3271 drivers/block/drbd/drbd_receiver.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; peer_device 3361 drivers/block/drbd/drbd_receiver.c drbd_warn(peer_device, "Equivalent unrotated UUIDs, but current primary present.\n"); peer_device 3368 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "Equivalent unrotated UUIDs, but both are primary. Can not resolve this.\n"); peer_device 3486 drivers/block/drbd/drbd_receiver.c static enum drbd_conns drbd_sync_handshake(struct drbd_peer_device *peer_device, peer_device 3490 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 3544 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); peer_device 3557 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_0p(peer_device); peer_device 3560 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_1p(peer_device); peer_device 3563 drivers/block/drbd/drbd_receiver.c hg = drbd_asb_recover_2p(peer_device); peer_device 3620 drivers/block/drbd/drbd_receiver.c if (tentative || test_bit(CONN_DRY_RUN, &peer_device->connection->flags)) { peer_device 3880 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 3893 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 3894 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 3896 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 3927 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, header_size); peer_device 3932 drivers/block/drbd/drbd_receiver.c old_net_conf = peer_device->connection->net_conf; peer_device 3958 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p->verify_alg, data_size); peer_device 4032 drivers/block/drbd/drbd_receiver.c crypto_free_shash(peer_device->connection->verify_tfm); peer_device 4033 drivers/block/drbd/drbd_receiver.c peer_device->connection->verify_tfm = verify_tfm; peer_device 4039 drivers/block/drbd/drbd_receiver.c crypto_free_shash(peer_device->connection->csums_tfm); peer_device 4040 drivers/block/drbd/drbd_receiver.c peer_device->connection->csums_tfm = csums_tfm; peer_device 4086 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4105 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4115 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4116 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4118 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4153 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4228 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4258 drivers/block/drbd/drbd_receiver.c drbd_send_sizes(peer_device, 0, ddsf); peer_device 4278 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4284 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4285 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4287 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4307 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4314 drivers/block/drbd/drbd_receiver.c peer_device->connection->agreed_pro_version >= 90 && peer_device 4385 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4391 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4392 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4394 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4399 drivers/block/drbd/drbd_receiver.c if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) && peer_device 4401 drivers/block/drbd/drbd_receiver.c drbd_send_sr_reply(peer_device, SS_CONCURRENT_ST_CHG); peer_device 4409 drivers/block/drbd/drbd_receiver.c drbd_send_sr_reply(peer_device, rv); peer_device 4442 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4450 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4451 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4453 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4567 drivers/block/drbd/drbd_receiver.c ns.conn = drbd_sync_handshake(peer_device, peer_state.role, real_peer_disk); peer_device 4579 drivers/block/drbd/drbd_receiver.c if (test_and_clear_bit(CONN_DRY_RUN, &peer_device->connection->flags)) peer_device 4582 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4604 drivers/block/drbd/drbd_receiver.c tl_clear(peer_device->connection); peer_device 4607 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS2(conn, C_PROTOCOL_ERROR, susp, 0), CS_HARD); peer_device 4615 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); peer_device 4625 drivers/block/drbd/drbd_receiver.c drbd_send_uuids(peer_device); peer_device 4626 drivers/block/drbd/drbd_receiver.c drbd_send_current_state(peer_device); peer_device 4639 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4643 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4644 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4646 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4679 drivers/block/drbd/drbd_receiver.c receive_bitmap_plain(struct drbd_peer_device *peer_device, unsigned int size, peer_device 4683 drivers/block/drbd/drbd_receiver.c drbd_header_size(peer_device->connection); peer_device 4690 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "%s:want (%u) != size (%u)\n", __func__, want, size); peer_device 4695 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, want); peer_device 4699 drivers/block/drbd/drbd_receiver.c drbd_bm_merge_lel(peer_device->device, c->word_offset, num_words, p); peer_device 4731 drivers/block/drbd/drbd_receiver.c recv_bm_rle_bits(struct drbd_peer_device *peer_device, peer_device 4760 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "bitmap overflow (e:%lu) while decoding bm RLE packet\n", e); peer_device 4763 drivers/block/drbd/drbd_receiver.c _drbd_bm_set_bits(peer_device->device, s, e); peer_device 4767 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "bitmap decoding error: h:%d b:%d la:0x%08llx l:%u/%u\n", peer_device 4800 drivers/block/drbd/drbd_receiver.c decode_bitmap_c(struct drbd_peer_device *peer_device, peer_device 4806 drivers/block/drbd/drbd_receiver.c return recv_bm_rle_bits(peer_device, p, c, len - sizeof(*p)); peer_device 4812 drivers/block/drbd/drbd_receiver.c drbd_err(peer_device, "receive_bitmap_c: unknown encoding %u\n", p->encoding); peer_device 4813 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); peer_device 4863 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4868 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4869 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4871 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4884 drivers/block/drbd/drbd_receiver.c err = receive_bitmap_plain(peer_device, pi->size, pi->data, &c); peer_device 4900 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, pi->size); peer_device 4903 drivers/block/drbd/drbd_receiver.c err = decode_bitmap_c(peer_device, p, &c, pi->size); peer_device 4918 drivers/block/drbd/drbd_receiver.c err = drbd_recv_header(peer_device->connection, pi); peer_device 4968 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 4972 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 4973 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 4975 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 4994 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5000 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5001 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5003 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5014 drivers/block/drbd/drbd_receiver.c peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER, sector, peer_device 5050 drivers/block/drbd/drbd_receiver.c drbd_send_ack_ex(peer_device, P_NEG_ACK, sector, size, ID_SYNCER); peer_device 5155 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5178 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 5179 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 5182 drivers/block/drbd/drbd_receiver.c drbd_disconnected(peer_device); peer_device 5210 drivers/block/drbd/drbd_receiver.c static int drbd_disconnected(struct drbd_peer_device *peer_device) peer_device 5212 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 5244 drivers/block/drbd/drbd_receiver.c drbd_flush_workqueue(&peer_device->connection->sender_work); peer_device 5251 drivers/block/drbd/drbd_receiver.c drbd_flush_workqueue(&peer_device->connection->sender_work); peer_device 5261 drivers/block/drbd/drbd_receiver.c tl_clear(peer_device->connection); peer_device 5642 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5647 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5648 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5650 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5687 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5693 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5694 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5696 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5698 drivers/block/drbd/drbd_receiver.c D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); peer_device 5700 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5739 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5746 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5747 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5749 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5751 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5785 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5792 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5793 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5795 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5797 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5821 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5826 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5827 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5829 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5831 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5843 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5849 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5850 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5852 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5857 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5880 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5886 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 5887 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 5903 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device; peer_device 5910 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); peer_device 5911 drivers/block/drbd/drbd_receiver.c if (!peer_device) peer_device 5913 drivers/block/drbd/drbd_receiver.c device = peer_device->device; peer_device 5918 drivers/block/drbd/drbd_receiver.c update_peer_seq(peer_device, be32_to_cpu(p->seq_num)); peer_device 5942 drivers/block/drbd/drbd_receiver.c drbd_queue_work(&peer_device->connection->sender_work, &dw->w); peer_device 6151 drivers/block/drbd/drbd_receiver.c struct drbd_peer_device *peer_device = peer_device 6153 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_device->connection; peer_device 6154 drivers/block/drbd/drbd_receiver.c struct drbd_device *device = peer_device->device; peer_device 338 drivers/block/drbd/drbd_req.c static void set_if_null_req_next(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 340 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 347 drivers/block/drbd/drbd_req.c static void advance_conn_req_next(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 349 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 364 drivers/block/drbd/drbd_req.c static void set_if_null_req_ack_pending(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 366 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 373 drivers/block/drbd/drbd_req.c static void advance_conn_req_ack_pending(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 375 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 390 drivers/block/drbd/drbd_req.c static void set_if_null_req_not_net_done(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 392 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 399 drivers/block/drbd/drbd_req.c static void advance_conn_req_not_net_done(struct drbd_peer_device *peer_device, struct drbd_request *req) peer_device 401 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 422 drivers/block/drbd/drbd_req.c struct drbd_peer_device *peer_device = first_peer_device(device); peer_device 452 drivers/block/drbd/drbd_req.c set_if_null_req_next(peer_device, req); peer_device 462 drivers/block/drbd/drbd_req.c set_if_null_req_not_net_done(peer_device, req); peer_device 465 drivers/block/drbd/drbd_req.c set_if_null_req_ack_pending(peer_device, req); peer_device 493 drivers/block/drbd/drbd_req.c advance_conn_req_ack_pending(peer_device, req); peer_device 498 drivers/block/drbd/drbd_req.c advance_conn_req_next(peer_device, req); peer_device 511 drivers/block/drbd/drbd_req.c advance_conn_req_next(peer_device, req); peer_device 512 drivers/block/drbd/drbd_req.c advance_conn_req_ack_pending(peer_device, req); peer_device 513 drivers/block/drbd/drbd_req.c advance_conn_req_not_net_done(peer_device, req); peer_device 569 drivers/block/drbd/drbd_req.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 570 drivers/block/drbd/drbd_req.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; peer_device 132 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 134 drivers/block/drbd/drbd_state.c peer_device = conn_peer_device(connection, device->vnr); peer_device 135 drivers/block/drbd/drbd_state.c peer_device_state_change->peer_device = peer_device; peer_device 196 drivers/block/drbd/drbd_state.c peer_device_state_change->peer_device->device; peer_device 296 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 301 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 302 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 338 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 342 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 343 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 354 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 358 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 359 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 370 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 374 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 375 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 386 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 390 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 391 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 402 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 406 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 407 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 418 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 422 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 423 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 433 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 438 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 439 drivers/block/drbd/drbd_state.c if (peer_device->device->state.conn == C_WF_REPORT_PARAMS) { peer_device 450 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 454 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 455 drivers/block/drbd/drbd_state.c wake_up(&peer_device->device->state_wait); peer_device 1264 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device = first_peer_device(device); peer_device 1265 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 1588 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device = p->peer_device; peer_device 1597 drivers/block/drbd/drbd_state.c notify_peer_device_state(skb, seq, peer_device, &peer_device_info, type); peer_device 1705 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device = first_peer_device(device); peer_device 1706 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 1757 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 1761 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 1762 drivers/block/drbd/drbd_state.c clear_bit(NEW_CUR_UUID, &peer_device->device->flags); peer_device 1787 drivers/block/drbd/drbd_state.c drbd_gen_and_send_sync_uuid(peer_device); peer_device 1801 drivers/block/drbd/drbd_state.c drbd_send_uuids(peer_device); peer_device 1802 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1822 drivers/block/drbd/drbd_state.c drbd_send_uuids(peer_device); peer_device 1833 drivers/block/drbd/drbd_state.c drbd_send_uuids(peer_device); peer_device 1860 drivers/block/drbd/drbd_state.c drbd_send_sizes(peer_device, 0, 0); /* to start sync... */ peer_device 1861 drivers/block/drbd/drbd_state.c drbd_send_uuids(peer_device); peer_device 1862 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1869 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1879 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1882 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1940 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1964 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1972 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1990 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 1997 drivers/block/drbd/drbd_state.c drbd_send_state(peer_device, ns); peer_device 2044 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 2059 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) peer_device 2060 drivers/block/drbd/drbd_state.c notify_peer_device_state(NULL, 0, peer_device, NULL, peer_device 2081 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2082 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 2107 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 2118 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2119 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 2156 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 2160 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2161 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 2205 drivers/block/drbd/drbd_state.c struct drbd_peer_device *peer_device; peer_device 2220 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2221 drivers/block/drbd/drbd_state.c struct drbd_device *device = peer_device->device; peer_device 25 drivers/block/drbd/drbd_state_change.h struct drbd_peer_device *peer_device; peer_device 83 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 84 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 95 drivers/block/drbd/drbd_worker.c drbd_queue_work(&peer_device->connection->sender_work, &peer_req->w); peer_device 104 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 105 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 106 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; peer_device 150 drivers/block/drbd/drbd_worker.c if (!queue_work(connection->ack_sender, &peer_device->send_acks_work)) peer_device 173 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_req->peer_device->device; peer_device 345 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 346 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 357 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->csums_tfm); peer_device 362 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->csums_tfm, peer_req, digest); peer_device 371 drivers/block/drbd/drbd_worker.c err = drbd_send_drequest_csum(peer_device, sector, size, peer_device 391 drivers/block/drbd/drbd_worker.c static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size) peer_device 393 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 401 drivers/block/drbd/drbd_worker.c peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER /* unused */, sector, peer_device 589 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 590 drivers/block/drbd/drbd_worker.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; peer_device 718 drivers/block/drbd/drbd_worker.c switch (read_for_csum(peer_device, sector, size)) { peer_device 737 drivers/block/drbd/drbd_worker.c err = drbd_send_drequest(peer_device, peer_device 1001 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device; peer_device 1003 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 1004 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1056 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 1057 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1067 drivers/block/drbd/drbd_worker.c err = drbd_send_block(peer_device, P_DATA_REPLY, peer_req); peer_device 1073 drivers/block/drbd/drbd_worker.c err = drbd_send_ack(peer_device, P_NEG_DREPLY, peer_req); peer_device 1117 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 1118 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1133 drivers/block/drbd/drbd_worker.c err = drbd_send_ack(peer_device, P_RS_CANCEL, peer_req); peer_device 1138 drivers/block/drbd/drbd_worker.c err = drbd_send_rs_deallocated(peer_device, peer_req); peer_device 1140 drivers/block/drbd/drbd_worker.c err = drbd_send_block(peer_device, P_RS_DATA_REPLY, peer_req); peer_device 1152 drivers/block/drbd/drbd_worker.c err = drbd_send_ack(peer_device, P_NEG_RS_DREPLY, peer_req); peer_device 1170 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 1171 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1194 drivers/block/drbd/drbd_worker.c if (peer_device->connection->csums_tfm) { peer_device 1195 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->csums_tfm); peer_device 1200 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->csums_tfm, peer_req, digest); peer_device 1209 drivers/block/drbd/drbd_worker.c err = drbd_send_ack(peer_device, P_RS_IS_IN_SYNC, peer_req); peer_device 1215 drivers/block/drbd/drbd_worker.c err = drbd_send_block(peer_device, P_RS_DATA_REPLY, peer_req); peer_device 1218 drivers/block/drbd/drbd_worker.c err = drbd_send_ack(peer_device, P_NEG_RS_DREPLY, peer_req); peer_device 1234 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 1235 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1245 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->verify_tfm); peer_device 1253 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->verify_tfm, peer_req, digest); peer_device 1265 drivers/block/drbd/drbd_worker.c err = drbd_send_drequest_csum(peer_device, sector, size, digest, digest_size, P_OV_REPLY); peer_device 1291 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = peer_req->peer_device; peer_device 1292 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 1317 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->verify_tfm); peer_device 1320 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->verify_tfm, peer_req, digest); peer_device 1339 drivers/block/drbd/drbd_worker.c err = drbd_send_ack_ex(peer_device, P_OV_RESULT, sector, size, peer_device 1427 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 1428 drivers/block/drbd/drbd_worker.c struct drbd_connection *const connection = peer_device->connection; peer_device 1443 drivers/block/drbd/drbd_worker.c err = drbd_send_out_of_sync(peer_device, req); peer_device 1458 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 1459 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; peer_device 1473 drivers/block/drbd/drbd_worker.c err = drbd_send_dblock(peer_device, req); peer_device 1477 drivers/block/drbd/drbd_worker.c pd_send_unplug_remote(peer_device); peer_device 1491 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *const peer_device = first_peer_device(device); peer_device 1492 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; peer_device 1506 drivers/block/drbd/drbd_worker.c err = drbd_send_drequest(peer_device, P_DATA_REQUEST, req->i.sector, req->i.size, peer_device 1512 drivers/block/drbd/drbd_worker.c pd_send_unplug_remote(peer_device); peer_device 1734 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device = first_peer_device(device); peer_device 1735 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; peer_device 1871 drivers/block/drbd/drbd_worker.c drbd_gen_and_send_sync_uuid(peer_device); peer_device 2050 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device; peer_device 2054 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2055 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device; peer_device 2166 drivers/block/drbd/drbd_worker.c struct drbd_peer_device *peer_device; peer_device 2221 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { peer_device 2222 drivers/block/drbd/drbd_worker.c struct drbd_device *device = peer_device->device;