From: Tomohiro Kusumi Date: Wed, 10 Jun 2015 17:46:31 +0000 (+0900) Subject: Rename get_fs_size() to get_fs_free_size() X-Git-Tag: fio-2.2.9~7 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c08ad04c17e63c275ff477b21460ed6fa3b493f9 Rename get_fs_size() to get_fs_free_size() get_fs_free_size() seems to be an appropriate name considering these functions on various os return filesystem's free space by computing (block_size * number_of_free_blocks) via statfs(2) or statvfs(2). Also the caller of this function is get_fs_free_counts(). --- diff --git a/filesetup.c b/filesetup.c index 51efdf76..212a126b 100644 --- a/filesetup.c +++ b/filesetup.c @@ -732,7 +732,7 @@ static unsigned long long get_fs_free_counts(struct thread_data *td) fm = flist_entry(n, struct fio_mount, list); flist_del(&fm->list); - sz = get_fs_size(fm->base); + sz = get_fs_free_size(fm->base); if (sz && sz != -1ULL) ret += sz; diff --git a/os/os-android.h b/os/os-android.h index b4f4f134..1699539c 100644 --- a/os/os-android.h +++ b/os/os-android.h @@ -238,7 +238,7 @@ static inline int arch_cache_line_size(void) return atoi(size); } -static inline unsigned long long get_fs_size(const char *path) +static inline unsigned long long get_fs_free_size(const char *path) { unsigned long long ret; struct statfs s; diff --git a/os/os-dragonfly.h b/os/os-dragonfly.h index f101429f..2a2b198f 100644 --- a/os/os-dragonfly.h +++ b/os/os-dragonfly.h @@ -52,7 +52,7 @@ static inline int gettid(void) return (int) lwp_gettid(); } -static inline unsigned long long get_fs_size(const char *path) +static inline unsigned long long get_fs_free_size(const char *path) { unsigned long long ret; struct statvfs s; diff --git a/os/os-freebsd.h b/os/os-freebsd.h index 19ec54e8..fa00bb80 100644 --- a/os/os-freebsd.h +++ b/os/os-freebsd.h @@ -101,7 +101,7 @@ static inline int gettid(void) return (int) lwpid; } -static inline unsigned long long get_fs_size(const char *path) +static inline unsigned long long get_fs_free_size(const char *path) { unsigned long long ret; struct statvfs s; diff --git a/os/os-linux.h b/os/os-linux.h index b786393f..9e708f04 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -247,7 +247,7 @@ static inline int arch_cache_line_size(void) return atoi(size); } -static inline unsigned long long get_fs_size(const char *path) +static inline unsigned long long get_fs_free_size(const char *path) { unsigned long long ret; struct statfs s; diff --git a/os/os.h b/os/os.h index 250b71f4..f809a366 100644 --- a/os/os.h +++ b/os/os.h @@ -332,7 +332,7 @@ static inline int init_random_state(struct thread_data *td, unsigned long *rand_ #endif #ifndef FIO_HAVE_FS_STAT -static inline unsigned long long get_fs_size(const char *path) +static inline unsigned long long get_fs_free_size(const char *path) { return 0; }