Manipulate the new rbd_children object, which holds mappings between
parent snapshots and their children clone images
Signed-off-by: Dan Mick <dan.mick@inktank.com>
AioZero, Truncate, and Remove are only used by discard and resize
operations where ENOENT can be safely ignored. If that changes in the
future, we'll need to move the enoent flag setting into discard explicitly.
Fixes: #2958
Signed-off-by: Sage Weil <sage@inktank.com>
This helps correlate log output with specific tcp sessions as reported by
e.g. netstat or tcpdump or whatever.
Signed-off-by: Sage Weil <sage@inktank.com>
The gen_prefix() is used for debug prefixes, but traverses data structures
that can be modified when the lock is held. Only include them in the
prefix if the lock is held; otherwise print an abbreviated prefix that is
similarly greppable to the normal output.
Fixes: #2957
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Arguably this is what current is_locked() callers all want; they should
eventually be moved and is_locked() removed.
Signed-off-by: Sage Weil <sage@inktank.com>
Commit 343cc792e8 switched us from pip
-E to virtualenv, to keep up with the Python ecosystem, but left in
this old check for existence of "pip" as a command. We don't strictly
need that; what we need is a "virtualenv" command. PIP will be
available inside the virtualenv, by the time we get around to running
it. Check for virtualenv instead.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
client/SyntheticClient.cc: In member function 'int SyntheticClient::play_trace(Trace&, std::string&, bool)':
client/SyntheticClient.cc:1494:22: warning: ordered comparison of pointer with integer zero [-Wextra]
CXX rados_sync.o
client/SyntheticClient.cc:1500:22: warning: ordered comparison of pointer with integer zero [-Wextra]
Signed-off-by: Sage Weil <sage@inktank.com>
Valgrind picked this up:
==22755== Conditional jump or move depends on uninitialised value(s)
==22755== at 0x4EC2A11: librbd::ictx_refresh(librbd::ImageCtx*) (internal.cc:1384)
==22755== by 0x4EC10F7: librbd::ictx_check(librbd::ImageCtx*) (internal.cc:1212)
==22755== by 0x4EBD246: librbd::info(librbd::ImageCtx*, rbd_image_info_t&, unsigned long) (internal.cc:841)
==22755== by 0x4E9D71A: rbd_stat (librbd.cc:584)
==22755== by 0x4039A5: check_trunc_hack (fsx.c:477)
==22755== by 0x4060FA: main (fsx.c:1508)
Signed-off-by: Sage Weil <sage@inktank.com>
librbd/internal.cc: In function 'int librbd::ictx_refresh(librbd::ImageCtx*)':
librbd/internal.cc:1334:59: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
Signed-off-by: Sage Weil <sage@inktank.com>
Cap the number of maps we delete on each pass through handle_osd_map. As
long as the target transaction size is larger than the number of maps we
get in each message, we'll be fine. Ensure we at least keep pace with
incoming maps in case those values' relative sizes nave flipped.
Fixes: #2856
Signed-off-by: Sage Weil <sage@inktank.com>
We do a similar trick elsewhere. Control this via a tunable. Eventually
we'll control the others (in a non-stable branch).
Signed-off-by: Sage Weil <sage@inktank.com>
We don't check for gaps in the past intervals, so we should only commit
this when we are completely done. Otherwise a partial run and rsetart will
leave the gap in place, which may confuse the peering code that relies on
this information.
Signed-off-by: Sage Weil <sage@inktank.com>
Since we are requeuing stuff anyway, do it all in the correct order. This
fixes a bug where take_waiters() comes along later (at activate_map time)
and puts waiting_for_map events at the front of the queue, in front of
e.g. waiting_for_missing. This breaks ordering from the client's
perspective.
The convention should be: whenever you requeue, requeuing everything
that logically follows it first.
Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Requeue them explicity from apply_and_flush_repops() and call it last, so
that the overall ordering is preserved.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
mds/Server.cc: In member function 'CDir* Server::validate_dentry_dir(MDRequest*, CInode*, const string&)':
mds/Server.cc:1607:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc:1620:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc: In member function 'CInode* Server::rdlock_path_pin_ref(MDRequest*, int, std::set<SimpleLock*>&, bool, bool, ceph_file_layout**)':
mds/Server.cc:1874:21: warning: converting 'false' to pointer type 'CInode*' [-Wconversion-null]
Signed-off-by: Sage Weil <sage@inktank.com>