Age | Commit message (Collapse) | Author |
|
|
|
|
|
Linked iterators are now no longer requried to be traversed in key
order; instead, they'll return -EINTR if the caller needs to restart,
because they had to drop/reacquire locks to avoid deadlocking.
|
|
|
|
|
|
|
|
|
|
promote path uses @k for replace key, but it pointed into unlocked btree node
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The superblock formats are diverging too much
|
|
|
|
it appears gcc is still stupid about returning structs by value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
more prep work for data checksumming/compression
|
|
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
- Add another UUID for identifying the cache set - one that the user is allowed
to set/change
- Move device geometry to cache_member, so that it's available for validating
pointers when the device is offline.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This adds support for a new KEY_BAD type.
If data migration fails, and device removal is proceeding, sweep
the btree and replace any residual keys that point to the device being
removed with KEY_BAD keys if they have no valid pointers left.
If they have valid pointers left (very unusual), use PTR_LOST_DEV
instead.
Reading a KEY_BAD key (or a key with only PTR_LOST_DEV) returns an I/O
error.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
- Caches within the cache set can now have different sized buckets.
Whenever there is a request for the bucket_pages or bucket_bytes from
the cache_set, search for the corresponding cache instead of using the
cacheset bucket_size.
- The bucket_size in the cache_set superblock shouldn't be used for anything.
- Add a bio to the cache that will be reused for rw of prios.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Also make cached a parameter - prep work for the new bkey format
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
this means we have a new error code to return from bch_btree_insert_at(), so
clean up the various insert_at() uses
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Prep work for external iterators
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Making (fresh) snapshots works server side because the destination lun is empty.
However, if the destination lun is not empty, preserving the source
version numbers opens the possibility that an offline server contains
a more recent destination version that will 'spontaneously appear'
when the server comes back online.
Thus any snapshot restoration (or copy when the destination is not
empty) needs to use new version numbers, and as such must only copy
the most recent source extents (else the copied source extents cannot
be sorted properly as they'll all have the same version number).
This adds RPCs, etc.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|