summaryrefslogtreecommitdiff
path: root/filehash.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-06-03 08:41:15 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-06-03 08:41:15 +0200
commitd6aed795f2e3e403828abf60874dd2d6e8342a1b (patch)
treebad7b79773f90a0f506e7ee6599719ddcff6a13f /filehash.c
parent5e0074c2bfa46deddbad3b524c253a63dba05e63 (diff)
downloadfio-d6aed795f2e3e403828abf60874dd2d6e8342a1b.tar.gz
fio-d6aed795f2e3e403828abf60874dd2d6e8342a1b.tar.bz2
Clean up file flags
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'filehash.c')
-rw-r--r--filehash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/filehash.c b/filehash.c
index dab60fe3..1df7db0c 100644
--- a/filehash.c
+++ b/filehash.c
@@ -22,10 +22,10 @@ void remove_file_hash(struct fio_file *f)
{
fio_mutex_down(hash_lock);
- if (f->flags & FIO_FILE_HASHED) {
+ if (fio_file_hashed(f)) {
assert(!flist_empty(&f->hash_list));
flist_del_init(&f->hash_list);
- f->flags &= ~FIO_FILE_HASHED;
+ fio_file_clear_hashed(f);
}
fio_mutex_up(hash_lock);
@@ -65,7 +65,7 @@ struct fio_file *add_file_hash(struct fio_file *f)
{
struct fio_file *alias;
- if (f->flags & FIO_FILE_HASHED)
+ if (fio_file_hashed(f))
return NULL;
INIT_FLIST_HEAD(&f->hash_list);
@@ -74,7 +74,7 @@ struct fio_file *add_file_hash(struct fio_file *f)
alias = __lookup_file_hash(f->file_name);
if (!alias) {
- f->flags |= FIO_FILE_HASHED;
+ fio_file_set_hashed(f);
flist_add_tail(&f->hash_list, &file_hash[hash(f->file_name)]);
}