Lines Matching refs:fds
118 fdidpair *fds; in main() local
257 if ((nfd = open_device(&fds, name)) < 1) { in main()
259 free(fds); in main()
284 add_hot_spare(fds, component); in main()
287 remove_hot_spare(fds, component); in main()
290 rf_configure(fds, config_filename, force); in main()
293 set_autoconfig(fds, autoconf); in main()
298 do_ioctl(fds[i].fd, RAIDFRAME_COPYBACK, NULL, in main()
305 rf_fail_disk(fds, component, do_recon); in main()
308 set_component_label(fds, component); in main()
311 get_component_label(fds, component); in main()
314 init_component_labels(fds, serial_number); in main()
319 do_ioctl(fds[i].fd, RAIDFRAME_REWRITEPARITY, NULL, in main()
326 check_status(fds, nfd, 1); in main()
330 rf_output_configuration(fds, nfd); in main()
332 rf_get_device_status(fds, nfd); in main()
335 rebuild_in_place(fds, component); in main()
338 check_parity(fds, nfd, do_rewrite); in main()
343 do_ioctl(fds[i].fd, RAIDFRAME_SHUTDOWN, NULL, in main()
354 do_meter(fds, nfd, meter); in main()
359 close(fds[i].fd); in main()
361 free(fds); in main()
374 rf_configure(fdidpair *fds, char *config_file, int force) in rf_configure() argument
391 do_ioctl(fds->fd, RAIDFRAME_CONFIGURE, &generic, "RAIDFRAME_CONFIGURE"); in rf_configure()
420 rf_get_device_status(fdidpair *fds, int nfd) in rf_get_device_status() argument
431 do_ioctl(fds[i].fd, RAIDFRAME_GET_INFO, &cfg_ptr, in rf_get_device_status()
434 printf("raid%d Components:\n", fds[i].id); in rf_get_device_status()
453 get_component_label(&fds[i], in rf_get_device_status()
469 get_component_label(&fds[i], in rf_get_device_status()
481 do_ioctl(fds[i].fd, RAIDFRAME_CHECK_PARITY, &is_clean, in rf_get_device_status()
488 check_status(&fds[i], 1, 0); in rf_get_device_status()
493 rf_output_configuration(fdidpair *fds, int nfd) in rf_output_configuration() argument
508 snprintf(name, PATH_MAX, "/dev/raid%dc", fds[i].id); in rf_output_configuration()
512 do_ioctl(fds[i].fd, RAIDFRAME_GET_INFO, &cfg_ptr, in rf_output_configuration()
542 get_component_number(&fds[i], device_config.devs[j].devname, in rf_output_configuration()
548 do_ioctl(fds[i].fd, RAIDFRAME_GET_COMPONENT_LABEL, &label_ptr, in rf_output_configuration()
568 get_component_number(fdidpair *fds, char *component_name, int *component_number, in get_component_number() argument
580 do_ioctl(fds->fd, RAIDFRAME_GET_INFO, &cfg_ptr, "RAIDFRAME_GET_INFO"); in get_component_number()
612 rf_fail_disk(fdidpair *fds, char *component_to_fail, int do_recon) in rf_fail_disk() argument
618 get_component_number(fds, component_to_fail, &component_num, &num_cols); in rf_fail_disk()
627 do_ioctl(fds->fd, RAIDFRAME_FAIL_DISK, &recon_request, in rf_fail_disk()
632 do_meter(fds, 1, RAIDFRAME_CHECK_RECON_STATUS_EXT); in rf_fail_disk()
637 get_component_label(fdidpair *fds, char *component) in get_component_label() argument
644 get_component_number(fds, component, &component_num, &num_cols); in get_component_label()
651 do_ioctl(fds->fd, RAIDFRAME_GET_COMPONENT_LABEL, &label_ptr, in get_component_label()
680 set_component_label(fdidpair *fds, char *component) in set_component_label() argument
686 get_component_number(fds, component, &component_num, &num_cols); in set_component_label()
700 do_ioctl(fds->fd, RAIDFRAME_SET_COMPONENT_LABEL, &component_label, in set_component_label()
706 init_component_labels(fdidpair *fds, int serial_number) in init_component_labels() argument
720 do_ioctl(fds->fd, RAIDFRAME_INIT_LABELS, &component_label, in init_component_labels()
725 set_autoconfig(fdidpair *fds, char *autoconf) in set_autoconfig() argument
742 do_ioctl(fds->fd, RAIDFRAME_SET_AUTOCONFIG, &auto_config, in set_autoconfig()
745 do_ioctl(fds->fd, RAIDFRAME_SET_ROOT, &root_config, in set_autoconfig()
748 printf("raid%d: Autoconfigure: %s\n", fds->id, in set_autoconfig()
752 printf("raid%d: Root: %s\n", fds->id, in set_autoconfig()
758 add_hot_spare(fdidpair *fds, char *component) in add_hot_spare() argument
767 do_ioctl(fds->fd, RAIDFRAME_ADD_HOT_SPARE, &hot_spare, in add_hot_spare()
772 remove_hot_spare(fdidpair *fds, char *component) in remove_hot_spare() argument
778 get_component_number(fds, component, &component_num, &num_cols); in remove_hot_spare()
786 do_ioctl(fds->fd, RAIDFRAME_REMOVE_HOT_SPARE, &hot_spare, in remove_hot_spare()
791 rebuild_in_place(fdidpair *fds, char *component) in rebuild_in_place() argument
797 get_component_number(fds, component, &component_num, &num_cols); in rebuild_in_place()
803 do_ioctl(fds->fd, RAIDFRAME_REBUILD_IN_PLACE, &comp, in rebuild_in_place()
809 do_meter(fds, 1, RAIDFRAME_CHECK_RECON_STATUS_EXT); in rebuild_in_place()
815 check_parity(fdidpair *fds, int nfd, int do_rewrite) in check_parity() argument
826 snprintf(dev_name, PATH_MAX, "raid%d", fds[i].id); in check_parity()
828 do_ioctl(fds[i].fd, RAIDFRAME_CHECK_PARITY, &is_clean, in check_parity()
833 all_dirty |= 1 << fds[i].id; in check_parity()
838 do_ioctl(fds[i].fd, RAIDFRAME_REWRITEPARITY, in check_parity()
855 do_meter(fds, nfd, in check_parity()
861 do_ioctl(fds[i].fd, in check_parity()
867 all_dirty &= ~(1 << fds[i].id); in check_parity()
878 check_status(fdidpair *fds, int nfd, int meter) in check_status() argument
892 printf("raid%d Status:\n", fds[i].id); in check_status()
894 do_ioctl(fds[i].fd, RAIDFRAME_CHECK_RECON_STATUS, in check_status()
900 do_recon |= 1 << fds[i].id; in check_status()
902 do_ioctl(fds[i].fd, RAIDFRAME_CHECK_PARITYREWRITE_STATUS, in check_status()
908 do_parity |= 1 << fds[i].id; in check_status()
910 do_ioctl(fds[i].fd, RAIDFRAME_CHECK_COPYBACK_STATUS, in check_status()
916 do_copyback |= 1 << fds[i].id; in check_status()
932 do_meter(fds, nfd, check); in check_status()
939 do_meter(fdidpair *fds, int nfd, u_long option) in do_meter() argument
978 do_ioctl(fds[i].fd, option, &pInfoPtr, ""); in do_meter()
995 do_ioctl(fds[i].fd, option, &pInfoPtr, ""); in do_meter()