Searched refs:fiemap (Results 1 – 3 of 3) sorted by relevance
/systemd-251/src/shared/ |
D | sleep-config.c | 235 _cleanup_free_ struct fiemap *fiemap = NULL; in calculate_swap_file_offset() local 259 r = read_fiemap(fd, &fiemap); in calculate_swap_file_offset() 263 *ret_offset = fiemap->fm_extents[0].fe_physical / page_size(); in calculate_swap_file_offset() 514 int read_fiemap(int fd, struct fiemap **ret) { in read_fiemap() 515 _cleanup_free_ struct fiemap *fiemap = NULL, *result_fiemap = NULL; in read_fiemap() local 519 const size_t n_extra = DIV_ROUND_UP(sizeof(struct fiemap), sizeof(struct fiemap_extent)); in read_fiemap() 528 fiemap = calloc(n_extra, sizeof(struct fiemap_extent)); in read_fiemap() 529 if (!fiemap) in read_fiemap() 542 *fiemap = (struct fiemap) { in read_fiemap() 549 if (ioctl(fd, FS_IOC_FIEMAP, fiemap) < 0) in read_fiemap() [all …]
|
D | sleep-config.h | 51 int read_fiemap(int fd, struct fiemap **ret);
|
/systemd-251/src/test/ |
D | test-sleep.c | 46 _cleanup_free_ struct fiemap *fiemap = NULL; in test_fiemap_one() local 55 r = read_fiemap(fd, &fiemap); in test_fiemap_one() 61 log_info("\t start: %" PRIu64, (uint64_t) fiemap->fm_start); in test_fiemap_one() 62 log_info("\t length: %" PRIu64, (uint64_t) fiemap->fm_length); in test_fiemap_one() 63 log_info("\t flags: %" PRIu32, fiemap->fm_flags); in test_fiemap_one() 64 log_info("\t number of mapped extents: %" PRIu32, fiemap->fm_mapped_extents); in test_fiemap_one() 65 log_info("\t extent count: %" PRIu32, fiemap->fm_extent_count); in test_fiemap_one() 66 if (fiemap->fm_extent_count > 0) in test_fiemap_one() 68 (uint64_t) (fiemap->fm_extents[0].fe_physical / page_size())); in test_fiemap_one() 73 TEST_RET(fiemap) { in TEST_RET() argument
|