aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-10 19:16:31 -0700
committerKent Overstreet <kmo@daterainc.com>2014-01-08 13:05:08 -0800
commita5ae4300c15c778722c139953c825cd24d6ff517 (patch)
treee9a633c4a4c5dde8e44b1226a0fbecf0f7c41b3c /drivers/md/bcache/request.h
parentbcache: Don't touch bucket gen for dirty ptrs (diff)
downloadlinux-dev-a5ae4300c15c778722c139953c825cd24d6ff517.tar.xz
linux-dev-a5ae4300c15c778722c139953c825cd24d6ff517.zip
bcache: Zero less memory
Another minor performance optimization Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/request.h')
-rw-r--r--drivers/md/bcache/request.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/md/bcache/request.h b/drivers/md/bcache/request.h
index 2cd65bf073c2..39f21dbedc38 100644
--- a/drivers/md/bcache/request.h
+++ b/drivers/md/bcache/request.h
@@ -13,17 +13,22 @@ struct data_insert_op {
uint16_t write_prio;
short error;
- unsigned bypass:1;
- unsigned writeback:1;
- unsigned flush_journal:1;
- unsigned csum:1;
+ union {
+ uint16_t flags;
- unsigned replace:1;
- unsigned replace_collision:1;
+ struct {
+ unsigned bypass:1;
+ unsigned writeback:1;
+ unsigned flush_journal:1;
+ unsigned csum:1;
- unsigned insert_data_done:1;
+ unsigned replace:1;
+ unsigned replace_collision:1;
+
+ unsigned insert_data_done:1;
+ };
+ };
- /* Anything past this point won't get zeroed in search_alloc() */
struct keylist insert_keys;
BKEY_PADDED(replace_key);
};