dovecot-2.2: lib-fs: Minor code cleanup: Merge read_counted & pr...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 6 09:52:36 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/03d9e1e6caaa
changeset: 18299:03d9e1e6caaa
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 06 11:51:55 2015 +0200
description:
lib-fs: Minor code cleanup: Merge read_counted & prefetch_counted into read_or_prefetch_counted
diffstat:
src/lib-fs/fs-api-private.h | 3 +--
src/lib-fs/fs-api.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (67 lines):
diff -r 03931c3b43b5 -r 03d9e1e6caaa src/lib-fs/fs-api-private.h
--- a/src/lib-fs/fs-api-private.h Fri Mar 06 02:23:56 2015 +0200
+++ b/src/lib-fs/fs-api-private.h Fri Mar 06 11:51:55 2015 +0200
@@ -99,8 +99,7 @@
unsigned int write_pending:1;
unsigned int metadata_changed:1;
- unsigned int read_counted:1;
- unsigned int prefetch_counted:1;
+ unsigned int read_or_prefetch_counted:1;
unsigned int lookup_metadata_counted:1;
unsigned int stat_counted:1;
};
diff -r 03931c3b43b5 -r 03d9e1e6caaa src/lib-fs/fs-api.c
--- a/src/lib-fs/fs-api.c Fri Mar 06 02:23:56 2015 +0200
+++ b/src/lib-fs/fs-api.c Fri Mar 06 11:51:55 2015 +0200
@@ -269,7 +269,7 @@
fs_set_error(file->fs, "Metadata not supported by backend");
return -1;
}
- if (!file->read_counted && !file->prefetch_counted &&
+ if (!file->read_or_prefetch_counted &&
!file->lookup_metadata_counted) {
file->lookup_metadata_counted = TRUE;
file->fs->stats.lookup_metadata_count++;
@@ -341,8 +341,8 @@
{
bool ret;
- if (!file->read_counted && !file->prefetch_counted) {
- file->prefetch_counted = TRUE;
+ if (!file->read_or_prefetch_counted) {
+ file->read_or_prefetch_counted = TRUE;
file->fs->stats.prefetch_count++;
}
T_BEGIN {
@@ -383,8 +383,8 @@
{
int ret;
- if (!file->read_counted && !file->prefetch_counted) {
- file->read_counted = TRUE;
+ if (!file->read_or_prefetch_counted) {
+ file->read_or_prefetch_counted = TRUE;
file->fs->stats.read_count++;
}
@@ -408,8 +408,8 @@
ssize_t ret;
bool want_seekable = FALSE;
- if (!file->read_counted && !file->prefetch_counted) {
- file->read_counted = TRUE;
+ if (!file->read_or_prefetch_counted) {
+ file->read_or_prefetch_counted = TRUE;
file->fs->stats.read_count++;
}
@@ -639,7 +639,7 @@
{
int ret;
- if (!file->read_counted && !file->prefetch_counted &&
+ if (!file->read_or_prefetch_counted &&
!file->lookup_metadata_counted && !file->stat_counted) {
file->stat_counted = TRUE;
file->fs->stats.stat_count++;
More information about the dovecot-cvs
mailing list