Commit Graph

33800 Commits

Author SHA1 Message Date
John Spray
5d913e2b1c mds: Create JournalPointer in MDLog::create
Otherwise it is created at next startup when
we see that it is missing: this is cleaner.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:52 +01:00
John Spray
bac434de0c mds: Make EMetaBlob::dirlump::_decode_bits const
This requires making the late-decoded attributes mutable.
The motivation is to allow get_paths and all the code downstream
of that to be const too.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:52 +01:00
John Spray
1c2bb37417 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>
2014-05-20 14:07:52 +01:00
John Spray
f609a0afe3 osdc: Simplify JournalStream::read
It was doing an unnecessary series of splices() after
reading header, replace with a single pass through
the data and one splice at the end.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
f12b9e8be9 osdc: make JournalStream::readable const
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
778b78519f osdc/JournalStream: DRY envelope size calc
Replace repetitive sizeof() calculation for the
envelope overhead per log event with #defines.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
45c319efeb doc: Update ceph-mds manpage
Add missing --hot-standby and --journal-check
arguments.

Fixes: #8258
2014-05-20 14:07:51 +01:00
John Spray
423dafe04d osdc/Journaler: use pointers for out params
Fixes a style violation in the new JournalStream class.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
fc1d6da713 tools/cephfs: Update for JournalPointer
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
d52eeaba42 Fix JournalStream::read length assertion
This was checking for new-format length even
when reading from an old-format journal.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
5c2a64011b osdc/Journaler: include stream_format in dump()
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
68b200940c mds: Introduce mds_journal_format config setting
This is useful for testing, so that we can create an
old-style journal and then test the version migration
by changing the config setting.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:51 +01:00
John Spray
aec4c939a7 tools: update Dumper to use JournalPointer
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
1612677b43 mds: Generalize JournalPointer functionality
...so that we can use it places like Resetter too.  And use it
there.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
8b0383ed43 dencoder: add JournalPointer to types.h
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
a4ae168ae6 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>
2014-05-20 14:07:50 +01:00
John Spray
dba721f199 osdc: Add Journaler.erase
This is used in subsequent commits to delete journals
that are no longer needed, such as after rewriting
a journal in a different format.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
c73902b1e9 osdc/Journaler: privatize members
Many members were unnecessarily public.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
405cb8572d osdc: fix redundant branch
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
e7fa5be618 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>
2014-05-20 14:07:50 +01:00
John Spray
79a1e5870f mds/CDir: remove redundant inode enc/dec
Use the new CInode::encode_bare/decode_bare fns
in CDir, so that we only have one implementation
of the inode encode/decode code.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:50 +01:00
John Spray
49add98390 docs: Add cephfs-journal-tool
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
5011945faf gitignore: Add cephfs-journal-tool
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
7e4da00af4 debian: add cephfs-journal-tool to ceph-mds
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
403e0288d9 rpm: add cephfs-journal-tool to RPM build
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
f7e9ff174f tools: Create cephfs-journal-tool
This is for debugging/repairing CephFS journals.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
Christian Theune
107821fe9b Fix formatting of header
The header was displaying the newline as a simple "n" due to quoting in the doc.

Signed-off-by: Christian Theune <ct@gocept.com>
2014-05-20 10:38:01 +02:00
Gregory Farnum
1383b649d7 Merge pull request #1839 from ceph/wip-8338
OSD: verify that client ops are targeted correctly in the current epoch

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-19 16:53:55 -07:00
Sage Weil
ad2e20f2d4 client: set timestamp in MDS requests
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-19 16:23:18 -07:00
Sage Weil
a91e072b09 mds: include timestamp in MClientRequest
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-19 16:23:17 -07:00
Samuel Just
2f023b5d8a Merge pull request #1825 from ceph/wip-8380
osd: skip out of order op checks on tiered pools

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-19 16:05:42 -07:00
Josh Durgin
de3564bc55 Merge pull request #1830 from salehe/docfix-1
rados.py: clarify documentation of recent change on write return value

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-19 15:31:43 -07:00
Josh Durgin
d71839a6cf doc: clarify openstack cow sentence
Missing subject, and now applies to disks in general.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-19 15:25:37 -07:00
Josh Durgin
0f7f1e842b doc: note cinder multi-backend restriction
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-19 15:24:53 -07:00
Josh Durgin
e92f2d9fe0 doc: link to ephemeral rbd patches
These are necessary for using ephemeral rbd with Havana and Icehouse.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-19 15:14:29 -07:00
Kevin Dalley
13d6c3cf30 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

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-19 15:03:35 -07:00
Samuel Just
50f6641ade Merge pull request #1804 from ceph/wip-8104
Wip 8104

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-19 14:41:17 -07:00
Kevin Dalley
d40ba05313 doc: mention admin-node in common documentation
This change uses admin-node in the quick-common.rst file, including
the graph. This name is already used in
quick-ceph-deploy.rst.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-19 14:36:56 -07:00
Samuel Just
29f615b7ac 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>
2014-05-19 14:27:02 -07:00
Samuel Just
5ff95dbdd2 HashIndex: in cleanup, interpret missing dir as completed merge
If we stop between unlinking the empty subdir and removing the root
merge marker, we get ENOENT on the get_info.  That's actually fine.

Backport: firefly
Fixes: 8332
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-05-19 14:24:37 -07:00
Mohammad Salehe
bc897b8442 rados.py: clarify recent change on write return value
Signed-off-by: Mohammad Salehe <salehe+dev@gmail.com>
2014-05-20 01:48:33 +04:30
Kevin Dalley
637211854d 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

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-19 13:38:31 -07:00
Kevin Dalley
06d05fd694 doc: fix link to FAQ
The location of the ceph wiki FAQ has changed.
Now, the link from ceph documentation matches the current FAQ location

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-19 11:59:46 -07:00
Gregory Farnum
f3925b2094 Merge pull request #1820 from ceph/wip-osd-refs
osd: fix a session ref leak, and an unlikely race

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-05-19 11:24:05 -07:00
John Wilkins
03e3ccdd05 doc: Restored glance_api_version=2 setting.
Fixes: #8347

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-19 11:18:44 -07:00
Sage Weil
cf2b172c84 osd: skip out of order op checks on tiered pools
When we send redirected ops, we do not assign a new tid, which means that
a given client's ops for a pool may not have strictly ordered tids.  Skip
this check if the pool is tiered to avoid false positives.

Fixes: #8380
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-19 10:32:12 -07:00
Sage Weil
9e80c29c2c Merge remote-tracking branch 'gh/next' 2014-05-19 09:49:28 -07:00
Loic Dachary
e47049ba83 erasure-code: fix URL in developer notes
add missing ..

http://tracker.ceph.com/issues/8388 Fixes: #8388

Reported-by: koleosfuscus <koleosfuscus@yahoo.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-19 18:41:37 +02:00
Loic Dachary
d3488202a2 Merge pull request #1823 from dachary/wip-mailmap
mailmap: Sahid Orentino Ferdjaoui affiliation

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
2014-05-19 14:58:49 +02:00
Loic Dachary
23787ba094 mailmap: Sahid Orentino Ferdjaoui affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-19 14:49:01 +02:00