X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Fcheckfiemap.c;h=2dea8128057cbd0976ea03d667663d6c80fe848c;hb=1fa0a984c5c3863d8f40b3b0d63c3d08cfa1a9f0;hp=cfb644591132bfe5eb2e011370df646fd2cfb9e4;hpb=1f1d3a376d488d715dd1b0c94d5b66ea05c1e6ca;p=fs%2Flustre-release.git diff --git a/lustre/tests/checkfiemap.c b/lustre/tests/checkfiemap.c index cfb6445..2dea812 100644 --- a/lustre/tests/checkfiemap.c +++ b/lustre/tests/checkfiemap.c @@ -38,11 +38,9 @@ #include #include #include - -#ifndef HAVE_FIEMAP -# include -# include -#endif +#include +#include +#include #ifndef FS_IOC_FIEMAP # define FS_IOC_FIEMAP (_IOWR('f', 11, struct fiemap)) @@ -67,7 +65,7 @@ int check_fiemap(int fd, long long orig_size) memset(&fiemap_buf, 0, sizeof(fiemap_buf)); fiemap->fm_start = 0; - fiemap->fm_flags = FIEMAP_FLAG_SYNC; + fiemap->fm_flags = (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_DEVICE_ORDER); fiemap->fm_extent_count = count; fiemap->fm_length = FIEMAP_MAX_OFFSET; @@ -103,8 +101,8 @@ int main(int argc, char **argv) { int c; struct option long_opts[] = { - {"test", no_argument, 0, 't'}, - {NULL, 0, NULL, 0} + { .name = "test", .has_arg = no_argument, .val = 't' }, + { .name = NULL } }; int fd; int rc;