[lustre-discuss] fiemap problems
John Bauer
bauerj at iodoctors.com
Fri Jul 22 16:08:32 PDT 2016
I am experiencing an intermittent problem with fiemap on Lustre. This is
running on pleiades NASA Ames.
lustre: 2.7.1
kernel: 3.0.101-68.1.20160209-nasa
build: 2.7.1-3nasC_mofed31v5
I create a file with *dd if=/dev/zero of=${FILE} count=100 bs=1M* and
then run my program to do the fcntl call to get the fiemap. About 1 out
of 10 times the contents of the fiemap has an extra extent in it. The
bad extent info is only generated when run immediately after the file is
created by dd. All subsequent runs of my simple program report the
correct extent info. Any ideas?
Thanks, John
incorrect immediately after creation
listExtents() fe_device=132 fe_length=2097152
listExtents() fe_device=132 fe_length=12582912
listExtents() fe_device=105 fe_length=8388608
listExtents() fe_device=105 fe_length=6291456
listExtents() fe_device=36 fe_length=12582912
listExtents() fe_device=48 fe_length=4194304
listExtents() fe_device=48 fe_length=8388608
listExtents() fe_device=47 fe_length=2097152
listExtents() fe_device=47 fe_length=10485760
listExtents() fe_device=201 fe_length=1048576
listExtents() fe_device=201 fe_length=11534336
*listExtents() fe_device=59 fe_length=4194304
listExtents() fe_device=59 fe_length=6291456
listExtents() fe_device=59 fe_length=8388608*
listExtents() fe_device=218 fe_length=12582912
listExtents() nMapped=15 byteCount=111149056
correct: all subsequent runs
listExtents() fe_device=132 fe_length=2097152
listExtents() fe_device=132 fe_length=12582912
listExtents() fe_device=105 fe_length=8388608
listExtents() fe_device=105 fe_length=6291456
listExtents() fe_device=36 fe_length=12582912
listExtents() fe_device=48 fe_length=4194304
listExtents() fe_device=48 fe_length=8388608
listExtents() fe_device=47 fe_length=2097152
listExtents() fe_device=47 fe_length=10485760
listExtents() fe_device=201 fe_length=1048576
listExtents() fe_device=201 fe_length=11534336
*listExtents() fe_device=59 fe_length=4194304
listExtents() fe_device=59 fe_length=8388608*
listExtents() fe_device=218 fe_length=12582912
listExtents() nMapped=14 byteCount=104857600
int rc = ioctl(info->fd, FS_IOC_FIEMAP, (unsigned long) fiemap);
if (rc < 0) {
fprintf(stderr,"ioctl(FS_IOC_FIEMAP) error %s\n",strerror(errno));
return -1 ;
}
listExtents( fiemap ) ;
int
listExtents( struct fiemap *fiemap ){
int i ;
int nMapped = fiemap->fm_mapped_extents ;
long long byteCount = 0 ;
for(i=0;i<nMapped;i++){
struct fiemap_extent *cur = fiemap->fm_extents+i;
byteCount += cur->fe_length ;
fprintf(stderr,"%s() fe_device=%d
fe_length=%lld\n",__func__,cur->fe_device,cur->fe_length);
}
fprintf(stderr,"%s() nMapped=%d
byteCount=%lld\n",__func__,nMapped,byteCount);
--
I/O Doctors, LLC
507-766-0378
bauerj at iodoctors.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20160722/deb8df89/attachment.htm>
More information about the lustre-discuss
mailing list