Greg Farnum [Thu, 22 May 2014 04:41:23 +0000 (21:41 -0700)]
cephfs-java: build against older jni headers
Older versions of the JNI interface expected non-const parameters
to their memory move functions. It's unpleasant, but won't actually
change the memory in question, to do a cast_const in order to satisfy
those older headers. (And even if it *did* modify the memory, that
would be okay given our single user.)
Ilya Dryomov [Mon, 12 May 2014 08:30:45 +0000 (12:30 +0400)]
mon: set MMonGetVersionReply tid
Currently we don't set MMonGetVersionReply tid even if the original
MMonGetVersion message had a non-zero tid. This is bad for the kernel
client, which has the infrastructure in place that relies on tids to
lookup message buffers and contexts. To kick off transitioning away
from the workaround, set MMonGetVersionReply tid to the tid of the
original MMonGetVersion message.
Aristoteles Neto [Tue, 20 May 2014 22:20:55 +0000 (10:20 +1200)]
Update manual-deployment.rst
- When creating the OSD data, specify osd-uuid so that it matches when the osd is first created.
- Modify caps when adding osd auth to match what ceph-deploy does.
~~~~
./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()':
./include/atomic.h:42:36: error: 'AO_fetch_and_add1' was not declared in this scope
return AO_fetch_and_add1(&val) + 1;
^
./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()':
./include/atomic.h:45:42: error: 'AO_fetch_and_sub1_write' was not declared in this scope
return AO_fetch_and_sub1_write(&val) - 1;
^
./include/atomic.h: In member function 'void ceph::atomic_t::add(size_t)':
./include/atomic.h:48:36: error: 'AO_fetch_and_add' was not declared in this scope
AO_fetch_and_add(&val, add_me);
^
./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)':
./include/atomic.h:52:48: error: 'AO_fetch_and_add_write' was not declared in this scope
AO_fetch_and_add_write(&val, (AO_t)negsub);
^
./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()':
./include/atomic.h:46:5: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[5]: *** [cls/user/cls_user_client.o] Error 1
~~~~
John Spray [Tue, 20 May 2014 15:25:19 +0000 (16:25 +0100)]
mon: Fix default replicated pool ruleset choice
Specifically, in the case where the configured
default ruleset is CEPH_DEFAULT_CRUSH_REPLICATED_RULESET,
instead of assuming ruleset 0 exists, choose the lowest
numbered ruleset.
In the case where an explicit ruleset is passed to
OSDMonitor::prepare_pool_crush_ruleset, verify
that it really exists.
The idea is to eliminate cases where a pool could
exist with its crush ruleset set to something
other than a value ruleset ID.
Fixes: #8373 Signed-off-by: John Spray <john.spray@inktank.com>
Sage Weil [Tue, 20 May 2014 22:07:07 +0000 (15:07 -0700)]
mds: use mds_stamp for mksnap
Use the server timestamp for the snapshot timestamp. This could arguably
be the client timestamp, but I think snapshot creation times are a bit
more important to have accurate timestamps on, and this should not be
something that existing client apps will strongly depend on.
Sage Weil [Tue, 20 May 2014 22:04:03 +0000 (15:04 -0700)]
mds: reset mds_stamp for readdir, rename, link
These ops to complicated work prior to starting the real operation, like
fetching missing directories, or opening remote dirfrags, creating
snaprealms. Reset the mds timestamp after this slow work has completed.
Sage Weil [Tue, 20 May 2014 21:59:35 +0000 (14:59 -0700)]
mds: use client-provided time stamp for user-visible file metadata
Use the op_stamp from the MDRequest, populated by the MClientRequest when
possible, for setting timestamps on user-visible metadata (like ctime,
mtime).
Sage Weil [Tue, 20 May 2014 21:55:05 +0000 (14:55 -0700)]
mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp
Use the op (client) timestamp for the recursive stats, for santity's sake.
Note that since this is monotonically increasing, the danger here is
that we lose track of nested changes due to skewed client clocks.
Sage Weil [Tue, 20 May 2014 21:52:59 +0000 (14:52 -0700)]
mds: make sure mds_stamp is set when we journal
This is a catch-all that we are carrying over from before. It may not
be strictly necessary, but I'm not inclined to check the code for
Mutation users who didn't call acquire_locks().
John Spray [Tue, 20 May 2014 10:59:53 +0000 (11:59 +0100)]
osdc/Journaler: fix obj count in Journaler:erase
This was off by one (too few) in the case of a
trimmedpos->write_pos range that had length
layout_period+2 and starting position one byte
before a period boundary.
Signed-off-by: John Spray <john.spray@inktank.com>
John Spray [Mon, 19 May 2014 13:23:40 +0000 (14:23 +0100)]
osdc: new style encoding for Journal::Header
Switch to the ENCODE_START, DECODE_START macros
for Journal::Header. As well as being nice generally,
this has the important side effect of making
journal headers written since JOURNAL_FORMAT_RESILIENT
unreadable to older MDSs, as they will fail their check
on Header.magic.
Signed-off-by: John Spray <john.spray@inktank.com>
John Spray [Tue, 6 May 2014 12:18:03 +0000 (13:18 +0100)]
mds: add atomic log rewrite on format change
Two main pieces to this:
* A new JournalPointer object that stores two journal
inodes so that we can do a double-buffered update,
followed by an atomic swap.
* An extended recovery process in MDLog that dereferences
the JournalPointer and conditionally rewrites the
journal to accomodate format updates.
The JournalPointer indirection should also be useful for
making cephfs-journal-tool do updates more safely.
Signed-off-by: John Spray <john.spray@inktank.com>
John Spray [Thu, 1 May 2014 11:54:14 +0000 (12:54 +0100)]
osdc: Clean up journalstream readable check
Fix redundant (and subtly incorrect) calculation of
the number of bytes needed. It worked because waiting
for a few more bytes before reading the entry size
of an old-format entry was harmless.
Signed-off-by: John Spray <john.spray@inktank.com>
Kevin Dalley [Mon, 19 May 2014 22:03:35 +0000 (15:03 -0700)]
doc: quick-ceph-deploy cleanup
Improve documentation in quick-ceph-deploy.rst
Use admin-node consistently.
ceph should be installed on admin-node for the following reasons:
"ceph-deploy admin admin-node" assumes that /etc/ceph exists.
"ceph health" requires the use of ceph
Samuel Just [Fri, 16 May 2014 23:56:33 +0000 (16:56 -0700)]
ReplicatedPG::start_flush: fix clone deletion case
dsnapc.snaps will be non-empty most of the time if there
have been snaps before prev_snapc. What we really want to
know is whether there are any snaps between oi.snaps.back()
and prev_snapc.
Fixes: 8334
Backport: firefly Signed-off-by: Samuel Just <sam.just@inktank.com>
Kevin Dalley [Mon, 19 May 2014 20:38:31 +0000 (13:38 -0700)]
doc: Clean up pre-flight documentation
Mention recent Ceph releases.
Move important message about sudo and ceph-deploy closer to the use of
ceph-deploy.
Mention files created by ceph-deploy comment
Separate apt-get from yum command