]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoosd: fix _activate_committed() crash
Sage Weil [Thu, 18 Aug 2011 18:16:51 +0000 (11:16 -0700)]
osd: fix _activate_committed() crash

Do not dereference acting[0] unless we know it is still valid.

Take a reference when scheduling the transaction, and drop it in the
completion, to ensure that the PG isn't removed out from underneath us.

Fixes: #1379
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocompatset: dump json
Sage Weil [Thu, 18 Aug 2011 17:07:12 +0000 (10:07 -0700)]
compatset: dump json

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agouninline a bunch of buffer.h stuff
Sage Weil [Mon, 15 Aug 2011 20:14:15 +0000 (13:14 -0700)]
uninline a bunch of buffer.h stuff

14 years agouninline osd types
Sage Weil [Mon, 15 Aug 2011 20:14:07 +0000 (13:14 -0700)]
uninline osd types

14 years agomds: add debug_mds_locker
Sage Weil [Thu, 18 Aug 2011 01:37:55 +0000 (18:37 -0700)]
mds: add debug_mds_locker

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrbd: rbd_list: return buffer size, not element count
Sage Weil [Wed, 17 Aug 2011 23:16:01 +0000 (16:16 -0700)]
librbd: rbd_list: return buffer size, not element count

Fixes: #1397
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: add/remove data_pg_pools from mdsmap
Sage Weil [Wed, 17 Aug 2011 23:53:28 +0000 (16:53 -0700)]
mon: add/remove data_pg_pools from mdsmap

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: last_warm_restart must be set to the current epoch
Samuel Just [Wed, 17 Aug 2011 23:24:07 +0000 (16:24 -0700)]
PG: last_warm_restart must be set to the current epoch

Previously, last_warm_restart did not get set until the
first time the pg was restarted.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomds: explain weird encoding
Sage Weil [Wed, 17 Aug 2011 23:12:14 +0000 (16:12 -0700)]
mds: explain weird encoding

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: whitespace
Sage Weil [Wed, 17 Aug 2011 22:53:22 +0000 (15:53 -0700)]
mds: whitespace

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: drop unused projected dirfrag_t arg for EMetaBlob::add_primary_dentry
Sage Weil [Wed, 17 Aug 2011 22:47:55 +0000 (15:47 -0700)]
mds: drop unused projected dirfrag_t arg for EMetaBlob::add_primary_dentry

Not used.  If it is later, we need to project it properly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: drop unused snapbl arg
Sage Weil [Wed, 17 Aug 2011 22:43:21 +0000 (15:43 -0700)]
mds: drop unused snapbl arg

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: avoid explicit passing of projected_xattrs
Sage Weil [Wed, 17 Aug 2011 22:40:47 +0000 (15:40 -0700)]
mds: avoid explicit passing of projected_xattrs

No need to pass this in explicitly; we can look in the projected inode for
it.  This actually fixes a race where a journaled inode following a
setxattr will not journal the projected xattrs.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: avoid passing snapbl around explicitly
Sage Weil [Wed, 17 Aug 2011 22:36:06 +0000 (15:36 -0700)]
mds: avoid passing snapbl around explicitly

We now properly track projected snaprealm/sr_t's.  Use that for journaling
instead of manually passing around a snapbl.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: use snaprealm projection for MDCache::snaprealm_create()
Sage Weil [Wed, 17 Aug 2011 22:33:28 +0000 (15:33 -0700)]
mds: use snaprealm projection for MDCache::snaprealm_create()

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: simplify sr_t journaling
Sage Weil [Wed, 17 Aug 2011 22:33:11 +0000 (15:33 -0700)]
mds: simplify sr_t journaling

Drop encode/decode in SnapRealm and encode the sr_t's directly.  This way
the caller says what they mean (current or projected).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: journal inode on mksnap
Sage Weil [Wed, 17 Aug 2011 22:32:02 +0000 (15:32 -0700)]
mds: journal inode on mksnap

We were cowing but not journaling a simply-dirty inode.  Der.

Fixes: #1389
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: handle O_TRUNC when size is already 0
Sage Weil [Wed, 17 Aug 2011 21:11:15 +0000 (14:11 -0700)]
mds: handle O_TRUNC when size is already 0

We always want to go through the truncation path.  Two reasons:

 - even if the size is already 0, we still need to update ctime/mtime
 - we may not have the correct size (client could have dirty data), in
   which case we still want to bump truncate_seq etc.

Basically, we can't trust pi->size here because we are holding a wrlock,
not an xlock.  And that's fine, since we need to update the inode
unconditionally anyway.

This broke cfuse pjd open/00.t tests when we added the fuse option
atomic_o_trunc.  libceph has always been broken in this regard.

Fixes: #1393
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: send O_TRUNC open requests to MDS
Sage Weil [Wed, 17 Aug 2011 21:00:08 +0000 (14:00 -0700)]
client: send O_TRUNC open requests to MDS

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: move Inode operator<<
Sage Weil [Wed, 17 Aug 2011 20:59:57 +0000 (13:59 -0700)]
client: move Inode operator<<

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorbd: remove dup 'rm' command from man page
Sage Weil [Wed, 17 Aug 2011 19:56:09 +0000 (12:56 -0700)]
rbd: remove dup 'rm' command from man page

Fixes: #1395
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocfuse: take out accidental bad channel add
Sage Weil [Wed, 17 Aug 2011 19:53:00 +0000 (12:53 -0700)]
cfuse: take out accidental bad channel add

This was a brainstorm that snuck into last commit, grr.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: fix virtual bucket name handling
Yehuda Sadeh [Wed, 17 Aug 2011 19:55:50 +0000 (12:55 -0700)]
rgw: fix virtual bucket name handling

14 years agocfuse: make use of fuse invalidate callback optional (and off by default)
Sage Weil [Wed, 17 Aug 2011 19:07:12 +0000 (12:07 -0700)]
cfuse: make use of fuse invalidate callback optional (and off by default)

This is hitting a deadlock in fuse itself (or so it appears).  Disable it
until that's sorted out.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoformatter: remove bad asserts
Yehuda Sadeh [Wed, 17 Aug 2011 19:16:37 +0000 (12:16 -0700)]
formatter: remove bad asserts

14 years agorgw: list objects shows time in GMT, thread safety fix
Yehuda Sadeh [Wed, 17 Aug 2011 18:42:18 +0000 (11:42 -0700)]
rgw: list objects shows time in GMT, thread safety fix

14 years agosrc/perfglue/heap_profiler.cc: fix snprintf
Colin Patrick McCabe [Wed, 17 Aug 2011 18:08:34 +0000 (11:08 -0700)]
src/perfglue/heap_profiler.cc: fix snprintf

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient: compile with older libfuse2
Yehuda Sadeh [Wed, 17 Aug 2011 18:21:28 +0000 (11:21 -0700)]
client: compile with older libfuse2

14 years agoMerge branch 'wip-librados-tests'
Colin Patrick McCabe [Wed, 17 Aug 2011 17:55:39 +0000 (10:55 -0700)]
Merge branch 'wip-librados-tests'

14 years agoosd_types: fix merge
Sage Weil [Wed, 17 Aug 2011 17:47:39 +0000 (10:47 -0700)]
osd_types: fix merge

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge commit 'v0.33'
Sage Weil [Wed, 17 Aug 2011 17:47:02 +0000 (10:47 -0700)]
Merge commit 'v0.33'

14 years agov0.33 v0.33
Sage Weil [Mon, 15 Aug 2011 23:42:18 +0000 (16:42 -0700)]
v0.33

14 years agoosd: pg_stat_t: throw exception on unknown encoding
Sage Weil [Tue, 16 Aug 2011 23:37:20 +0000 (16:37 -0700)]
osd: pg_stat_t: throw exception on unknown encoding

This is better then decoding nonsense, eating ram, etc.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoqa: test rename into snapped dir
Sage Weil [Wed, 17 Aug 2011 16:06:17 +0000 (09:06 -0700)]
qa: test rename into snapped dir

Tests fix for #1399.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: mark newly created snaprealms as open
Sage Weil [Wed, 17 Aug 2011 16:02:44 +0000 (09:02 -0700)]
mds: mark newly created snaprealms as open

Fixes: #1399
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agotest/rados-api/misc.cc: test Rados::version
Colin Patrick McCabe [Wed, 17 Aug 2011 00:55:19 +0000 (17:55 -0700)]
test/rados-api/misc.cc: test Rados::version

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/list.cc: C++ version
Colin Patrick McCabe [Wed, 17 Aug 2011 00:53:48 +0000 (17:53 -0700)]
test/rados-api/list.cc: C++ version

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/snapshots.cc: C++ version
Colin Patrick McCabe [Wed, 17 Aug 2011 00:48:04 +0000 (17:48 -0700)]
test/rados-api/snapshots.cc: C++ version

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/watch_notify.cc: implement C++ ver
Colin Patrick McCabe [Wed, 17 Aug 2011 00:37:38 +0000 (17:37 -0700)]
test/rados-api/watch_notify.cc: implement C++ ver

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/stat.cc: implement C++ tests
Colin Patrick McCabe [Wed, 17 Aug 2011 00:30:34 +0000 (17:30 -0700)]
test/rados-api/stat.cc: implement C++ tests

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados/librados.h: use rados_snap_t consistently
Colin Patrick McCabe [Wed, 17 Aug 2011 00:16:09 +0000 (17:16 -0700)]
rados/librados.h: use rados_snap_t consistently

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: test RoundTripWriteFull
Colin Patrick McCabe [Tue, 16 Aug 2011 20:06:09 +0000 (13:06 -0700)]
test/rados-api/aio.cc: test RoundTripWriteFull

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: implement FlushPP
Colin Patrick McCabe [Tue, 16 Aug 2011 19:59:40 +0000 (12:59 -0700)]
test/rados-api/aio.cc: implement FlushPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: test ReturnValuePP
Colin Patrick McCabe [Tue, 16 Aug 2011 18:25:39 +0000 (11:25 -0700)]
test/rados-api/aio.cc: test ReturnValuePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: test IsSafePP
Colin Patrick McCabe [Tue, 16 Aug 2011 18:10:53 +0000 (11:10 -0700)]
test/rados-api/aio.cc: test IsSafePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: add IsCompletePP
Colin Patrick McCabe [Tue, 16 Aug 2011 17:49:34 +0000 (10:49 -0700)]
test/rados-api/aio.cc: add IsCompletePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: Add RoundTripAppendPP
Colin Patrick McCabe [Tue, 16 Aug 2011 17:40:25 +0000 (10:40 -0700)]
test/rados-api/aio.cc: Add RoundTripAppendPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: add RoundTripPP
Colin Patrick McCabe [Tue, 16 Aug 2011 17:31:07 +0000 (10:31 -0700)]
test/rados-api/aio.cc: add RoundTripPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoFix bug in turning off logging. Remove log_dir.
Colin Patrick McCabe [Tue, 16 Aug 2011 03:42:57 +0000 (20:42 -0700)]
Fix bug in turning off logging. Remove log_dir.

Fix a bug that made it impossible to turn off logging to a file.

Remove the old "log_dir" setting. It has been deprecated for a long
time, and it adds a lot of complexity to the code.

heap_profiler: use the directory that log_file is in to construct a
profiler output file name. Don't use log_dir.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Mon, 15 Aug 2011 23:34:04 +0000 (16:34 -0700)]
Merge branch 'next'

14 years agoosd: fix heartbeats after bad markdown
Sage Weil [Mon, 15 Aug 2011 23:06:22 +0000 (16:06 -0700)]
osd: fix heartbeats after bad markdown

The heartbeat start message comes from hbin messenger, which has no port
and a nonce of the pid (at startup).  When we mark ourselves down/up, and
then resend a start, the peer will send a RESETSESSION and the stat
message will get lost, and then we'll miss heartbeats.

Mark down all connections, so that when we reconnect, our start message
is not lost.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomonmaptool: don't inc bool
Sage Weil [Mon, 15 Aug 2011 23:16:00 +0000 (16:16 -0700)]
monmaptool: don't inc bool

Coverity cid 22

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocrushtool: don't inc bool
Sage Weil [Mon, 15 Aug 2011 23:15:25 +0000 (16:15 -0700)]
crushtool: don't inc bool

Coverity cid 21

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: break #include recursion
Sage Weil [Mon, 15 Aug 2011 23:14:43 +0000 (16:14 -0700)]
mds: break #include recursion

CInode.h -> SessionMap.h -> CInode.h

Coverity cid 14

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: some encoding fixes
Yehuda Sadeh [Mon, 15 Aug 2011 21:15:09 +0000 (14:15 -0700)]
rgw: some encoding fixes

14 years agorgw: handle zero and invalid max_keys
Yehuda Sadeh [Fri, 12 Aug 2011 20:21:47 +0000 (13:21 -0700)]
rgw: handle zero and invalid max_keys

14 years agorgw: create CommonPrefixes section for each prefix
Yehuda Sadeh [Fri, 12 Aug 2011 19:13:03 +0000 (12:13 -0700)]
rgw: create CommonPrefixes section for each prefix

14 years agorgw: adjust returned error when got invalid auth request
Yehuda Sadeh [Fri, 12 Aug 2011 18:39:53 +0000 (11:39 -0700)]
rgw: adjust returned error when got invalid auth request

14 years agoobsync: add SRC_SECURE, DST_SECURE
Colin Patrick McCabe [Sat, 13 Aug 2011 00:44:15 +0000 (17:44 -0700)]
obsync: add SRC_SECURE, DST_SECURE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoLibRadosAio: WaitForSafePP
Colin Patrick McCabe [Fri, 12 Aug 2011 21:55:07 +0000 (14:55 -0700)]
LibRadosAio: WaitForSafePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/aio.cc: SimpleWritePP
Colin Patrick McCabe [Fri, 12 Aug 2011 21:50:58 +0000 (17:50 -0400)]
test/rados-api/aio.cc: SimpleWritePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_setxattr: return 0 on success
Colin Patrick McCabe [Fri, 12 Aug 2011 18:13:16 +0000 (11:13 -0700)]
rados_setxattr: return 0 on success

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_write_full: remove offset parameter
Colin Patrick McCabe [Fri, 12 Aug 2011 18:07:19 +0000 (11:07 -0700)]
rados_write_full: remove offset parameter

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Fri, 12 Aug 2011 17:33:42 +0000 (10:33 -0700)]
Merge branch 'next'

14 years agolibrbd: output copy progress
Josh Durgin [Fri, 12 Aug 2011 17:48:00 +0000 (10:48 -0700)]
librbd: output copy progress

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agomds: avoid issue_caps on snapped inodes
Sage Weil [Thu, 11 Aug 2011 20:55:17 +0000 (13:55 -0700)]
mds: avoid issue_caps on snapped inodes

Only head inodes have caps.  Don't set need_issue if it's not a head inode.

This is cleaner than bailing out of issue_caps(); we shouldn't get to that
point. The places that set need_issue = true usually set gather++ too,
which also shouldn't happen on a snapped inode.

Fixes: #1390
Reported-by: Damien Churchill <damoxc@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest/rados-api/snapshots.cc:RollbackPP
Colin Patrick McCabe [Fri, 12 Aug 2011 00:54:09 +0000 (17:54 -0700)]
test/rados-api/snapshots.cc:RollbackPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/snapshots.cc:SnapGetNamePP
Colin Patrick McCabe [Fri, 12 Aug 2011 00:50:27 +0000 (17:50 -0700)]
test/rados-api/snapshots.cc:SnapGetNamePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/snapshots.cc:SelfManagedRollbackTest
Colin Patrick McCabe [Fri, 12 Aug 2011 00:45:44 +0000 (17:45 -0700)]
test/rados-api/snapshots.cc:SelfManagedRollbackTest

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoSelfManagedSnapTest: test more
Colin Patrick McCabe [Fri, 12 Aug 2011 00:30:52 +0000 (17:30 -0700)]
SelfManagedSnapTest: test more

* test more snapshot functions in SelfManagedSnapTest

* rados_ioctx_selfmanaged_snap_set_write_ctx: fix name in C file to
conform to header file

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/snapshots.cc: SelfManagedSnapTestPP
Colin Patrick McCabe [Fri, 12 Aug 2011 00:05:01 +0000 (17:05 -0700)]
test/rados-api/snapshots.cc: SelfManagedSnapTestPP

Also test SelfManagedSnapRollbackPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test XattrListPP
Colin Patrick McCabe [Thu, 11 Aug 2011 21:43:33 +0000 (14:43 -0700)]
test/rados-api/io.cc: test XattrListPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test RmXattrPP
Colin Patrick McCabe [Thu, 11 Aug 2011 21:06:07 +0000 (14:06 -0700)]
test/rados-api/io.cc: test RmXattrPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test XattrsRoundTripPP
Colin Patrick McCabe [Thu, 11 Aug 2011 20:56:12 +0000 (13:56 -0700)]
test/rados-api/io.cc: test XattrsRoundTripPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient: use localized ldout macro
Sage Weil [Thu, 11 Aug 2011 20:15:08 +0000 (13:15 -0700)]
client: use localized ldout macro

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: dump mdsmap in json
Sage Weil [Wed, 10 Aug 2011 22:18:29 +0000 (15:18 -0700)]
mon: dump mdsmap in json

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agotest/rados-api/io.cc: add RemoveTestPP
Colin Patrick McCabe [Thu, 11 Aug 2011 20:01:24 +0000 (13:01 -0700)]
test/rados-api/io.cc: add RemoveTestPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: AppendRoundTripPP,TruncPP
Colin Patrick McCabe [Thu, 11 Aug 2011 18:59:51 +0000 (11:59 -0700)]
test/rados-api/io.cc: AppendRoundTripPP,TruncPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test WriteFullRoundTripPP
Colin Patrick McCabe [Thu, 11 Aug 2011 18:19:44 +0000 (11:19 -0700)]
test/rados-api/io.cc: test WriteFullRoundTripPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test RoundTripPP, etc.
Colin Patrick McCabe [Thu, 11 Aug 2011 18:15:52 +0000 (11:15 -0700)]
test/rados-api/io.cc: test RoundTripPP, etc.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/io.cc: test SimpleWritePP
Colin Patrick McCabe [Thu, 11 Aug 2011 17:40:46 +0000 (10:40 -0700)]
test/rados-api/io.cc: test SimpleWritePP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/test.cc: add create_one_pool_pp,etc
Colin Patrick McCabe [Thu, 11 Aug 2011 17:40:29 +0000 (10:40 -0700)]
test/rados-api/test.cc: add create_one_pool_pp,etc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: add IoCtx::close
Colin Patrick McCabe [Thu, 11 Aug 2011 17:40:03 +0000 (10:40 -0700)]
librados: add IoCtx::close

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: don't wait for lock 'flushing' flag on replicas
Sage Weil [Wed, 10 Aug 2011 22:38:25 +0000 (15:38 -0700)]
mds: don't wait for lock 'flushing' flag on replicas

If we are a replica, the 'flushing' means that we had dirty scatterlock
data and are waiting for it to get flushed out to the auth copy (by
cycling from MIX->LOCK, normally).  If we end up with 'flushing' set
while in the MIX state, we can't wait for it to clear before responding
to a lock request from the primary or we'll deadlock.

On the auth, flushing means flushing to the log, which makes sense; that
will always make progress despite scatterlock activity.

This fixes a hang from 3-mds fsstress with thrashing exports.  (Strangely
I never hit this on fatty.)

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: deduplicate sparse read interpretation
Josh Durgin [Tue, 9 Aug 2011 23:14:23 +0000 (16:14 -0700)]
librbd: deduplicate sparse read interpretation

AioBlockCompletions and read_iterate each had their own copy of this
code, leading to bugs when only one was changed. Move this to a
separate function, handle_sparse_read.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrbd: make read_iterate mirror AioCompletion::complete
Josh Durgin [Tue, 9 Aug 2011 19:29:15 +0000 (12:29 -0700)]
librbd: make read_iterate mirror AioCompletion::complete

This makes testlibrbd and testlibrbdpp pass again, and
now both I/O paths have the same logic.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbd: remove useless print statements
Josh Durgin [Tue, 9 Aug 2011 21:28:32 +0000 (14:28 -0700)]
testlibrbd: remove useless print statements

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbd: NUL-terminate orig_data
Josh Durgin [Tue, 9 Aug 2011 21:19:10 +0000 (14:19 -0700)]
testlibrbd: NUL-terminate orig_data

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbd(pp): accept standard command line arguments
Josh Durgin [Tue, 9 Aug 2011 19:27:31 +0000 (12:27 -0700)]
testlibrbd(pp): accept standard command line arguments

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoosd: don't request heartbeats from down peers
Sage Weil [Wed, 10 Aug 2011 19:05:07 +0000 (12:05 -0700)]
osd: don't request heartbeats from down peers

We try to add sources for anything in peer_info, which can include down
OSDs.  Skip them.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocfuse: properly invalidate page cache data via callback
Sage Weil [Thu, 11 Aug 2011 16:58:39 +0000 (09:58 -0700)]
cfuse: properly invalidate page cache data via callback

The Client has a cache, but it is actually usually duplicating
what the kernel has in the page cache.  Use the Client callback to do a
libfuse upcall to invalidate the kernel page cache when appropriate.

Usually people didn't notice this because we were invalidating the page
cache on every file open. Stop doing that.

This gives us:
 - consistent multi-client semantics for open files
 - fewer read calls because the kernel can (re)use the page cache more
   effectively.

We are still double-caching.  We probably want to be aggressive about not
caching any clean file data in Client from cfuse since the page cache does
a better job than we do.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: add callback for cache invalidate
Sage Weil [Thu, 11 Aug 2011 16:53:53 +0000 (09:53 -0700)]
client: add callback for cache invalidate

This will get called any time an inode's cached file data is invalidated.
cfuse will use it.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: use helper to invalidate/truncate cached file data
Sage Weil [Thu, 11 Aug 2011 16:49:59 +0000 (09:49 -0700)]
client: use helper to invalidate/truncate cached file data

We invalidate cached file data in several places; use a common helper.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: fix cached file data truncation
Sage Weil [Thu, 11 Aug 2011 16:37:25 +0000 (09:37 -0700)]
client: fix cached file data truncation

We want to truncate our cached data when the file size changes, not
when truncate_size does.  This aligns us with the kernel implementation,
and it works when overwriting a file from multiple clients.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofuse: enable atomic_o_trunc
Sage Weil [Thu, 11 Aug 2011 00:10:12 +0000 (17:10 -0700)]
fuse: enable atomic_o_trunc

The MDS does this atomically.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofuse: allow big writes
Sage Weil [Wed, 10 Aug 2011 23:57:57 +0000 (16:57 -0700)]
fuse: allow big writes

Easiest 500% performance improvement ever!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoAdd test/rados-api/misc.cc
Colin Patrick McCabe [Thu, 11 Aug 2011 00:06:13 +0000 (17:06 -0700)]
Add test/rados-api/misc.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'wip-pg-creation'
Greg Farnum [Wed, 10 Aug 2011 23:44:04 +0000 (16:44 -0700)]
Merge branch 'wip-pg-creation'

14 years agolibrados: implement/document tmap_{get,put}
Sage Weil [Wed, 10 Aug 2011 23:07:33 +0000 (16:07 -0700)]
librados: implement/document tmap_{get,put}

These aren't strictly necessary now (you can just read the raw object or
do a writefull and get the same thing) but this way we document the format
and can change the backend to be smarter in the future without changing up
the interface.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest/rados-api/snapshots: add SelfManagedSnapTest
Colin Patrick McCabe [Wed, 10 Aug 2011 22:55:27 +0000 (15:55 -0700)]
test/rados-api/snapshots: add SelfManagedSnapTest

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>