From 8768b52dc466511b958d4b301fa9e4844050b0f9 Mon Sep 17 00:00:00 2001 From: Herb Shiu Date: Tue, 23 Nov 2010 15:31:50 +0800 Subject: [PATCH 1/6] mds: Reply checking_lock while reading filelock Use checking_lock to repalce lock_state in extra buffer list to let client can get correct file lock reply. --- src/mds/Server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 6822a6d0ced..95e3107666e 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2733,7 +2733,7 @@ void Server::handle_client_file_readlock(MDRequest *mdr) lock_state->look_for_lock(checking_lock); bufferlist lock_bl; - ::encode(lock_state, lock_bl); + ::encode(checking_lock, lock_bl); MClientReply *reply = new MClientReply(req); reply->set_extra_bl(lock_bl); From d8652de61647ae19ad0f3ec90fad00930cdd5afd Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Tue, 23 Nov 2010 14:40:54 -0800 Subject: [PATCH 2/6] mdcache: in trim_non_auth, only print out path if it has a parent dentry. This should only occur with the root inode, but caused a segfault for anybody running more than one MDS who restarted. Signed-off-by: Greg Farnum --- src/mds/MDCache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5265a1d047d..9f67469ccd8 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5203,7 +5203,8 @@ void MDCache::trim_non_auth() in->close_dirfrag((*p)->dirfrag().frag); } dout(0) << " ... " << *in << dendl; - warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; + if (in->get_parent_dn()) + warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; assert(in->get_num_ref() == 0); remove_inode(in); } From 5eb8ef7f11b21ab861586d926749b3324cc7209a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Nov 2010 08:55:29 -0800 Subject: [PATCH 3/6] filejournal: fix throttle vs FULL behavior We don't want to add to the throttler if we aren't going to queue the write, or else we'll never take it off again. Signed-off-by: Sage Weil --- src/os/FileJournal.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index c779f0f8781..73e4e3cd4be 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -776,9 +776,6 @@ void FileJournal::submit_entry(uint64_t seq, bufferlist& e, int alignment, Conte << " len " << e.length() << " (" << oncommit << ")" << dendl; - throttle_ops.take(1); - throttle_bytes.take(e.length()); - if (!full_commit_seq && full_restart_seq && seq >= full_restart_seq) { dout(1) << " seq " << seq << " >= full_restart_seq " << full_restart_seq @@ -786,6 +783,8 @@ void FileJournal::submit_entry(uint64_t seq, bufferlist& e, int alignment, Conte full_restart_seq = 0; } if (!full_commit_seq && !full_restart_seq) { + throttle_ops.take(1); + throttle_bytes.take(e.length()); writeq.push_back(write_item(seq, e, alignment, oncommit)); write_cond.Signal(); // kick writer thread } else { From 9360126943f214324d60a93a69218dab3a51819d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Nov 2010 09:13:54 -0800 Subject: [PATCH 4/6] debian: many many cleanups Signed-off-by: Laszlo Boszormenyi --- debian/ceph.install | 1 + debian/changelog | 163 +---------------------------------- debian/control | 3 + debian/libceph1-dev.install | 8 +- debian/libceph1.install | 2 +- debian/libcrush1-dev.install | 14 +-- debian/libcrush1.install | 2 +- debian/librados1-dev.install | 22 ++--- debian/librados1.install | 2 +- debian/move_dbg_files.sh | 8 -- debian/radosgw.install | 1 + debian/rules | 34 ++++++-- 12 files changed, 56 insertions(+), 204 deletions(-) delete mode 100755 debian/move_dbg_files.sh diff --git a/debian/ceph.install b/debian/ceph.install index 741024bc6ba..b4f0f89f512 100644 --- a/debian/ceph.install +++ b/debian/ceph.install @@ -31,3 +31,4 @@ usr/share/man/man8/cauthtool.8 usr/share/man/man8/cclass.8 usr/share/man/man8/cclsinfo.8 usr/share/man/man8/cdebugpack.8 +usr/share/ceph_tool/gui_resources/* diff --git a/debian/changelog b/debian/changelog index 99bfcc097a6..75f4dda4d3c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,166 +1,5 @@ ceph (0.23.1-1) experimental; urgency=low - * msgr: fixed rare messenger race/bug - * client: fixed cache consitency with link(2) - * client: fix lssnap - * msgr: fix ipv6 addr parsing buffer overflow - - -- Sage Weil Sun, 21 Nov 2010 15:22:21 -0800 - -ceph (0.23-1) experimental; urgency=low - - * osd: use new btrfs snapshot ioctls - * mds: replay fixes - * mds: many many clustering fixes - * mds: directory fragmentation (off by default) - * mon: better commit batching, lower latency - * objecter: bug fixes - * osd: spread data across multiple xattrs - * osd: start up despite corrupt pg logs - * new gui (ceph -g) - - -- Sage Weil Wed, 10 Nov 2010 16:32:07 -0800 - -ceph (0.22.2-1) experimental; urgency=low - - * cfuse: fix truncation problem - * osd: fix decoding of legacay (0.21) coll_t - * osd: handle missing objects on snap reads - * filestore: escape xattr chunk names - - -- Sage Weil Sat, 30 Oct 2010 11:22:51 -0700 - -ceph (0.22.1-1) experimental; urgency=low - - * osd: fix hang during mkfs journal creation - * objecter: fix rare hang during shutdown - * msgr: fix reconnect/disconnect errors due to timeouts - * init-ceph: check for correct instance in daemon_is_running() - * filestore: deliberate crash on ENOSPC or EIO to avoid corruption - * filestore: split xattrs into chunk (partial workaround for xattr size) - * filestore: ignore ENOSPC on xattrs until workaround for extN is ready - * radosgw: return 204 on removal of bucket/object - - -- Sage Weil Fri, 22 Oct 2010 16:18:49 -0700 - -ceph (0.22-4) experimental; urgency=low - - * more packaging fixes - - -- Sage Weil Tue, 19 Oct 2010 09:00:21 -0700 - -ceph (0.22-3) experimental; urgency=low - - * packaging fixes - - -- Sage Weil Mon, 18 Oct 2010 10:23:02 -0700 - -ceph (0.22-1) experimental; urgency=low - - * mon: improved monitor naming - * osd: support seprate interface for cluster-internal traffic - * mds: many many snapshot, cap protocol fixes - * mon: back off on clock drift errors/warnings - * mds: fix cow on xattrs - * mds: many recurstat stat fixes - * uclient/cfuse: improved caching and readdir fixes - * mon: tri laggy standby MDS's from map - * osd: data integrity fixes - * trim stale connections - * osd: fix hang during mkfs - * improved debug log on SIGSEG - * uclient/cfuse: cache readdir results - * mon: improved osd failure smarts - * mds/osd: tcmalloc (less memory utilization) - * mds: set file layout/striping on per-directory/subtree basis - * cfuse: mount server subdir - * cfuse: log to file if run as daemon - * allow monitor hostnames on command line - * mon: ability to blacklist/unblacklist clients for osd cluster - * cdebugpack: add debug capture tool - * mds: respawn on suicide - * msgr: more efficient reconnect resync - * standard date/time format - - -- Sage Weil Fri, 15 Oct 2010 13:42:24 -0700 - -ceph (0.21.3-1) unstable; urgency=low - - * cfuse: fixed readdir for large directories - * cfuse: fixed truncation (now passes fsx) - * radosgw: fixed information leakage between sessions - * radosgw: support wildcard dns for bucketname.domain/object access - * mds: fixed snap bug with directory renames - * mon: less log noise - * osdmap: allowed blacklisting of entire ips - * mds: fix journal replay bug with reconnecting clients - * mds: fix journal replay bug with inconsistent lock state, subsequent crash - - -- Sage Weil Fri, 17 Sep 2010 15:44:06 -0700 - -ceph (0.21.2-1) unstable; urgency=low - - * osd: less log noise - * osd: mark down old heartbeat peers - * filejournal: clean up init sequence, fewer confusing errors on startup - * msgr: fix throttler leak when closing connections (fixes deadlock) - * osdmaptool: don't crash on corrupt input - * crush: error out instead of crashing on ambiguous hierarchy - * mds: error to client on invalid op - * mds: fix ENOTEMPTY checks on rmdir - * osd: fix race between reads and cloned objects - * auth: fix keyring load search when $HOME not defined - * client: fix xattr cap writeback - * client: fix snap vs metadata writeback - * osd: fix journal, btrfs throttling - * msgr: fix memory leak on closed connections - - -- Sage Weil Thu, 26 Aug 2010 15:22:42 -0700 - -ceph (0.21.1-1) unstable; urgency=high - - * ceph.spec: many fixes - * mds mds->client message crash - * monmaptool: man page typo - * rados: usage fix - * osd: fix heartbeat to/from node - * osd: fix replies to dup/already committed requests - * librados: hpp fix - * mds: fix cap/snaprealm behavior on readdir - * debian: fix fuse-utils depcs - * cclass: fix .so loading - * osd: fix crazy slowdown during recovery/repeering due to hadnle_osd_map - * cauthtool: fix man page example for fs clients - * mkcephfs to /sbin - * fix log rotation - - -- Sage Weil Wed, 11 Aug 2010 14:55:25 -0700 - -ceph (0.21-1) unstable; urgency=low - - * improved logging infrastructure - * log rotation - * mkfs improvements - * rbd tool, class (rados block device) - * mds: return ENOTEMPTY when removing directory with snapshots - * mds: lazy io support - * msgr: send messages directly to connection handle (w/o looking up - destination address) - * faster atomic via libatomic-ops - * cfuse now stable - * mon: recovery improvements (e.g., when one mon is down for a long time) - * mon: warn on monitor clock drift - * osd: large object support - * osd: heartbeat fixes - * osd: journaling fixes, improvements (bugs, better use of direct io) - * osd: snapshot rollback op (for rbd) - * radosgw fixes, improvements - * many memory leak fixes - - -- Sage Weil Tue, 27 Jul 2010 12:35:09 -0700 - -ceph (0.20.2-1) unstable; urgency=low - * Initial release (Closes: #506040) - -- sage Tue, 20 Jul 2010 19:40:44 -0800 + -- Sage Weil Sun, 21 Nov 2010 15:22:21 -0800 diff --git a/debian/control b/debian/control index c2db752f4d8..5df09a6756f 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,9 @@ Source: ceph Section: admin Priority: optional +Homepage: http://ceph.newdream.net/ +Vcs-Git: git://ceph.newdream.net/git/ceph.git +Vcs-Browser: http://ceph.newdream.net/git/?p=ceph.git;a=summary Maintainer: Sage Weil Build-Depends: debhelper (>= 6.0.7~), autotools-dev, autoconf, automake, cdbs, libfuse-dev, libboost-dev, libedit-dev, libssl-dev, libtool, libexpat1-dev, libfcgi-dev, libatomic-ops-dev, libgoogle-perftools-dev, pkg-config, libgtkmm-2.4-dev Standards-Version: 3.9.1 diff --git a/debian/libceph1-dev.install b/debian/libceph1-dev.install index 56d50b92fa2..9951a2b343c 100644 --- a/debian/libceph1-dev.install +++ b/debian/libceph1-dev.install @@ -1,4 +1,4 @@ -/usr/lib/libceph.so -/usr/lib/libceph.a -/usr/lib/libceph.la -/usr/include/ceph/libceph.h +usr/lib/libceph.so +usr/lib/libceph.a +usr/lib/libceph.la +usr/include/ceph/libceph.h diff --git a/debian/libceph1.install b/debian/libceph1.install index de0173ec5c3..7008bb64222 100644 --- a/debian/libceph1.install +++ b/debian/libceph1.install @@ -1,2 +1,2 @@ -/usr/lib/libceph.so.* +usr/lib/libceph.so.* diff --git a/debian/libcrush1-dev.install b/debian/libcrush1-dev.install index 63e47212f47..e2d180e235d 100644 --- a/debian/libcrush1-dev.install +++ b/debian/libcrush1-dev.install @@ -1,7 +1,7 @@ -/usr/lib/libcrush.so -/usr/lib/libcrush.a -/usr/lib/libcrush.la -/usr/include/crush/hash.h -/usr/include/crush/types.h -/usr/include/crush/mapper.h -/usr/include/crush/crush.h +usr/lib/libcrush.so +usr/lib/libcrush.a +usr/lib/libcrush.la +usr/include/crush/hash.h +usr/include/crush/types.h +usr/include/crush/mapper.h +usr/include/crush/crush.h diff --git a/debian/libcrush1.install b/debian/libcrush1.install index 8954117f957..192b545e580 100644 --- a/debian/libcrush1.install +++ b/debian/libcrush1.install @@ -1,2 +1,2 @@ -/usr/lib/libcrush.so.* +usr/lib/libcrush.so.* diff --git a/debian/librados1-dev.install b/debian/librados1-dev.install index 3ed387a3947..37c93ae4505 100644 --- a/debian/librados1-dev.install +++ b/debian/librados1-dev.install @@ -1,11 +1,11 @@ -/usr/lib/librados.so -/usr/lib/librados.a -/usr/lib/librados.la -/usr/include/rados/librados.h -/usr/include/rados/librados.hpp -/usr/include/rados/buffer.h -/usr/include/rados/atomic.h -/usr/include/rados/page.h -/usr/include/rados/crc32c.h -/usr/include/rados/Spinlock.h -/usr/include/rados/assert.h +usr/lib/librados.so +usr/lib/librados.a +usr/lib/librados.la +usr/include/rados/librados.h +usr/include/rados/librados.hpp +usr/include/rados/buffer.h +usr/include/rados/atomic.h +usr/include/rados/page.h +usr/include/rados/crc32c.h +usr/include/rados/Spinlock.h +usr/include/rados/assert.h diff --git a/debian/librados1.install b/debian/librados1.install index 49e2fd5e2d6..8ba139a94f1 100644 --- a/debian/librados1.install +++ b/debian/librados1.install @@ -1,2 +1,2 @@ -/usr/lib/librados.so.* +usr/lib/librados.so.* diff --git a/debian/move_dbg_files.sh b/debian/move_dbg_files.sh deleted file mode 100755 index 6f2f4cce2d5..00000000000 --- a/debian/move_dbg_files.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -for f in ceph ceph-fuse ceph-client-tools libcrush1 librados1 libceph1 radosgw -do - echo moving $f unstripped binaries into $f-dbg - mkdir -p debian/$f-dbg/usr/lib - mv debian/$f/usr/lib/debug debian/$f-dbg/usr/lib -done diff --git a/debian/radosgw.install b/debian/radosgw.install index 0a69f455f12..95ee4dd32f6 100644 --- a/debian/radosgw.install +++ b/debian/radosgw.install @@ -1,4 +1,5 @@ usr/bin/radosgw usr/bin/radosgw_admin +usr/bin/radosacl usr/share/man/man8/radosgw.8 usr/share/man/man8/radosgw_admin.8 diff --git a/debian/rules b/debian/rules index c5504d2a499..24d3671b221 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,13 @@ #!/usr/bin/make -f # -*- makefile -*- export DH_VERBOSE=1 +export DESTDIR=$(CURDIR)/debian/tmp + configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp + build: build-stamp build-stamp: configure-stamp dh_testdir @@ -16,43 +19,55 @@ build-stamp: configure-stamp cp src/logrotate.conf debian/ceph.logrotate touch $@ -clean: + +clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp - test ! -f Makefile || $(MAKE) clean + [ ! -f Makefile ] || $(MAKE) clean + rm -f Makefile config.log config.status + rm -rf src/.deps + rm -f debian/ceph.init + + dh_clean - dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs - $(MAKE) DESTDIR=$(CURDIR) install - + $(MAKE) DESTDIR=$(DESTDIR) install # Add here commands to install the package into debian/testpack. # Build architecture-independent files here. binary-indep: build install + # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs - dh_installdocs + dh_installdocs --all ChangeLog dh_installexamples - dh_install + dh_install --sourcedir=$(DESTDIR) --list-missing dh_installlogrotate dh_installinit dh_installman dh_lintian dh_link - dh_strip -k --exclude=libcls_ - chmod +x debian/move_dbg_files.sh && debian/move_dbg_files.sh + dh_strip -pceph --dbg-package=ceph-dbg + dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg + dh_strip -pceph-client-tools --dbg-package=ceph-client-tools-dbg + dh_strip -plibcrush1 --dbg-package=libcrush1-dbg + dh_strip -plibrados1 --dbg-package=librados1-dbg + dh_strip -plibceph1 --dbg-package=libceph1-dbg + dh_strip -pradosgw --dbg-package=radosgw-dbg +# dh_strip -k --exclude=libcls_ +# chmod +x debian/move_dbg_files.sh && debian/move_dbg_files.sh dh_compress dh_fixperms @@ -62,5 +77,6 @@ binary-arch: build install dh_gencontrol dh_md5sums dh_builddeb + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure From 559d4d207e9bd1c025afd07670634b706372c6ee Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Nov 2010 09:22:42 -0800 Subject: [PATCH 5/6] ceph.spec.in: include gui files Signed-off-by: Sage Weil --- ceph.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/ceph.spec.in b/ceph.spec.in index 5c06cea3166..f2f393084c6 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -125,6 +125,7 @@ fi %{_libdir}/libcrush.so.* %{_libdir}/librados.so.* %{_libdir}/rados-classes/libcls_rbd.so.* +%{_datadir}/ceph_tool/gui_resources/* /sbin/mkcephfs /sbin/mount.ceph %{_libdir}/ceph From 1b06332de69b332092d115451efbd29afec79269 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Nov 2010 11:43:19 -0800 Subject: [PATCH 6/6] osd: make recovery_oids debug list per-pg Otherwise we hit bad asserts if an object of the same name in different pools is getting recovered simultaneously. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 16 +++++++--------- src/osd/OSD.h | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 797916d9cf1..4390e35bca8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4358,7 +4358,7 @@ void OSD::do_recovery(PG *pg) << " (" << recovery_ops_active << "/" << g_conf.osd_recovery_max_active << " rops) on " << *pg << dendl; #ifdef DEBUG_RECOVERY_OIDS - dout(20) << " active was " << recovery_oids << dendl; + dout(20) << " active was " << recovery_oids[pg->info.pgid] << dendl; #endif int started = pg->start_recovery_ops(max); @@ -4385,10 +4385,9 @@ void OSD::start_recovery_op(PG *pg, const sobject_t& soid) recovery_ops_active++; #ifdef DEBUG_RECOVERY_OIDS - dout(20) << " active was " << recovery_oids << dendl; - assert(recovery_oids.count(soid) == 0); - recovery_oids.insert(soid); - assert((int)recovery_oids.size() == recovery_ops_active); + dout(20) << " active was " << recovery_oids[pg->info.pgid] << dendl; + assert(recovery_oids[pg->info.pgid].count(soid) == 0); + recovery_oids[pg->info.pgid].insert(soid); #endif recovery_wq.unlock(); @@ -4407,10 +4406,9 @@ void OSD::finish_recovery_op(PG *pg, const sobject_t& soid, bool dequeue) assert(recovery_ops_active >= 0); #ifdef DEBUG_RECOVERY_OIDS - dout(20) << " active oids was " << recovery_oids << dendl; - assert(recovery_oids.count(soid)); - recovery_oids.erase(soid); - assert((int)recovery_oids.size() == recovery_ops_active); + dout(20) << " active oids was " << recovery_oids[pg->info.pgid] << dendl; + assert(recovery_oids[pg->info.pgid].count(soid)); + recovery_oids[pg->info.pgid].erase(soid); #endif if (dequeue) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 6cfbaac0288..0fb6cd38522 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -694,7 +694,7 @@ protected: utime_t defer_recovery_until; int recovery_ops_active; #ifdef DEBUG_RECOVERY_OIDS - set recovery_oids; + map > recovery_oids; #endif struct RecoveryWQ : public ThreadPool::WorkQueue {