Otherwise the MDS will leave the cluster and immediately rejoin, which is
useless and confusing to users. See #1820.
Signed-off-by: Sage Weil <sage@newdream.net>
The ceph_mon.cc main() will delete mon when the msgr dispatch thread
completes. Make sure we unlock before we shut down the messenger, and
avoid touching this after messenger->shutdown().
Fixes: #2090
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This is just for completeness. No change in behavior, since we don't
get here until the thread has signaled it is done.
Drop the destroy() overload, since we join earlier.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This is functionally equivalent, except that valgrind doesn't complain
about a bad pointer passed to an ioctl.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
This makes 'make distcheck' happy. Well, more happy at least; it's still
cranky but I can't tell why.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Write operations aren't allowed to return a data payload because
we can't do so reliably. If the client has to resend the request
and it has already been applied, we will return 0 with no
payload. Non-deterministic behavior is no good.
See #1765.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Inside sched_scrub() we call _lookup_lock_pg(), which takes
map_lock.get_read(). That's technically okay because RWLock read side is
recursive, but lockdep doesn't know that, and we don't need map_lock
because we hold osd_lock.
Signed-off-by: Sage Weil <sage@newdream.net>
When we encode an Incremental, use the encode wrapper function, so that
we can capture the encoded struct when building with ENCODE_DUMP. Set
all features (the default when encode() is called directly).
Signed-off-by: Sage Weil <sage@newdream.net>
When we send (old) maps to the kclient, we omit the extended section. Lets
decode those (old, abbreviated maps) successfully, too.
Signed-off-by: Sage Weil <sage@newdream.net>
This generates encode/decode functions that pass feature bits into the
encoder, allowing us to encode old formats.
Signed-off-by: Sage Weil <sage@newdream.net>
Attempt to reproduce btrfs bug when rmdirs race with an async snap.
Unsuccessful. Best guess is that we need multiple threads to trigger.
Signed-off-by: Sage Weil <sage@newdream.net>
When we are backfilling, we add in objects as we push them. Do not count
the snapdir object as a clone, or else we'll screw up the count.
Fixes: #2080
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Return true, so the messenger is happy, and drop the message reference.
Avoids an assert like
2012-02-19T12:36:05.102 INFO:teuthology.task.ceph.mon.2.err:ms_deliver_dispatch: fatal error: unhandled message 0x1b7b280 paxos(auth lease_ack lc 8 fc 1 pn 0 opn 0) v1 from mon.2 10.3.14.197:6789/0msg/Messenger.h: In function 'void Messenger::ms_deliver_dispatch(Message*)' thread 7fd7fe360700 time 2012-02-19 12:36:05.094713
2012-02-19T12:36:05.102 INFO:teuthology.task.ceph.mon.2.err:msg/Messenger.h: 143: FAILED assert(0)
Signed-off-by: Sage Weil <sage@newdream.net>