summaryrefslogtreecommitdiff
path: root/src/mds
Commit message (Collapse)AuthorAgeFilesLines
* mds: re-try_set_loner() after doing evals in eval(CInode*, int mask)Sage Weil2012-11-091-1/+12
| | | | | | | | | | | | | | | | | | | | Consider a case where current loner is A and wanted loner is B. At the top of the function we try to set the loner, but that may fail because we haven't processed the gathered caps yet for the previous loner. In the body we do that and potentially drop the old loner, but we do not try_set_loner() again on the desired loner. Try after our drop. If it succeeds, loop through the eval's one more time so that we can issue caps approriately. This fixes a hang induced by a simple loop like: while true ; do echo asdf >> mnt.a/foo ; tail mnt.b/foo ; done & while true ; do ls mnt.a mnt.b ; done (The second loop may not be necessary.) Signed-off-by: Sage Weil <sage@inktank.com>
* mds: move to from loner -> mix if *anyone* wants rd|wrSage Weil2012-11-051-1/+1
| | | | | | | | | We were either going to MIX or SYNC depending on whether non-loners wanted to read/write, but it may be that the loner wants to if our logic for choosing loner vs not longer is based on anything other that just rd|wr wanted. Signed-off-by: Sage Weil <sage@inktank.com>
* mds: base loner decision on wanted RD|WR|EXCL, not CACHE|BUFFERSage Weil2012-11-051-1/+1
| | | | | | | Observed instance where one client wanted the Fc cap and prevented the loner from getting RD|WR caps. Signed-off-by: Sage Weil <sage@inktank.com>
* re-include assert after boost::poolSage Weil2012-06-081-0/+1
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* make everyone use our assert #include and macroSage Weil2012-06-067-11/+17
| | | | | | ...as detected by the previous patch. Signed-off-by: Sage Weil <sage@inktank.com>
* logclient: not a dispatcherSage Weil2012-06-051-2/+1
| | | | | | | | Let MonClient and Monitor handle delivery of messages. This puts them in control and lets them trigger sending of more messages when we have a bunch queued. Signed-off-by: Sage Weil <sage@inktank.com>
* mds: remove preferred from ceph_file_layoutSage Weil2012-04-233-8/+0
| | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* config: drop old debug_* itemsSage Weil2012-03-292-2/+3
| | | | | | ...and replace code references with conf->subsys.should_gather(). Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* log: new logging infrastructureSage Weil2012-03-2722-22/+23
| | | | | | | | | - explicitly defined subsystems, and ceph_subsys_FOO enums to go with them - modular log system with Entry object - separate gather level and log level - drop lots of DoutStreambuf hackery Signed-off-by: Sage Weil <sage@newdream.net>
* msgr: switch all users over to abstract interfaceSage Weil2012-03-142-8/+8
| | | | | | This will let us transparently swap implementations out. Signed-off-by: Sage Weil <sage@newdream.net>
* mon: assign severity to each health summary/detail itemSage Weil2012-03-062-13/+8
| | | | | | These can be included in the detail dump in the future. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mon: refactor health, include optional detailSage Weil2012-03-062-18/+32
| | | | | | | | | 'ceph health' to get the usual summary, 'ceph health detail' to additionally get a comprehensive list of problems found. Eventually we can format this as yaml, json, whatever, too. Signed-off-by: Sage Weil <sage@newdream.net>
* mds: respawn when blacklistedSage Weil2012-03-062-1/+22
| | | | | | | | | | | If we are blacklisted by the OSD cluster, it's because we were too slow and were replaced by another ceph-mds. Respawn and re-register as a standby. If we get some other write error, shut down. Fixes: #1796 Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* msgr: remove refcounting of Messengers.Greg Farnum2012-03-021-1/+1
| | | | | | | This was pretty pointless since each Messenger has a well-defined exit point and shutdown process. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* msgr: Remove the SimpleMessenger start/start_with_nonce distinction.Greg Farnum2012-03-022-2/+2
| | | | | | | Instead, have a settable nonce value that you can fill in any time after construction and that it uses during regular start(). Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* msgr: Remove SimpleMessenger::register_entityGreg Farnum2012-03-022-2/+0
| | | | | | | | | This function has been vestigial for a long time. Remove it and move its remaining functionality into the constructor. Update users to the new interface (this is remarkably easy and simplifies the code). Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* Merge remote branch 'gh/wip-mds-resetter'Sage Weil2012-02-242-35/+51
|\ | | | | | | Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
| * mds: clean up useless blockSage Weil2012-02-231-12/+10
| | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * mds: fix Resetter lockingSage Weil2012-02-232-32/+48
| | | | | | | | | | | | | | | | | | We need to hold the lock for ms_dispatch, esp calls into objecter. We should only drop it when blocking; use distinct naming for the on-stack mutex used for that. Reported-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
| * Fix ceph-mds --journal-resetAlexandre Oliva2012-02-221-0/+2
| | | | | | | | | | | | | | | | Complete configuration initialization for special actions, and hold Resetter lock while running reset. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | mds: remove unused MDBalancer dump_pop_map() function.Greg Farnum2012-02-232-98/+0
| | | | | | | | | | | | | | Commenting it out is not the right answer. ;) Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com> Reviewed-by: Dan Mick <dan.mick@dreamhost.com>
* | mds: make EMetaBlob::fullbit::old_inodes non-ptrSage Weil2012-02-222-9/+6
| | | | | | | | | | | | | | | | | | No need to put this separately on the heap, as a static map<> isn't much more expensive than a pointer. Also, this ensures we unconditonally reset in->old_inodes to a potentially empty value if we replay the same inode multiple times and lose old inodes in subsequent versions. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | mds: Add old_inodes to emetablobAlexandre Oliva2012-02-222-7/+27
|/ | | | | | | Add information about old inodes to the mds journal. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mds: use want_state to indicate shutdownSage Weil2012-02-191-6/+10
| | | | | | | State gets DNE when we receive the first map. And want_ makes more sense anyway. Fixes MDS startup. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mds: ignore all msgr callbacks on shutdown, not just dispatchSage Weil2012-02-181-7/+17
| | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mds: drop all messages during suicideSage Weil2012-02-181-4/+7
| | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* Merge branch 'next'Josh Durgin2012-02-171-4/+5
|\
| * mds: comment out unused code in mds dump_pop_mapTom Callaway2012-02-171-4/+5
| | | | | | | | | | Signed-off-by: Tom Callaway <spot@redhat.com> Signed-off-by: David Nalley <david@gnsa.us>
* | mds: remove some cruftSage Weil2012-02-141-3/+1
| | | | | | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | mds: install async signal handlers for SIG{HUP,INT,TERM}Sage Weil2012-02-142-2/+13
| | | | | | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | mds: use new tmap_get pbl argumentSage Weil2012-02-141-2/+2
|/ | | | Signed-off-by: Sage Weil <sage@newdream.net>
* mds: remove IntervalTree codeSage Weil2012-02-071-1466/+0
| | | | | | Not used, not tested. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* move SnapContext, SnapRealmInfo to common/snap_types.{h,cc}Sage Weil2012-02-061-0/+1
| | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mdsmap: move member initialization to monitor create_initial()Sage Weil2012-01-303-8/+4
| | | | | | The dependence on cct/conf here was totally wrong. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* Merge remote branch 'gh/master' into wip-op-data-muxSage Weil2012-01-171-0/+3
|\
| * Merge remote branch 'gh/master' into wip-backfillSage Weil2012-01-115-71/+26
| |\
| * \ Merge remote branch 'gh/master' into wip-backfillSage Weil2012-01-091-6/+6
| |\ \
| * | | move cluster protocol definitions out of ceph_fs.hSage Weil2012-01-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other things, we don't recompile the whole system when we touch these. Signed-off-by: Sage Weil <sage@newdream.net>
* | | | Merge remote branch 'gh/master' into wip-op-data-muxSage Weil2012-01-165-71/+26
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | Conflicts: src/librados.cc src/objclass/class_api.cc src/rgw/rgw_rados.cc
| * | | Fix several doxygen warnings, to minimize noise. Only changes comments.Tommi Virtanen2012-01-103-20/+20
| | | | | | | | | | | | | | | | Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
| * | | mds: initiate monitor reconnect if beacon acks take too longGreg Farnum2012-01-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If it takes 2*mds_beacon_grace (default 30 seconds total) seconds to get an ack back, maybe it's the monitor and not us. Try a reconnect, which will just add the teensiest bit of load if we're wrong. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
| * | | mds: remove beacon_killer code.Greg Farnum2012-01-102-51/+0
| | |/ | |/| | | | | | | | | | | | | | | | This no longer does *anything* except print out useless warning messages. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* | | objecter: specify read return values pointers in ObjectOperatio methodsSage Weil2012-01-121-2/+2
|/ / | | | | | | | | | | This let's Objecter do the demuxing work for compount read operations. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | unittest_interval_tree: make it compileSage Weil2012-01-061-6/+6
|/ | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* mds: assert if we get an EINVAL on our truncateSage Weil2011-12-291-0/+1
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* mds: drop special SIGTERM handlerSage Weil2011-12-211-11/+0
| | | | | | Default does exit(0). Signed-off-by: Sage Weil <sage@newdream.net>
* mds: misc assertions about truncationSage Weil2011-12-191-0/+3
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* mds: mark_disposable when closing a Client connection.Greg Farnum2011-12-121-0/+1
| | | | | | | | | This is causing issues since the Client's ack of the MClientSession is somehow not getting back to the MDS. We should make the Client/SimpleMessenger be better-behaved about shutdown, but for now this solution matches how we're working elsewhere in our codebase. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
* mdsmap: rename get_num_*_mds() methodsSage Weil2011-12-123-8/+13
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* mds: fix blocking in standby replay threadSage Weil2011-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | We need to hold mylock before waiting on the cond or else we get ./common/Cond.h: In function 'int Cond::Wait(Mutex&)', in thread '7f37fe0c8700' ./common/Cond.h: 46: FAILED assert(mutex.is_locked()) ceph version 0.38-2-g73f99a1 (commit:73f99a189f491866da2be88adcfe0bd512282755) 1: (MDLog::_replay_thread()+0x2483) [0x6c4393] 2: (MDLog::ReplayThread::entry()+0xd) [0x4decbd] 3: (()+0x6d8c) [0x7f3803e8fd8c] 4: (clone()+0x6d) [0x7f38028d504d] ceph version 0.38-2-g73f99a1 (commit:73f99a189f491866da2be88adcfe0bd512282755) 1: (MDLog::_replay_thread()+0x2483) [0x6c4393] 2: (MDLog::ReplayThread::entry()+0xd) [0x4decbd] 3: (()+0x6d8c) [0x7f3803e8fd8c] 4: (clone()+0x6d) [0x7f38028d504d] *** Caught signal (Aborted) ** in thread 7f37fe0c8700 Signed-off-by: Sage Weil <sage@newdream.net>