Lines Matching refs:fiemap
43 #include <ext2fs/fiemap.h>
58 #define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
169 struct fiemap *fiemap = (struct fiemap *)buf;
170 struct fiemap_extent *fm_ext = &fiemap->fm_extents[0];
171 int count = (sizeof(buf) - sizeof(*fiemap)) /
182 fiemap->fm_length = ~0ULL;
184 memset(fiemap, 0, sizeof(struct fiemap));
196 fiemap->fm_length = ~0ULL;
197 fiemap->fm_flags = flags;
198 fiemap->fm_extent_count = count;
199 rc = ioctl(fd, FS_IOC_FIEMAP, (unsigned long) fiemap);
202 printf("FIEMAP failed with unsupported "
203 "flags %x\n", fiemap->fm_flags);
217 *num_extents = fiemap->fm_mapped_extents;
222 if (fiemap->fm_mapped_extents == 0)
225 for (i = 0; i < fiemap->fm_mapped_extents; i++) {
245 fiemap->fm_start = (fm_ext[i-1].fe_logical +