summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/request.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-11 02:16:31 (GMT)
committerKent Overstreet <kmo@daterainc.com>2014-01-08 21:05:08 (GMT)
commita5ae4300c15c778722c139953c825cd24d6ff517 (patch)
treee9a633c4a4c5dde8e44b1226a0fbecf0f7c41b3c /drivers/md/bcache/request.h
parentd56d000a1f424aa77538bd5aad18b43037ed20cc (diff)
downloadlinux-a5ae4300c15c778722c139953c825cd24d6ff517.tar.xz
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 2cd65bf..39f21db 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);
};