| 491 | } |
| 492 | |
| 493 | static int |
| 494 | resize_hugefile(int fd, uint64_t fa_offset, uint64_t page_sz, bool grow, |
| 495 | bool *dirty) |
| 496 | { |
| 497 | /* in-memory mode is a special case, because we can be sure that |
| 498 | * fallocate() is supported. |
| 499 | */ |
| 500 | const struct internal_config *internal_conf = |
| 501 | eal_get_internal_configuration(); |
| 502 | |
| 503 | if (internal_conf->in_memory) { |
| 504 | if (dirty != NULL) |
| 505 | *dirty = false; |
| 506 | return resize_hugefile_in_memory(fd, fa_offset, |
| 507 | page_sz, grow); |
| 508 | } |
| 509 | |
| 510 | return resize_hugefile_in_filesystem(fd, fa_offset, page_sz, |
| 511 | grow, dirty); |
| 512 | } |
| 513 | |
| 514 | static int |
| 515 | alloc_seg(struct rte_memseg *ms, void *addr, int socket_id, |
no test coverage detected