]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoclient: fix readder result merge
Sage Weil [Tue, 30 Aug 2011 14:09:06 +0000 (07:09 -0700)]
client: fix readder result merge

When merging readdir results into the cache, we want to remove any names
_preceeding_ the current item before updating it.  Then, at the end, we
clean up the trailing items.

This fixes a cfuse crash on workunits/snaps/snaptest-2.sh.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agov0.34 v0.34
Sage Weil [Sat, 27 Aug 2011 04:48:47 +0000 (21:48 -0700)]
v0.34

14 years agoobjectcacher: only want for commit
Sage Weil [Fri, 26 Aug 2011 16:47:03 +0000 (09:47 -0700)]
objectcacher: only want for commit

There was some old, weird stuff going on here where we would wait for the
ACK and COMMIT separately.  This is just wrong.  Writeback does not
complete until the data is committed on disk.

Simplify by waiting only for commit, removing all the 'ack' code, and
going back to a single callback (flush_set).

I didn't notice this for 05063867e2a54176ffc9bbc73391f52766ab403f; both of
these cleanups are needed to fix this.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoobjectcacher: remove uncommitted xlist<>; fix broken purge() cleanup
Sage Weil [Thu, 25 Aug 2011 19:37:18 +0000 (12:37 -0700)]
objectcacher: remove uncommitted xlist<>; fix broken purge() cleanup

There was a problem where:

 - we would dirty some buffers on an object
   - bump dirty_tx count
 - flush()
   - this adds the Object to ObjectSet::uncommitted
 - truncate
   - client clears FILE_BUFFER cap_ref
   - Object::purge()
     - clear dirty_tx count
 - client puts last inode
   - Object::uncommitted is not empty in ~ObjectSet

(This was triggered after several runs of workunits/suites/blogbensh.sh
on sepia.)

It turns out the uncommitted xlist<> is pretty useless, though: the same
information is captured in the dirty_tx counter.  We add a separate
counter to the Object itself (for the benefit of Object::can_close()).

We also clean up Object::purge() to call truncate(0), a small
simplification.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: drop useless insert_trace timestamp argument
Sage Weil [Wed, 24 Aug 2011 23:54:02 +0000 (16:54 -0700)]
client: drop useless insert_trace timestamp argument

This is reachable via request.  It was also misnamed in the header :/.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: be careful about replacing dentries during readdir assimilation
Sage Weil [Wed, 24 Aug 2011 23:51:15 +0000 (16:51 -0700)]
client: be careful about replacing dentries during readdir assimilation

When we are assimilate readdir results into our cache, we need to be more
careful about replacing existing dentries.  We were calling
insert_dentry_inode(), which would replace a name if it already exists,
which might include pd->first, an active iterator.

Move the dentry link/relink into the caller (where we already have an
iterator pointing to the existing item, if any).  Then update the dentry
lease information separately.

Fixes: #1391
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: factor update_dentry_lease() out of insert_dentry_inode()
Sage Weil [Wed, 24 Aug 2011 23:25:49 +0000 (16:25 -0700)]
client: factor update_dentry_lease() out of insert_dentry_inode()

The first bit of insert_dentry_inode() handles the details of checking
whether an item still exists, un/relinking it, etc.

The second bit just updates the dentry lease information.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: carry inode reference across calls to _flush
Sage Weil [Wed, 24 Aug 2011 22:04:10 +0000 (15:04 -0700)]
client: carry inode reference across calls to _flush

Also drop the unused _flush Context* argument.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: fix waiting_for_zero clearing, again
Sage Weil [Wed, 24 Aug 2011 18:01:00 +0000 (11:01 -0700)]
journaler: fix waiting_for_zero clearing, again

We can only clear this when we have >= a period between flush_pos and
write_pos.

Clear the flag in _do_flush() so the check is not fragile, should this
ever be changed in the future.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: only link directories into hierarchy once
Sage Weil [Wed, 24 Aug 2011 16:31:22 +0000 (09:31 -0700)]
client: only link directories into hierarchy once

Directories can only link into the hierarchy once.  We assert as much
in readdir_r_cb().  Fix link() so that it unlinked the directory from the
old location when relinking somewhere new.  Be careful to do this after
we take inode refs to avoid any unpleasantness.

Fixes: #1429
Reported-by: Sam Lang <samlang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: fix store_state
Sage Weil [Wed, 24 Aug 2011 04:25:13 +0000 (21:25 -0700)]
mon: fix store_state

We need to bound the range we write to disk by m->last_committed; this got
lost in translation in commit dfab2c91f53289b1d527fb87126a639f5d5275f1.

Fixes paxos crashes in handle_begin

mon/Paxos.cc: In function 'void Paxos::handle_begin(MMonPaxos*)', in thread '0x7fc74d11f700'
mon/Paxos.cc: 393: FAILED assert(begin->last_committed == last_committed)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: fix waiting_for_zero clearing
Sage Weil [Wed, 24 Aug 2011 00:33:44 +0000 (17:33 -0700)]
journaler: fix waiting_for_zero clearing

Clear this flag only if we know no subsequent flushes could be waiting on
a prezero operation.

Fixes MDS journaling hang under heavy journal load.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agopipe.c: #define GNU_SOURCE
Colin Patrick McCabe [Mon, 22 Aug 2011 22:06:16 +0000 (15:06 -0700)]
pipe.c: #define GNU_SOURCE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd_types: fix category encoding in object_info_t
Sage Weil [Tue, 23 Aug 2011 16:24:25 +0000 (09:24 -0700)]
osd_types: fix category encoding in object_info_t

This was mis-merged in f6ff0f14e9a5b70d5ce0277975d321f10e3b39c7.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: open+pin stray dirfrags on startup
Sage Weil [Mon, 22 Aug 2011 20:58:39 +0000 (13:58 -0700)]
mds: open+pin stray dirfrags on startup

This ensures that the stray dirfrags are always open, which in turn ensures
that whenever we add straydn items the rstats/fragstats will get updated
properly.  This is a better solution than d3d767a.

Now we can assert the stray dirfrag is open in
get_or_create_stray_dentry() instead of calling get_or_open_dirfrag().

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoRevert "mds: do not complain/assert about stray inode rstat/fragstat consistency"
Sage Weil [Mon, 22 Aug 2011 20:19:04 +0000 (13:19 -0700)]
Revert "mds: do not complain/assert about stray inode rstat/fragstat consistency"

This reverts commit d3d767a2a36caefdeb8a94abba1673cf8304c793.

A better solution is to keep the stray frags loaded+pinned.

14 years agocommon/pipe: add function to do pipe2(O_CLOEXEC)
Colin Patrick McCabe [Mon, 22 Aug 2011 17:48:15 +0000 (10:48 -0700)]
common/pipe: add function to do pipe2(O_CLOEXEC)

Support old systems that don't have O_CLOEXEC.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoPG: Move reset_last_warm_restart to Initial::exit
Samuel Just [Mon, 22 Aug 2011 17:09:06 +0000 (10:09 -0700)]
PG: Move reset_last_warm_restart to Initial::exit

Previously, reset_last_warm_restart was only invoked when handle_create
was used.  This misses cases where the pg is initialized via a Notify,
Log, or Info message.  reset_last_warm_restart will now be called from
the Initial state exit handler in order to handle the other cases.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years ago.gitignore: scratchtool
Sage Weil [Sun, 21 Aug 2011 23:17:32 +0000 (16:17 -0700)]
.gitignore: scratchtool

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agotestlibrbd: add missing va_end()
Sage Weil [Sun, 21 Aug 2011 04:05:47 +0000 (21:05 -0700)]
testlibrbd: add missing va_end()

Coverity cid 57, 58

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: remove redundant line
Yehuda Sadeh [Sun, 21 Aug 2011 06:32:12 +0000 (23:32 -0700)]
rgw: remove redundant line

14 years agomds: do not complain/assert about stray inode rstat/fragstat consistency
Sage Weil [Sun, 21 Aug 2011 03:42:30 +0000 (20:42 -0700)]
mds: do not complain/assert about stray inode rstat/fragstat consistency

We instantiate the stray dirfrags without reading the fragstat off of disk
because it's faster, we know the dentry is unique, and we don't care about
the stats.  It can lead to inconsistency between the dirfrag frag/rstat
and the inodes, though.  Silently clean it up when we hit it; that's
simpler than not maintaining it at all for those directories.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agopaxos: fix store_state
Sage Weil [Sat, 20 Aug 2011 22:04:55 +0000 (15:04 -0700)]
paxos: fix store_state

Stop if we empty out the map completely.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomonclient: be less chatty about stray messages
Sage Weil [Sat, 20 Aug 2011 16:56:49 +0000 (09:56 -0700)]
monclient: be less chatty about stray messages

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agodebian: librbd headers require librados headers
Sage Weil [Sat, 20 Aug 2011 14:31:54 +0000 (07:31 -0700)]
debian: librbd headers require librados headers

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoscratchtool: not a test suite
Yehuda Sadeh [Sat, 20 Aug 2011 06:40:40 +0000 (23:40 -0700)]
scratchtool: not a test suite

14 years agoRevert "Remove old rados tests"
Yehuda Sadeh [Sat, 20 Aug 2011 06:36:51 +0000 (23:36 -0700)]
Revert "Remove old rados tests"

This reverts commit 665fd8214d4f8fa54a675c2998b22613424a6cb3.

Conflicts:

src/testradospp.cc

14 years agoosd: fix compilation
Yehuda Sadeh [Sat, 20 Aug 2011 06:32:36 +0000 (23:32 -0700)]
osd: fix compilation

14 years agoosd: call incorrect osdmap addrs errors
Sage Weil [Sat, 20 Aug 2011 03:37:33 +0000 (20:37 -0700)]
osd: call incorrect osdmap addrs errors

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: fail operation when trying to clone to the same shadow
Yehuda Sadeh [Sat, 20 Aug 2011 00:33:27 +0000 (17:33 -0700)]
rgw: fail operation when trying to clone to the same shadow

not necessary to recreate the same shadow, and also provides mutual
exclusion

14 years agomds: xlocker_caps are supplemental to caps
Sage Weil [Fri, 19 Aug 2011 23:16:26 +0000 (16:16 -0700)]
mds: xlocker_caps are supplemental to caps

Like loner_caps, xlocker_caps are additional caps to the any caps.

In practical terms, this only affects (currently) the LOCK_XLOCKDONE state
for the filelock, where it's less work than making sure what is in the any
column is also |'d onto the xlocker column.  Easier to read :)

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: only client hold xlock in xlockdone can change lock state
Sage Weil [Fri, 19 Aug 2011 23:15:06 +0000 (16:15 -0700)]
mds: only client hold xlock in xlockdone can change lock state

If we are in xlockdone, only the client holding that xlock can adjus the
lock state (e.g., relock).  Other clients have to wait until the xlock
cycle unwinds completely.

Fixes: #1417
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: fix prepare_atomic_for_write
Yehuda Sadeh [Fri, 19 Aug 2011 23:20:55 +0000 (16:20 -0700)]
rgw: fix prepare_atomic_for_write

14 years agomds: update truncate_pending on O_TRUNC; pass old_size on O_TRUNC open
Sage Weil [Fri, 19 Aug 2011 20:53:06 +0000 (13:53 -0700)]
mds: update truncate_pending on O_TRUNC; pass old_size on O_TRUNC open

We were missing truncate_pending++ in O_TRUNC path.  Use a common helper.

Pass old_size on O_TRUNC open.  (This was the real bug we worked around in
79db9fc509933429f4a8f4aca6d3da5517c43d1f.)

Only do an actual truncate if old_size > 0.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados-api: fix #include order
Sage Weil [Fri, 19 Aug 2011 20:07:42 +0000 (13:07 -0700)]
rados-api: fix #include order

Fixes conflict with linux types on fatty.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocconf: fix clitest
Sage Weil [Fri, 19 Aug 2011 20:05:42 +0000 (13:05 -0700)]
cconf: fix clitest

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocconf: --filter-key and --filter-key-value
Sage Weil [Fri, 19 Aug 2011 19:50:11 +0000 (12:50 -0700)]
cconf: --filter-key and --filter-key-value

Filter out section list to sections that define a given key or that
set a key to a given value.

This is useful to, for example, filter out sections mapped to the current
host.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix LOCK_LOCK_XLOCK lock state name/string
Sage Weil [Fri, 19 Aug 2011 19:51:00 +0000 (12:51 -0700)]
mds: fix LOCK_LOCK_XLOCK lock state name/string

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: add missing cache locking
Yehuda Sadeh [Fri, 19 Aug 2011 19:56:38 +0000 (12:56 -0700)]
rgw: add missing cache locking

this was overlooked when switch to the multithreaded configuration

14 years agorgw: was missing return value
Yehuda Sadeh [Fri, 19 Aug 2011 19:33:08 +0000 (12:33 -0700)]
rgw: was missing return value

14 years agorgw: some more race fixes
Yehuda Sadeh [Fri, 19 Aug 2011 19:27:43 +0000 (12:27 -0700)]
rgw: some more race fixes

14 years agotest/rados-api/misc.cc: update tests after API change
Colin Patrick McCabe [Fri, 19 Aug 2011 16:51:04 +0000 (09:51 -0700)]
test/rados-api/misc.cc: update tests after API change

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomonitorstore: drop unused sync value
Sage Weil [Fri, 19 Aug 2011 16:49:16 +0000 (09:49 -0700)]
monitorstore: drop unused sync value

This is inherently unsafe, because we write to a final filename without
ensuring the data is on disk.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agopaxos: use MonitorStore::put_bl_sn_map() to commit batches of values
Sage Weil [Fri, 19 Aug 2011 16:47:29 +0000 (09:47 -0700)]
paxos: use MonitorStore::put_bl_sn_map() to commit batches of values

This allows us to (safely) do fsync vs sync optimizations.  The old code
would write values to the final names and then sync(2), but a crash in
between could leave 0-length (non-temporary) files and crash.

Fixes: #1414
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomonitorstore: implement put_bl_sn_map
Sage Weil [Fri, 19 Aug 2011 16:46:14 +0000 (09:46 -0700)]
monitorstore: implement put_bl_sn_map

This will commit a big batch of values safely.  We push it down into
MonitorStore so we can avoid an fsync(2) per file.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: whitespace
Sage Weil [Fri, 19 Aug 2011 16:15:56 +0000 (09:15 -0700)]
mon: whitespace

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoatomic_t: update spinlock implementation.
Greg Farnum [Fri, 19 Aug 2011 16:15:42 +0000 (09:15 -0700)]
atomic_t: update spinlock implementation.

Somebody added a 'set' function without adding the non-atomic_ops
version!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorgw: reread obj meta on racing write operation
Yehuda Sadeh [Fri, 19 Aug 2011 06:35:25 +0000 (23:35 -0700)]
rgw: reread obj meta on racing write operation

14 years agoReplicatedPG: Don't crash when a clone is missing
Samuel Just [Fri, 19 Aug 2011 01:15:53 +0000 (18:15 -0700)]
ReplicatedPG: Don't crash when a clone is missing

Print an error rather than crashing when _scrub finds a missing
clone.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agofile_layout.sh: add test for setting a new data pool
Greg Farnum [Thu, 18 Aug 2011 18:23:42 +0000 (11:23 -0700)]
file_layout.sh: add test for setting a new data pool

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge branch 'wip-librados-tests'
Colin Patrick McCabe [Fri, 19 Aug 2011 00:00:38 +0000 (17:00 -0700)]
Merge branch 'wip-librados-tests'

Conflicts:
src/include/rados/librados.hpp
src/librados.cc
src/rgw/rgw_rados.cc
src/testradospp.cc

14 years agoRemove old rados tests
Colin Patrick McCabe [Thu, 18 Aug 2011 23:34:48 +0000 (16:34 -0700)]
Remove old rados tests

These tests have been supplanted by the rados-api gtests.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: fix locator for shadow objects
Yehuda Sadeh [Thu, 18 Aug 2011 23:33:18 +0000 (16:33 -0700)]
rgw: fix locator for shadow objects

14 years agomds: share max_size on any client_range adjustment
Sage Weil [Thu, 18 Aug 2011 22:15:13 +0000 (15:15 -0700)]
mds: share max_size on any client_range adjustment

We were missing this on open + O_CREAT (now triggered by cfuse), on open +
O_TRUNC, and on mknod.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoadd WatchNotifyTimeoutTestPP
Colin Patrick McCabe [Thu, 18 Aug 2011 22:06:54 +0000 (15:06 -0700)]
add WatchNotifyTimeoutTestPP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: fix a double free in GetObj
Yehuda Sadeh [Thu, 18 Aug 2011 22:06:32 +0000 (15:06 -0700)]
rgw: fix a double free in GetObj

14 years agotest/rados-api/misc.cc: test CloneRange
Colin Patrick McCabe [Thu, 18 Aug 2011 19:55:12 +0000 (12:55 -0700)]
test/rados-api/misc.cc: test CloneRange

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

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

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agotest/rados-api/misc.cc: test Operate2PP
Colin Patrick McCabe [Thu, 18 Aug 2011 18:15:37 +0000 (11:15 -0700)]
test/rados-api/misc.cc: test Operate2PP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoOperate1PP: test CEPH_OSD_CMPXATTR_OP_EQ
Colin Patrick McCabe [Thu, 18 Aug 2011 18:08:10 +0000 (11:08 -0700)]
Operate1PP: test CEPH_OSD_CMPXATTR_OP_EQ

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agolibrados: remove unused operate param
Colin Patrick McCabe [Thu, 18 Aug 2011 17:03:02 +0000 (10:03 -0700)]
librados: remove unused operate param

The last parameter of operate, aio_operate was unused and unchecked.
Remove it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agotest/rados-api/misc.cc: test Operate1PP
Colin Patrick McCabe [Wed, 17 Aug 2011 22:40:33 +0000 (15:40 -0700)]
test/rados-api/misc.cc: test Operate1PP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agoTest rados_exec, C and C++ version
Colin Patrick McCabe [Wed, 17 Aug 2011 20:52:14 +0000 (13:52 -0700)]
Test rados_exec, C and C++ version

* Test rados_exec, C and C++ version

* add test_exec action

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rados-api/misc.cc: test tmap_update
Colin Patrick McCabe [Wed, 17 Aug 2011 20:18:05 +0000 (13:18 -0700)]
test/rados-api/misc.cc: test tmap_update

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agoqa/workunits/rados/test.sh:explicitly invoke tests
Colin Patrick McCabe [Wed, 17 Aug 2011 19:41:15 +0000 (12:41 -0700)]
qa/workunits/rados/test.sh:explicitly invoke tests

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd qa/workunits/rados/test.sh
Colin Patrick McCabe [Wed, 17 Aug 2011 19:35:39 +0000 (12:35 -0700)]
Add qa/workunits/rados/test.sh

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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>