Change ARRAY_SIZE to FIO_ARRAY_SIZE
[fio.git] / filesetup.c
index f4360a6f78e1b241dd15f43e49ccb0ade39baa6f..76b3f9359bad79b44b21d17a8edb74f869b15b7a 100644 (file)
@@ -231,13 +231,12 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
                                                break;
                                        log_info("fio: ENOSPC on laying out "
                                                 "file, stopping\n");
-                                       break;
                                }
                                td_verror(td, errno, "write");
                        } else
                                td_verror(td, EIO, "write");
 
-                       break;
+                       goto err;
                }
        }
 
@@ -816,7 +815,7 @@ static unsigned long long get_fs_free_counts(struct thread_data *td)
                } else if (f->filetype != FIO_TYPE_FILE)
                        continue;
 
-               snprintf(buf, ARRAY_SIZE(buf), "%s", f->file_name);
+               snprintf(buf, FIO_ARRAY_SIZE(buf), "%s", f->file_name);
 
                if (stat(buf, &sb) < 0) {
                        if (errno != ENOENT)
@@ -839,7 +838,7 @@ static unsigned long long get_fs_free_counts(struct thread_data *td)
                        continue;
 
                fm = calloc(1, sizeof(*fm));
-               snprintf(fm->__base, ARRAY_SIZE(fm->__base), "%s", buf);
+               snprintf(fm->__base, FIO_ARRAY_SIZE(fm->__base), "%s", buf);
                fm->base = basename(fm->__base);
                fm->key = sb.st_dev;
                flist_add(&fm->list, &list);
@@ -1200,7 +1199,7 @@ int setup_files(struct thread_data *td)
                o->size = total_size;
 
        if (o->size < td_min_bs(td)) {
-               log_err("fio: blocksize too large for data set\n");
+               log_err("fio: blocksize is larger than data set range\n");
                goto err_out;
        }