Changeset dfa2313 in mainline
- Timestamp:
- 2024-11-15T21:21:29Z (6 months ago)
- Children:
- d199a6f
- Parents:
- 64eba57
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hrctl/hrctl.c
r64eba57 rdfa2313 357 357 } 358 358 359 if (cfg->dev_no > HR_MAX DEVS) {359 if (cfg->dev_no > HR_MAX_EXTENTS) { 360 360 printf("hrctl: too many devices, exiting\n"); 361 361 goto bad; -
uspace/lib/device/include/hr.h
r64eba57 rdfa2313 42 42 43 43 /* for now */ 44 #define HR_MAX DEVS 444 #define HR_MAX_EXTENTS 4 45 45 46 46 #define HR_DEVNAME_LEN 32 … … 72 72 typedef struct hr_config { 73 73 char devname[HR_DEVNAME_LEN]; 74 service_id_t devs[HR_MAX DEVS];74 service_id_t devs[HR_MAX_EXTENTS]; 75 75 size_t dev_no; 76 76 hr_level_t level; … … 83 83 84 84 typedef struct hr_vol_info { 85 hr_extent_t extents[HR_MAX DEVS];85 hr_extent_t extents[HR_MAX_EXTENTS]; 86 86 size_t extent_no; 87 87 service_id_t svc_id; -
uspace/srv/bd/hr/hr.c
r64eba57 rdfa2313 312 312 list_foreach(hr_volumes, lvolumes, hr_volume_t, vol) { 313 313 memcpy(info.extents, vol->extents, 314 sizeof(hr_extent_t) * HR_MAX DEVS);314 sizeof(hr_extent_t) * HR_MAX_EXTENTS); 315 315 info.svc_id = vol->svc_id; 316 316 info.extent_no = vol->dev_no; -
uspace/srv/bd/hr/superblock.c
r64eba57 rdfa2313 131 131 return ENOMEM; 132 132 133 service_id_t cfg_svc_id_order[HR_MAX DEVS] = { 0 };133 service_id_t cfg_svc_id_order[HR_MAX_EXTENTS] = { 0 }; 134 134 for (size_t i = 0; i < vol->dev_no; i++) 135 135 cfg_svc_id_order[i] = vol->extents[i].svc_id; 136 136 137 int32_t md_order[HR_MAX DEVS] = { 0 };137 int32_t md_order[HR_MAX_EXTENTS] = { 0 }; 138 138 for (size_t i = 0; i < vol->dev_no; i++) { 139 139 if (cfg_svc_id_order[i] == 0) { -
uspace/srv/bd/hr/var.h
r64eba57 rdfa2313 58 58 fibril_mutex_t lock; 59 59 char devname[HR_DEVNAME_LEN]; 60 hr_extent_t extents[HR_MAX DEVS];60 hr_extent_t extents[HR_MAX_EXTENTS]; 61 61 uint64_t nblocks; 62 62 uint64_t data_blkno;
Note:
See TracChangeset
for help on using the changeset viewer.