Lines Matching refs:fiemap_buf
498 struct fiemap fiemap_buf; in file_frag_count() local
503 memset(&fiemap_buf, 0, sizeof(struct fiemap)); in file_frag_count()
504 fiemap_buf.fm_start = 0; in file_frag_count()
505 fiemap_buf.fm_length = FIEMAP_MAX_OFFSET; in file_frag_count()
506 fiemap_buf.fm_flags |= FIEMAP_FLAG_SYNC; in file_frag_count()
508 ret = ioctl(fd, FS_IOC_FIEMAP, &fiemap_buf); in file_frag_count()
512 return fiemap_buf.fm_mapped_extents; in file_frag_count()
795 struct fiemap *fiemap_buf = NULL; in get_file_extents() local
809 fiemap_buf = malloc(fie_buf_size); in get_file_extents()
810 if (fiemap_buf == NULL) in get_file_extents()
813 ext_buf = fiemap_buf->fm_extents; in get_file_extents()
814 memset(fiemap_buf, 0, fie_buf_size); in get_file_extents()
815 fiemap_buf->fm_length = FIEMAP_MAX_OFFSET; in get_file_extents()
816 fiemap_buf->fm_flags |= FIEMAP_FLAG_SYNC; in get_file_extents()
817 fiemap_buf->fm_extent_count = EXTENT_MAX_COUNT; in get_file_extents()
820 fiemap_buf->fm_start = pos; in get_file_extents()
822 ret = ioctl(fd, FS_IOC_FIEMAP, fiemap_buf); in get_file_extents()
823 if (ret < 0 || fiemap_buf->fm_mapped_extents == 0) in get_file_extents()
825 for (i = 0; i < fiemap_buf->fm_mapped_extents; i++) { in get_file_extents()
852 } while (fiemap_buf->fm_mapped_extents in get_file_extents()
857 FREE(fiemap_buf); in get_file_extents()
860 FREE(fiemap_buf); in get_file_extents()