Commit Graph

11373 Commits

Author SHA1 Message Date
Sage Weil
89af63e3db mds: journal dirfrag accounted_{r,frag}stat on inode update
When the inode sucks in the dir's updated frag info, we need to journal
the dirfrag update as well.  This ensures that any subsequent changes in
the dirfrag will be reflected by the difference between rstat and
accounted_rstat from the perspective of the journal contents (in case we
fail/recover during that process).
2010-09-09 16:40:44 -07:00
Sage Weil
30f97954e0 mds: in cinode debug, only show nl= if != 1 2010-09-09 16:40:30 -07:00
Paul Chiang
2a534d7055 init-ceph: mkdir log_dir and log_sym_dir
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 16:40:06 -07:00
Sage Weil
e47cd48839 mon: be a little more conservating in MOSDBoot handling
If we see the osd is being marked up, retry the message after commit,
don't just assume we're a dup and it's the same instance.
2010-09-09 16:40:03 -07:00
Sage Weil
a34eddbe76 osdmap: allow blacklist of an entire ip
We can backlist either a specific instance (1.2.3.4:1234/5678) or an
entire IP, in which case the table has something like "1.2.3.4:0/0" (a port
and nonce of 0).
2010-09-09 15:37:09 -07:00
Sage Weil
33fdb9d385 mon: add 'osd blacklist ls' 2010-09-09 15:26:11 -07:00
Henry C Chang
ad40652bdc common: close fd after parsed config file
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 15:18:47 -07:00
Paul Chiang
6bc8090539 mount.ceph: exit with error code from mount
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 15:18:40 -07:00
Sage Weil
bdd5c168fa mon: 'osd blacklist (add|rm) addr [duration]'
Manipulate the OSDMap blacklist.
2010-09-09 15:18:40 -07:00
Sage Weil
6a5ff675ba Merge branch 'testing' into unstable 2010-09-09 11:11:15 -07:00
Sage Weil
797950ef39 mon: fix up variable names to be more clear this is an inclusive range 2010-09-09 11:09:57 -07:00
Sage Weil
2a07960828 mon: fix osdmap subscribe range
Send incremental starting with the next map they want, not the one they
already have.
2010-09-09 11:04:27 -07:00
Sage Weil
6cefd5f1e3 mon: fix send_incremental ranges; behave when sending just 1 inc.
The build_incremental range is inclusive.  And we should behave when
sending a single inc map to get up to date.
2010-09-09 11:03:46 -07:00
Sage Weil
e7462f9003 mon: handle subscribe to osdmap=1
We would send an incremental for anything >1, or the latest map, but not
osdmap e1 itself.  Fix the condition, and make send_incremental() smart
about starting with the full map at 1 as needed.
2010-09-09 10:56:22 -07:00
Greg Farnum
611ba9d653 objecter: remove unused bufferlist 2010-09-09 10:15:39 -07:00
Sage Weil
448d3d5100 mds: fix journal replay of session close->open after reconnect
If the client reconnects, the journal 'close' replay doesn't remove the
session, which leaves the session state intact.  It needs to reset it in
that case, or else we get problems if the session is reopened and the
state doesn't match up.

Reported-by: Nat N <phenisha@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 10:01:24 -07:00
Sage Weil
9e383c786b objectcacher: fix use-after-free atomic_sync_readx
readx() releases rd; copy snapid so we can use it later.
2010-09-08 15:42:08 -07:00
Sage Weil
717f458e23 mds: fix use-after-free
We copied the name, but forgot to use it.
2010-09-08 15:38:11 -07:00
Sage Weil
bb4d45d14e mds: fix use-after-free in snaprealm_create_finish
We pass mut's log segment to snapclient->commit().
2010-09-08 15:36:37 -07:00
Sage Weil
5e98e2de4d objectcacher: cleanup release(), just to be clear 2010-09-08 15:33:42 -07:00
Sage Weil
4ccf69b3b3 objecter: add missing return in list_objects
This fixes a use-after-free, and generally bad behavior.
2010-09-08 15:30:32 -07:00
Sage Weil
c30fde48ca objectcacher: fix use-after-free
Move waiter check above close_object(ob) call.
2010-09-08 15:28:21 -07:00
Sage Weil
3eb332aa88 mount: fix scope of secret[]
We use value pointer outside of this block; move declaration up to function
level.
2010-09-08 15:26:28 -07:00
Sage Weil
066a588c14 crushtool: fix bucket type array bound check 2010-09-08 15:24:29 -07:00
Sage Weil
9434b12a02 rados: fix delete[] in aio_bencher 2010-09-08 15:22:17 -07:00
Sage Weil
d7a8bbb301 Merge branch 'uclient_readdir' into testing 2010-09-08 15:14:55 -07:00
Sage Weil
1de5617720 client: move readdir code around 2010-09-08 14:44:26 -07:00
Sage Weil
c8be0a5a86 client: reimplement getdir() with readdir_r_cb()
More efficient.
2010-09-08 14:10:31 -07:00
Sage Weil
d558674934 client: reimplement readdir
Reimplement core readdir (readdir_r_cb), using kclient as a template.
Reimplement all other readdir variants in terms of readdir_r_cb.

Main change is support for frag chunking, and hopefully lots of subtle bugs
that have been fixed in the kclient code we're based on.
2010-09-08 14:02:43 -07:00
Sage Weil
eefabc7bde cfuse: use readdir_r_cb 2010-09-08 11:32:00 -07:00
Sage Weil
561f302207 uclient: implement readdir_r_cb (callback based readdir)
This lets us know whether the caller is able to consume an entry before
advancing our position.
2010-09-08 11:31:19 -07:00
Sage Weil
a4a144881b mds: sync replicas after finishing XLOCK gather
The replicas are in the LOCK state; sync them.  We had the XLOCKDONE but
not the XLOCK case.
2010-09-07 15:46:20 -07:00
Sage Weil
bc90591566 mds: fix replica state for mix->sync
Should be mix->sync(2): the same as a replica who already go the first
SYNC message and is waiting in mix->sync(2) for the final SYNC to indicate
the gather is completed.
2010-09-07 14:57:49 -07:00
Sage Weil
397e3a1ddc mds: don't export any system dirs
Skip dir if it is any system dir.
2010-09-07 14:47:13 -07:00
Sage Weil
046a86fea9 mds: authpin non-auth items we may need to REQSCATTER or REQRDLOCK for any lock type
We were doing just filelock, but this is needed for any lock.
2010-09-07 14:40:33 -07:00
Sage Weil
b7b77ffc17 Revert "Merge branch 'auth_change_waiters' into unstable"
This reverts commit 1d8770be27, reversing
changes made to 46bf806a77.
2010-09-07 14:38:48 -07:00
Sage Weil
2c47edc3eb mds: lock path, parent dir scatterlocks _after_ freezing
This fixes a ABBA deadlock between
  acquire_locks(): auth_pins items, then locks in order
  export_dir: locks paths, then freezes.

Instead, we check for lockability (but don't lock), do the freeze, and then
try to take the locks after.  If we can't do so atomically, we currently
just fail.  In theory this could wait for the distributed locks, but it's
probably not worth the complexity at this stage; export_dir is currently
still opportunistic and can bail out for a variety of reasons.
2010-09-07 14:38:07 -07:00
Sage Weil
4084bf39dd mds: can next state lockability checks in eval_gather
The can_* fields need to be ANY or AUTH.. not REQ or XCL (at least not
without trickier checks).  Otherwise we progress to the next state too
early and violate the locking rules.
2010-09-07 13:57:03 -07:00
Sage Weil
f0e22fc15e mds: don't allow read in sync->mix2 state, request rdlock in sync->mix 2010-09-07 12:35:09 -07:00
Sage Weil
90dd3c3e89 Merge branch 'testing' into unstable
Conflicts:
	configure.ac
	src/mds/MDCache.cc
2010-09-07 12:13:39 -07:00
Sage Weil
c2c09be383 Merge branch 'mds_replay_lock_states' into testing 2010-09-07 12:12:41 -07:00
Sage Weil
86986925fc mds: rename process_reconnected_caps() 2010-09-07 12:10:27 -07:00
Sage Weil
ae7dcdfb8c mds: make is_dirty() const in parent and child
Otherwise we're overriding the wrong method!  Der.
2010-09-07 12:10:27 -07:00
Sage Weil
f6f8e5cf20 mds: choose lock states for nestlock and dftlock too
All scatterlocks need it, in case we replay dirty scatterlock data.
2010-09-07 12:10:27 -07:00
Sage Weil
4205b7deb5 mds: choose lock states on all inodes, not just those with caps
This is necessary because we want to select lock states for inodes with
no caps that got replayed scatterlock dirty state from the journal.
2010-09-07 12:10:27 -07:00
Sage Weil
a478ab5ffb mds: choose LOCK if !replicated and dirty scatterlock 2010-09-07 12:10:27 -07:00
Sage Weil
c80a1d02a3 mds: fix bad iterator usage in process_reconnected_caps()
We use p->second, so don't increment p++ early in the loop block.
2010-09-07 12:10:27 -07:00
Sage Weil
518b95df86 mkcephfs: fix bad |
Reported-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-07 11:45:25 -07:00
Sage Weil
7f9bab9ee7 osd: log error instead of crashing on failed pull attempt
If peering screws up and the primary mistakenly tries to pull an object
from us we don't have, log an error instead of crashing.  This will still
throw off recovery (it will hang), but that's better than crashing
outright.
2010-09-07 11:45:25 -07:00
Yehuda Sadeh
59f75d5d74 rgw: send status: 100 after auth code to signal fastcgi module
Shouldn't make any difference with older modules, and patched fastcgi
module should know how to handle it.
2010-09-03 17:27:41 -07:00