misc: Return error if file is too big for FIBMAP

master
Vitaliy Filippov 2014-02-23 13:08:47 +04:00
parent e703ba4b42
commit 2051d63a83
1 changed files with 4 additions and 0 deletions

View File

@ -474,6 +474,10 @@ static int frag_report(const char *filename)
}
if (force_bmap || rc < 0) { /* FIEMAP failed, try FIBMAP instead */
if (numblocks > (unsigned long)-1L) {
fprintf(stderr, "%s: File too big to use FIBMAP\n", filename);
goto out_close;
}
expected = filefrag_fibmap(fd, blk_shift, &num_extents,
&st, numblocks, is_ext2);
if (expected < 0) {