summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/bkey_methods.c
AgeCommit message (Collapse)Author
2016-11-28bcache: Whiteout optimizations: extentsKent Overstreet
2016-11-23bcache: Clean up sorting, kill btree_keys_ops, etc.Kent Overstreet
2016-10-07bcache: check for (unimplemented) snapshot fieldKent Overstreet
2016-10-07bcache: bkey swabbingKent Overstreet
Bkeys have to be stored in native endianness: thus, for endian portability we need a flag to indicate whether a givin btree node entry/journal entry was written in big or little endian, and we need to swab when reading an entry in non native endianness.
2016-10-07bcache: break btree.c up into multiple filesKent Overstreet
2016-10-07bcache: Rework error handling/loggingKent Overstreet
2016-10-07bcache: bch_bkey_val_to_text() now takes bkey typeKent Overstreet
2016-10-07bcache: bcachefsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: reduce b->c usage (benchmark)Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: btree_node_type(), new assertionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: Hook up new btree node fieldsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: Packed bkeysKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: Don't insert deleted keys with nonzero sizeKent Overstreet
This is the other half of making it possible for the btree node iterator to not compare against bkey_start_pos(): in order to still see keys in order by start pos, we need to ensure that a 0 size extent sorts after a nonzero size extent at the same position. We could do this by comparing !k->size if the keys compare as equal, but part of why we're making this change is for packed bkeys - once we have packed bkeys, comparing !k->size will require unpacking the key (expensive). So we'll use bkey_deleted() as a proxy for !k->size, and disallow bkey_deleted(k) == true and k->size != 0. Where previously we did discards by inserting KEY_DELETED keys, now we'll just use KEY_DISCARD with version = 0 - and bch_extent_normalize() will drop these keys later (the idea being that we can drop a KEY_DISCARD key with version = 0 without losing information). Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-10-07bcache: Refactor bkey methodsKent Overstreet
Move some methods out of btree_keys_ops and into a new bkey_ops struct; this is partly because some methods really shouldn't require a btree_keys pointer to be used (bkey_invalid()), and it also lets us clean up some duplicated code. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>