Changeset 31eb568 in mainline
- Timestamp:
- 2025-05-06T22:27:00Z (5 weeks ago)
- Children:
- ac4b70b
- Parents:
- 13c2365
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/hr.c
r13c2365 r31eb568 31 31 */ 32 32 /** 33 * @file 33 * @file hr.c 34 * @brief HelenRAID server methods. 34 35 */ 35 36 … … 40 41 #include <hr.h> 41 42 #include <io/log.h> 42 #include <inttypes.h>43 43 #include <ipc/hr.h> 44 44 #include <ipc/services.h> 45 45 #include <loc.h> 46 46 #include <task.h> 47 #include <stdatomic.h>48 47 #include <stdio.h> 49 48 #include <stdlib.h> … … 52 51 #include <block.h> 53 52 54 #include "fge.h"55 #include "io.h"56 #include "superblock.h"57 53 #include "util.h" 58 54 #include "var.h" … … 64 60 static void hr_add_hotspare_srv(ipc_call_t *); 65 61 static void hr_print_status_srv(ipc_call_t *); 66 static void hr_ctl_conn(ipc_call_t * , void *);62 static void hr_ctl_conn(ipc_call_t *); 67 63 static void hr_client_conn(ipc_call_t *, void *); 68 64 … … 73 69 static service_id_t ctl_sid; 74 70 71 /** Volume creation (server). 72 * 73 * Creates HelenRAID volume from parameters and 74 * devices specified in hr_config_t. 75 * 76 * @param icall hr_config_t 77 */ 75 78 static void hr_create_srv(ipc_call_t *icall) 76 79 { … … 175 178 } 176 179 180 /** Manual volume assembly (server). 181 * 182 * Tries to assemble a volume from devices in hr_config_t and 183 * sends the number of successful volumes assembled back to the 184 * client. 185 * 186 * @param icall hr_config_t 187 */ 177 188 static void hr_assemble_srv(ipc_call_t *icall) 178 189 { … … 234 245 } 235 246 247 /** Automatic volume assembly (server). 248 * 249 * Tries to assemble a volume from devices in disk location 250 * category and sends the number of successful volumes assembled 251 * back to client. 252 */ 236 253 static void hr_auto_assemble_srv(ipc_call_t *icall) 237 254 { … … 269 286 } 270 287 288 /** Volume deactivation (server). 289 * 290 * Deactivates/detaches specified volume. 291 */ 271 292 static void hr_stop_srv(ipc_call_t *icall) 272 293 { … … 290 311 } 291 312 313 /** Automatic volume deactivation (server). 314 * 315 * Tries to deactivate/detach all volumes. 316 */ 292 317 static void hr_stop_all_srv(ipc_call_t *icall) 293 318 { … … 316 341 } 317 342 343 /** Simulate volume extent failure (server). 344 * 345 * Changes the specified extent's state to FAULTY. 346 * Other extents' metadata are marked as dirty, therefore 347 * it effectively invalides the specified extent as well 348 * for further uses. 349 */ 318 350 static void hr_fail_extent_srv(ipc_call_t *icall) 319 351 { … … 347 379 } 348 380 381 /** Add hotspare to volume (server). 382 * 383 * Adds hotspare to a volume. 384 */ 349 385 static void hr_add_hotspare_srv(ipc_call_t *icall) 350 386 { … … 378 414 } 379 415 416 /** Volume state printing (server). 417 * 418 * Prints info about all active volumes. 419 */ 380 420 static void hr_print_status_srv(ipc_call_t *icall) 381 421 { … … 447 487 } 448 488 449 static void hr_ctl_conn(ipc_call_t *icall, void *arg) 489 /** HelenRAID server control IPC methods crossroad. 490 */ 491 static void hr_ctl_conn(ipc_call_t *icall) 450 492 { 451 493 HR_DEBUG("%s()", __func__); … … 494 536 } 495 537 538 /** HelenRAID server IPC method crossroad. 539 * 540 * Distinguishes between control IPC and block device 541 * IPC calls. 542 */ 496 543 static void hr_client_conn(ipc_call_t *icall, void *arg) 497 544 { … … 503 550 504 551 if (svc_id == ctl_sid) { 505 hr_ctl_conn(icall , arg);552 hr_ctl_conn(icall); 506 553 } else { 507 HR_DEBUG("bd_conn()\n");508 554 vol = hr_get_volume(svc_id); 509 555 if (vol == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.