Lines Matching refs:cmsg
514 static int process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg) in process_add_new_disk() argument
525 sprintf(disk_uuid + len, "%pU", cmsg->uuid); in process_add_new_disk()
526 snprintf(raid_slot, 16, "RAID_DISK=%d", le32_to_cpu(cmsg->raid_slot)); in process_add_new_disk()
759 static int __sendmsg(struct md_cluster_info *cinfo, struct cluster_msg *cmsg) in __sendmsg() argument
764 cmsg->slot = cpu_to_le32(slot); in __sendmsg()
772 memcpy(cinfo->message_lockres->lksb.sb_lvbptr, (void *)cmsg, in __sendmsg()
806 static int sendmsg(struct md_cluster_info *cinfo, struct cluster_msg *cmsg, in sendmsg() argument
813 ret = __sendmsg(cinfo, cmsg); in sendmsg()
1004 struct cluster_msg cmsg = {0}; in resync_bitmap() local
1007 cmsg.type = cpu_to_le32(BITMAP_NEEDS_SYNC); in resync_bitmap()
1008 err = sendmsg(cinfo, &cmsg, 1); in resync_bitmap()
1099 struct cluster_msg cmsg; in metadata_update_finish() local
1104 memset(&cmsg, 0, sizeof(cmsg)); in metadata_update_finish()
1105 cmsg.type = cpu_to_le32(METADATA_UPDATED); in metadata_update_finish()
1114 cmsg.raid_slot = cpu_to_le32(raid_slot); in metadata_update_finish()
1115 ret = __sendmsg(cinfo, &cmsg); in metadata_update_finish()
1133 struct cluster_msg cmsg = {0}; in update_bitmap_size() local
1136 cmsg.type = cpu_to_le32(BITMAP_RESIZE); in update_bitmap_size()
1137 cmsg.high = cpu_to_le64(size); in update_bitmap_size()
1138 ret = sendmsg(cinfo, &cmsg, 0); in update_bitmap_size()
1293 struct cluster_msg cmsg; in update_size() local
1304 memset(&cmsg, 0, sizeof(cmsg)); in update_size()
1305 cmsg.type = cpu_to_le32(METADATA_UPDATED); in update_size()
1312 cmsg.raid_slot = cpu_to_le32(raid_slot); in update_size()
1318 ret = __sendmsg(cinfo, &cmsg); in update_size()
1337 memset(&cmsg, 0, sizeof(cmsg)); in update_size()
1338 cmsg.type = cpu_to_le32(CHANGE_CAPACITY); in update_size()
1339 ret = __sendmsg(cinfo, &cmsg); in update_size()
1347 ret = __sendmsg(cinfo, &cmsg); in update_size()
1381 struct cluster_msg cmsg = {0}; in resync_start_notify() local
1383 cmsg.type = cpu_to_le32(RESYNCING_START); in resync_start_notify()
1385 return sendmsg(cinfo, &cmsg, 0); in resync_start_notify()
1392 struct cluster_msg cmsg = {0}; in resync_info_update() local
1404 cmsg.type = cpu_to_le32(RESYNCING); in resync_info_update()
1405 cmsg.low = cpu_to_le64(lo); in resync_info_update()
1406 cmsg.high = cpu_to_le64(hi); in resync_info_update()
1413 return sendmsg(cinfo, &cmsg, 1); in resync_info_update()
1415 return sendmsg(cinfo, &cmsg, 0); in resync_info_update()
1459 struct cluster_msg cmsg; in add_new_disk() local
1464 memset(&cmsg, 0, sizeof(cmsg)); in add_new_disk()
1465 cmsg.type = cpu_to_le32(NEWDISK); in add_new_disk()
1466 memcpy(cmsg.uuid, uuid, 16); in add_new_disk()
1467 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in add_new_disk()
1470 ret = __sendmsg(cinfo, &cmsg); in add_new_disk()
1527 struct cluster_msg cmsg = {0}; in remove_disk() local
1529 cmsg.type = cpu_to_le32(REMOVE); in remove_disk()
1530 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in remove_disk()
1531 return sendmsg(cinfo, &cmsg, 1); in remove_disk()
1590 struct cluster_msg cmsg = {0}; in gather_bitmaps() local
1594 cmsg.type = cpu_to_le32(RE_ADD); in gather_bitmaps()
1595 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in gather_bitmaps()
1596 err = sendmsg(cinfo, &cmsg, 1); in gather_bitmaps()