The OSD needs to know the tid. Both generally, and specifically because
the flush_pg_stats may be blocking on it.
Fixes: #8280
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
If we get a dup boot message, share the newer maps with the osd so that
they know they are living in the past.
Fixes: #8279
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Callig _finish_hunting() clears out the bool hunting flag, which means we
don't retry by connection to another mon periodically. Instead, we send
keepalives every 10s. But, since we aren't yet in state HAVE_SESSION, we
don't check that the keepalives are getting responses. This means that an
ill-timed connection reset (say, after we get a MonMap, but before we
finish authenticating) can drop the monc into a black hole that does not
retry.
Instead, we should *only* call _finish_hunting() when we complete the
authentication handshake.
Fixes: #8278
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
When the rename target dentry is NULL, we can use MDentryLink messages
instead of slave requests to update its replicas.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
If a PG has recnetly split and has invalid stats, scrub it now, even if
it has scrubbed recently. This helps the stats become valid again soon.
Fixes: #8147
Signed-off-by: Sage Weil <sage@inktank.com>
Anchor table was the main user of MDCache::discover_ino(), it has
been removed. MDCache::discover_path() can replace discover_ino()
in remaining places. This patch removes discover ino related code.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Under rbd usage, if a volume has tens of thousands of objects and each 4M
object only has several KB(run fio on this volume or other cases), this volume
will be very low performance during a long time after create snapshot on
this volume. The OSD will be busy with large bandwidth read/write although
the object actually has few bytes needed to be copied.
This commit try to use fiemap if backend fs support, it can skip unnecessary
range to write. It also can be beneficial to space effective, because the copied
object will be regard as snapshot object which is access infrequently.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Added a new command line parameter (-i or --image=) that allows rbd-fuse...
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
This is useful for qemu to guarantee live migration with caching is
safe, by invalidating the cache on the destination before starting it.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This will only happen when shrinking or rolling back an image is done
while other I/O is in flight to the same ImageCtx. This is unsafe, so
return an error before performing the resize or rollback.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>