Error out if the set blocksize is larger than the file size
[fio.git] / filesetup.c
index 60e79474d2cba91b465c4aca3c34749096c2fbce..79eea9f879fb42b1f21607e5fe4df1fe4d498cd5 100644 (file)
@@ -885,6 +885,11 @@ int setup_files(struct thread_data *td)
        if (!o->size || o->size > total_size)
                o->size = total_size;
 
+       if (o->size < td_min_bs(td)) {
+               log_err("fio: blocksize too large for data set\n");
+               goto err_out;
+       }
+
        /*
         * See if we need to extend some files
         */