Rename get_fs_size() to get_fs_free_size()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 10 Jun 2015 17:46:31 +0000 (02:46 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 11 Jun 2015 11:15:54 +0000 (20:15 +0900)
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().

filesetup.c
os/os-android.h
os/os-dragonfly.h
os/os-freebsd.h
os/os-linux.h
os/os.h

index 51efdf768d3068b1ac6a895b03adfaa4678f54c6..212a126b94aed73c83319763298f573051af4413 100644 (file)
@@ -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;
 
index b4f4f13437bcd60c5afe8bd9514860f83f3feca1..1699539cad2a1a525cbec6f98f8ee449f16004af 100644 (file)
@@ -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;
index f101429fadc1064223502af3c827bc86c90a57ed..2a2b198f375059551e9063bd87f2987e87d17169 100644 (file)
@@ -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;
index 19ec54e813001df73c363db34be899b141d7296a..fa00bb8001a230af4edc4d76c08553299f5f9f07 100644 (file)
@@ -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;
index b786393f77d9ed6e596de5b63d20b7b1707d9a51..9e708f04c7b020f466decf189909ff3e9df2d6c6 100644 (file)
@@ -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 250b71f4729a1575e0016e52a69365f5e1af7624..f809a366ca35f354a2219dbb8497761f796f0f2b 100644 (file)
--- 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;
 }