Lines Matching refs:cmsg
504 static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg) in process_add_new_disk() argument
514 sprintf(disk_uuid + len, "%pU", cmsg->uuid); in process_add_new_disk()
515 snprintf(raid_slot, 16, "RAID_DISK=%d", le32_to_cpu(cmsg->raid_slot)); in process_add_new_disk()
731 static int __sendmsg(struct md_cluster_info *cinfo, struct cluster_msg *cmsg) in __sendmsg() argument
736 cmsg->slot = cpu_to_le32(slot); in __sendmsg()
744 memcpy(cinfo->message_lockres->lksb.sb_lvbptr, (void *)cmsg, in __sendmsg()
782 static int sendmsg(struct md_cluster_info *cinfo, struct cluster_msg *cmsg, in sendmsg() argument
788 ret = __sendmsg(cinfo, cmsg); in sendmsg()
977 struct cluster_msg cmsg = {0}; in resync_bitmap() local
980 cmsg.type = cpu_to_le32(BITMAP_NEEDS_SYNC); in resync_bitmap()
981 err = sendmsg(cinfo, &cmsg, 1); in resync_bitmap()
1072 struct cluster_msg cmsg; in metadata_update_finish() local
1077 memset(&cmsg, 0, sizeof(cmsg)); in metadata_update_finish()
1078 cmsg.type = cpu_to_le32(METADATA_UPDATED); in metadata_update_finish()
1087 cmsg.raid_slot = cpu_to_le32(raid_slot); in metadata_update_finish()
1088 ret = __sendmsg(cinfo, &cmsg); in metadata_update_finish()
1106 struct cluster_msg cmsg = {0}; in update_bitmap_size() local
1109 cmsg.type = cpu_to_le32(BITMAP_RESIZE); in update_bitmap_size()
1110 cmsg.high = cpu_to_le64(size); in update_bitmap_size()
1111 ret = sendmsg(cinfo, &cmsg, 0); in update_bitmap_size()
1250 struct cluster_msg cmsg; in update_size() local
1258 memset(&cmsg, 0, sizeof(cmsg)); in update_size()
1259 cmsg.type = cpu_to_le32(METADATA_UPDATED); in update_size()
1266 cmsg.raid_slot = cpu_to_le32(raid_slot); in update_size()
1272 ret = __sendmsg(cinfo, &cmsg); in update_size()
1291 memset(&cmsg, 0, sizeof(cmsg)); in update_size()
1292 cmsg.type = cpu_to_le32(CHANGE_CAPACITY); in update_size()
1293 ret = __sendmsg(cinfo, &cmsg); in update_size()
1304 ret = __sendmsg(cinfo, &cmsg); in update_size()
1332 struct cluster_msg cmsg = {0}; in resync_info_update() local
1344 cmsg.type = cpu_to_le32(RESYNCING); in resync_info_update()
1345 cmsg.low = cpu_to_le64(lo); in resync_info_update()
1346 cmsg.high = cpu_to_le64(hi); in resync_info_update()
1353 return sendmsg(cinfo, &cmsg, 1); in resync_info_update()
1355 return sendmsg(cinfo, &cmsg, 0); in resync_info_update()
1399 struct cluster_msg cmsg; in add_new_disk() local
1404 memset(&cmsg, 0, sizeof(cmsg)); in add_new_disk()
1405 cmsg.type = cpu_to_le32(NEWDISK); in add_new_disk()
1406 memcpy(cmsg.uuid, uuid, 16); in add_new_disk()
1407 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in add_new_disk()
1409 ret = __sendmsg(cinfo, &cmsg); in add_new_disk()
1466 struct cluster_msg cmsg = {0}; in remove_disk() local
1468 cmsg.type = cpu_to_le32(REMOVE); in remove_disk()
1469 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in remove_disk()
1470 return sendmsg(cinfo, &cmsg, 1); in remove_disk()
1528 struct cluster_msg cmsg = {0}; in gather_bitmaps() local
1532 cmsg.type = cpu_to_le32(RE_ADD); in gather_bitmaps()
1533 cmsg.raid_slot = cpu_to_le32(rdev->desc_nr); in gather_bitmaps()
1534 err = sendmsg(cinfo, &cmsg, 1); in gather_bitmaps()