Commit Graph

10527 Commits

Author SHA1 Message Date
Yehuda Sadeh
7739cafb84 testradospp: add a test for librados trunc 2010-06-10 14:42:11 -07:00
Yehuda Sadeh
42ff45b4ee librados: add trunc operation 2010-06-10 14:41:53 -07:00
Yehuda Sadeh
3de397fc3d testradospp: update test, use write_full 2010-06-10 14:12:20 -07:00
Yehuda Sadeh
d1c779c96a librados: implement write_full 2010-06-10 14:04:07 -07:00
Yehuda Sadeh
92f2ecd353 osd: fix null dereference in dout 2010-06-10 11:55:32 -07:00
Sage Weil
effe5db33d mds: be extra careful
Probably implied by the refs == 0, but be explicit anyway.
2010-06-10 10:17:21 -07:00
Sage Weil
607ba5dd14 mds: fix another instance of bad stray trimming code to use proper helper 2010-06-10 10:17:03 -07:00
Greg Farnum
673fdc7aa2 mds: remove erroneous return statement 2010-06-10 09:10:34 -07:00
Greg Farnum
8be5b029d6 mds: a checker function like _is_dir_nonempty should only report results.
Remove the call to reply_request and fix up the callers that need it.
2010-06-10 09:06:37 -07:00
Sage Weil
214a42798b mds: handle dup anchorclient ACKs gracefully
One recovery scenario sees crisscrossing 'agree' and 'commit':

 C->S --> commit1
 S->C --> agree

 C<-S <== agree
  C->S --> commit2   .. client resends commit!

 S<-C <== commit1
  S->C --> ack      .. server resends ack!
 S<-C <== commit2
  S->C --> ack      .. server resends ack!

 C<-S <== commit1
  client journals ack
 C<-S <== commit2
  client should ignore dup ack  ***

*** but doesn't, because the 'remove from committing list' bit above was
never in the code, even as far back as v0.4 (just the comment).  Instead,
the map was getting fixed up in the _logged_ack() completion.  Move it
up here instead, where it belongs!

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-09 22:17:22 -07:00
Sage Weil
c35cb2946d mds: fix export caps
Don't mangle sessionmap version by incrementing twice; pv is returned by
prepare_force_open_sessions().
2010-06-09 14:43:32 -07:00
Sage Weil
0349c789fe mds: allow import caps pin from multiple replicas at once
e.g. on dentry unlink, replicas send their caps to the auth.  There may
be multiple replicas.
2010-06-09 14:19:37 -07:00
Yehuda Sadeh
1a3fac44f2 osd: return EINVAL when snapc is invalid and trying to write 2010-06-09 13:50:39 -07:00
Sage Weil
e74250d82c osd: don't clobber racing pg_info on active pg
Wido saw a pg go active, but an activate log+info update crossed paths with
a pg_notify info, and the primary overwrote it's updated shiny new info
with the stale old info from the replica.  Don't do that.  It causes
problems down the line.  In this case, we got

osd/OSD.cc: In function 'void OSD::generate_backlog(PG*)':
osd/OSD.cc:3863: FAILED assert(!pg->is_active())
 1: (ThreadPool::worker()+0x28f) [0x5b08ff]
 2: (ThreadPool::WorkThread::entry()+0xd) [0x4edb8d]
 3: (Thread::_entry_func(void*)+0xa) [0x46892a]
 4: (()+0x69ca) [0x7f889ff249ca]
 5: (clone()+0x6d) [0x7f889f1446cd]

on the replica because it was active but the primary was restarting peering
due to the bad info.
2010-06-09 13:30:30 -07:00
Sage Weil
42738093ff osd: refine SnapContext::is_valid() 2010-06-09 12:29:03 -07:00
Sage Weil
2648e40333 osd: implement SnapContext::is_valid() 2010-06-09 12:27:55 -07:00
Sage Weil
7c780592f9 init-ceph: don't fail if we fail to umount
It may not be mounted to begin with.
2010-06-09 10:56:17 -07:00
Sage Weil
12798de371 osd: add --dump-pg-log command 2010-06-08 22:34:57 -07:00
Sage Weil
fb1c3b92b3 osd: clear newly_removed_snaps on osdmap update if unchanged
We only want to apply _newly_ removed snaps once, or else we try to trim
the same snaps multiple times, and crash like so

./include/interval_set.h: In function 'void interval_set<T>::insert(T, T) [with T = snapid_t]':
./include/interval_set.h:202: FAILED assert(0)
 1: (interval_set<snapid_t>::insert(snapid_t, snapid_t)+0x12c) [0x6b1728]
 2: (interval_set<snapid_t>::insert(snapid_t)+0x2f) [0x6b195d]
 3: (ReplicatedPG::snap_trimmer()+0x1c02) [0x66d5d6]
 4: (OSD::SnapTrimWQ::_process(PG*)+0x24) [0x6dc2ac]
 5: (ThreadPool::WorkQueue<PG>::_void_process(void*)+0x28) [0x6fa28a]
 6: (ThreadPool::worker()+0x23a) [0x7f57a4]
 7: (ThreadPool::WorkThread::entry()+0x19) [0x73e9b1]
 8: (Thread::_entry_func(void*)+0x20) [0x6508a4]
 9: /lib/libpthread.so.0 [0x7fa2707dc73a]
 10: (clone()+0x6d) [0x7fa26fa0669d]

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-08 21:36:56 -07:00
Sage Weil
15a7a83925 mds: use helper to send message to client; fix send to null connection
Sometimes session->connection is NULL; use session->inst in that case.
2010-06-08 16:43:48 -07:00
Greg Farnum
c992d02021 mds: remove erroneous bracket 2010-06-08 16:33:59 -07:00
Greg Farnum
2a88e2e54e add checks for being a snapshot root to dir_is_nonempty 2010-06-08 16:25:04 -07:00
Sage Weil
26a4d0eacf throttle: allow take(0) 2010-06-08 15:37:36 -07:00
Sage Weil
0dc9569557 mds: fix stale lease trimming xlist iterator abuse 2010-06-08 15:37:36 -07:00
Greg Farnum
7c85646240 mon: fix memory-leaked messages 2010-06-08 15:13:37 -07:00
Greg Farnum
76fb75e988 buffer: fix padding distances 2010-06-08 15:13:37 -07:00
Greg Farnum
c196851bd7 osd: init auid to CEPH_AUTH_UID_DEFAULT in case authorizer doesn't set it.
We should probably also require the authorizer to set it for us.
2010-06-08 15:13:37 -07:00
Sage Weil
80c42d0639 mds: scan stray dir, eval strays on mds startup 2010-06-08 13:38:15 -07:00
Sage Weil
2e1b0d3590 mon: make mon lease clock check protocol change backward compatible 2010-06-08 09:42:40 -07:00
Sage Weil
58fe4b8d54 qa: add untar_snap_rm.sh 2010-06-07 22:18:59 -07:00
Sage Weil
ac10d8378d osd: print rollback osd_op nicely 2010-06-07 22:05:08 -07:00
Sage Weil
470a6fde96 mds: wire Connection to Session when Session already exists on connect 2010-06-07 16:03:37 -07:00
Sage Weil
6d770abebd mds: funnel mds->client messages through single Session* helper
Simplify callers where possible.
2010-06-07 16:03:14 -07:00
Sage Weil
29a42efe2e mon: simplify clock drift checks
Ignore lease sent vs lease_ack receive times bc multiple lease msgs may
be in flight and the ack may be from a previous one.  This was causing
spurious

 [WRN] : lease_ack from follower sent at time(10.06.07_15:07:11.441391), before lease extend was sent (10.06.07_15:07:11.826340)! Clocks not synchronized.

messages.

It is sufficient to just check for messages received from the future.  To
avoid cruftiness trying to do that when the only stamp is the lease
timeout, add a sent_timestamp to the message and use that instead.  This
simplifies things quite a bit, at the expense of not being backward
compatible.
2010-06-07 15:42:19 -07:00
Sage Weil
527d5fd7db monc: behave in ms_handle_reset if cur_mon is < 0 2010-06-07 15:04:37 -07:00
Sage Weil
6ff2a8760d msgr: don't throttle.get 0 2010-06-07 15:03:28 -07:00
Sage Weil
191cb2e4d4 throttle: allow put(0)
Still returns a consistent value for the count.
2010-06-07 15:00:23 -07:00
Sage Weil
e505fb5a79 msgr: don't thottle.put 0 2010-06-07 14:59:16 -07:00
Sage Weil
d2740973d0 Merge remote branch 'origin/msgr' into unstable 2010-06-07 14:47:56 -07:00
Sage Weil
4ecd8facd9 mds: use cap on head if there is none on the snapped inode
This is needed, in particular, when we're flushing snap data on an inode
that already got COWed.
2010-06-07 12:05:55 -07:00
Sage Weil
5be266098d osd: use low-level helper getting obc in sub_op_push
find_object_context does all sorts of stuff we don't need here: we know
which object the context is for.  Just set it up.
2010-06-07 11:40:32 -07:00
Greg Farnum
61555cceb8 throtle: add asserts on max and change parameters where appropriate 2010-06-07 05:55:05 -07:00
Greg Farnum
8413ed49ee throttle: fix assert count to actually use count 2010-06-07 05:54:47 -07:00
Sage Weil
520a2c37a1 crypto: don't clean up EVP table on every decrypt()
Don't think that's appropriate?  And certainly doesn't happen for the
encrypt() case.
2010-06-06 22:15:18 -07:00
Sage Weil
d57b629699 crypto: don't leak memory in CryptoAES::encrypt() 2010-06-06 22:15:18 -07:00
Sage Weil
21a97d1e7c mon: don't leak MAuth 2010-06-06 22:15:18 -07:00
Greg Farnum
989c9ee149 throttle: use signed counters and assert that count never drops below 0 2010-06-04 17:01:32 -07:00
Greg Farnum
800da082ad msgr: Fix uses of get_[data, payload, middle] to use throttling-aware functions. 2010-06-04 16:42:55 -07:00
Greg Farnum
3b333f7a3a msgr: put throttler usage on Message destruct 2010-06-04 16:42:55 -07:00
Greg Farnum
246415b3ea osd: fix compile issues 2010-06-04 16:42:55 -07:00