Commit Graph

22769 Commits

Author SHA1 Message Date
Samuel Just
27071f3bc2 OSD: store current pg epoch in info and load at that epoch
Prior to split, this did not matter.  With split, however, it's
crucial that a pg go through advance_pg() for the map causing
the split.  During operation, a PG lags the OSD superblock
epoch.  If the OSD dies after the OSD epoch passes the split
but before the pg epoch passes the split, the PG will be
reloaded at the OSD epoch and won't see the split operation.
The PG collection might after that point contain incorrect
objects which should have been split into a child.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
9f169ac0f5 OSD: account for split in project_pg_history
split causes a new interval.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
15d899370f PG: update info.last_update_started in split_into
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
338f3688b0 OSDMonitor: require --allow-experimental-feature to increase pg_num
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:06 -08:00
Samuel Just
fb738506f6 PG: set child up/acting in split_into
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:06 -08:00
Samuel Just
3f412e88fa OSD: do _remove_pg in add_newly_split_pg is pool if gone
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:52:54 -08:00
Samuel Just
19e6861daf osd/: dirty info and log on child during split
Otherwise, the log may not get written out.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
9835e19015 osd/: mark info.stats as invalid after split, fix in scrub
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
5f8a3634c4 PG: split ops for child objects into child
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
9981bee565 OSD: add initial split support
PGs are split after updating to the map on which they split.
OSD::activate_map populates the set of currently "splitting"
pgs.  Messages for those pgs are delayed until the split
is complete.  We add the newly split children to pg_map
once the transaction populating their on-disk state completes.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:52 -08:00
Samuel Just
993ff14357 PG: add split_into to populate child members
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:19 -08:00
Samuel Just
6e67a27f89 osd/: splitting a pg now triggers a new interval
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
36c0fd220e PrioritizedQueue: allow caller to get items removed by removed_by_filter
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
b6c49b484a mon/OSDMonitor: enable split in Monitor
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
b8a37fdf6c PGMonitor,OSD: don't send creates on split
Splits will be handled when the map update effecting the split is
processed for the splitting pg on each OSD.  This will mesh
with the pg history which will place the new pg at the current
positions of the splitting pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
f4f6bd7f53 OSD: dispatch_context only discard transaction if contexts empty
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
fec47cad52 OSD: don't wait for superblock writes in handle_osd_map
Instead, pass the pinned maps into a Context and clear the
cache after the transaction is applied.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
fdc5e5d187 os/: Add CollectionIndex::prep_delete
If an unlink is interupted between removing the file
and updating the subdir attribute, the attribute will
overestimate the number of files in the directory.  This
is by design, at worst we will merge the collection later
than intended, but closing the gap would require a second
subdir xattr update.  However, this can in extreme cases
result in a collection with subdirectories but no objects.
FileStore::_destry_collection would therefore see an
erroneous -ENOTEMPTY.

prep_delete allows the CollectionIndex implementation to
clean up state prior to removal.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
a48dee547c os/: Add failure CollectionIndex failure injection
Several pieces of HashIndex involve multi-step operations
which are sensitive to OSD crashes.  This patch introduces
failure injection to force retries from various points in
the LFNIndex helper methods to be used with store_test.cc.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
bd46386353 test/store_test: add simple tests for collection_split
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
f2a23916d4 os/: add filestore collection_split
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-05 11:34:18 -08:00
Samuel Just
a83d13a3b7 OSD: ignore queries on now deleted pools
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-05 11:33:26 -08:00
Greg Farnum
4cdc30b943 Merge remote-tracking branch 'origin/wip-mds' into next
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-12-04 16:48:19 -08:00
Sage Weil
3ef741ac2d Merge branch 'wip-filestore' into next
Reviewed-by: Sam Just <sam.just@inktank.com>
2012-12-04 15:05:18 -08:00
Sage Weil
f3bd3564fa Merge branch 'wip-msgr-delay-queue' into next 2012-12-04 14:52:22 -08:00
Yan, Zheng
727c37a712 mds: journal remote inode's projected parent
Server::_rename_prepare() adds remote inode's parent instead of
projected parent to the journal. So during journal replay, the
journal entry for the rename operation will wrongly revert the
remote inode's projected rename. This issue can be reproduced by:

 touch file1
 ln file1 file2
 rm file1
 mv file2 file3

After journal replay, file1 reappears and directory's fragstat
gets corrupted.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-12-04 14:50:14 -08:00
Yan, Zheng
3f69f7290d mds: don't create bloom filter for incomplete dir
Creating bloom filter for incomplete dir that was added by log
replay will confuse subsequent dir lookup and can create null
dentry for existing file. The erroneous null dentry confuses the
fragstat accounting and causes undeletable empty directory.

The fix is check if the dir is complete before creating the bloom
filter. For the MDCache::trim_non_auth{,_subtree} cases, just do
not call CDir::add_to_bloom because bloom filter is useless for
replica.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-12-04 14:50:11 -08:00
Samuel Just
0756052cff PG: remove last_epoch_started asserts in proc_primary_info
These asserts are valid for a uniform cluster, but they won't hold
for a replica running a version without the info.last_epoch_started
patch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-12-04 11:41:05 -08:00
Yan, Zheng
2ba9c870b0 mds: journal remote inode's projected parent
Server::_rename_prepare() adds remote inode's parent instead of
projected parent to the journal. So during journal replay, the
journal entry for the rename operation will wrongly revert the
remote inode's projected rename. This issue can be reproduced by:

 touch file1
 ln file1 file2
 rm file1
 mv file2 file3

After journal replay, file1 reappears and directory's fragstat
gets corrupted.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-12-04 05:35:03 -08:00
Yan, Zheng
8cd8f2504a mds: don't create bloom filter for incomplete dir
Creating bloom filter for incomplete dir that was added by log
replay will confuse subsequent dir lookup and can create null
dentry for existing file. The erroneous null dentry confuses the
fragstat accounting and causes undeletable empty directory.

The fix is check if the dir is complete before creating the bloom
filter. For the MDCache::trim_non_auth{,_subtree} cases, just do
not call CDir::add_to_bloom because bloom filter is useless for
replica.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-12-04 05:29:13 -08:00
Sage Weil
8c2526a770 Merge remote-tracking branch 'gh/wip-mds' into next 2012-12-04 05:27:59 -08:00
Sage Weil
3ace9a7c66 logrotate: do not spam stdout
Avoid anything on stdout that will generate cron emails for people.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-04 05:25:52 -08:00
Gary Lowell
2eee9e175e Merge branch 'master' of http://github.com/ceph/ceph 2012-12-03 21:31:14 -08:00
Gary Lowell
b5ec1c6766 Merge branch 'next' 2012-12-03 21:29:52 -08:00
John Wilkins
a74a4acf50 doc: Added a striping section for Architecture.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-12-03 20:48:02 -08:00
Gary Lowell
690f817560 v0.55 2012-12-03 19:08:35 -08:00
Gary Lowell
234cc081ab ceph.spec.in: Add SLES and remove Fedora from debug package list. 2012-12-03 19:06:42 -08:00
Sage Weil
595dd0ec60 Merge branch 'next' 2012-12-03 15:33:29 -08:00
Sage Weil
26045573e8 test_rados_api_misc: fix dup rmmkey test
We now expect ENONET as of 9961640f76
again.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 15:33:03 -08:00
John Wilkins
f2c7a60c90 doc: Fixed many hyperlinks, a few typos, and some minor clarifications.
fixes: #3564

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-12-03 12:22:37 -08:00
John Wilkins
a7a3cbf8fc doc: Clarified example for root user.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-12-03 10:48:10 -08:00
Sage Weil
5bea57bfd0 config: we still want osd_thread_recovery_timeout
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:56:15 -08:00
Sam Lang
e686cb14e9 config: Remove unused options
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-03 03:44:36 -08:00
Sam Lang
6b105ae0b7 client: Fix ceph_mount() when subdir is specified
If a subdirectory is specified to ceph_mount, the
root inode does not have an ino of CEPH_INO_ROOT, so
cwd will fail to ever find root and eventially hits
an assertion in in->get_first_parent().  This fix uses
the inode stored in the root member instead, ensuring
that we stop wherever the mount is rooted.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-03 03:44:34 -08:00
Sage Weil
f57a79809c osd: EINVAL on unknown TMAP op code
The old/slow implementation did this, but the optimized version did
not.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
4870b43cab mds: use TMAP_RMSLOPPY op when removing dentries
After replay, we don't know if the dentry removal has already been
committed.  Use a sloppy removal so that we succeed even if we are
repeating the operation.

Conveniently, the previous implementation (pre v0.55) silently ignored
tmap op codes it did not understand, which means this new RMSLOPPY will
be interpreted the same as an actual RMSLOPPY.  That means an v0.55
mds can run against an older osd (say, argonaut) without problems.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
272e89d913 osd: add TMAP_RMSLOPPY op
Remove a key, but succeed if key already does not exist.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
9961640f76 osd: ENOENT on TMAP_RM on non-existent key
This reverts 29fae494d0 and fixes the
alternate implmentation added by 8e91d00b52.
librbd relies the ENOENT return value.

Reported-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
85574a3622 os/JournalingObjectStore: applied_seq -> max_applied_seq
Rename applied_seq to max_applied_seq, since it is a bound; there may be
seq's < max_applied_seq that are not applied.  This aligns the naming with
max_applying_seq.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-02 14:30:33 -08:00
Sage Weil
528108485b os/FileStore: only wait for applying ops to complete before commit
We can have a large number of operations in the op_wq waiting to be applied
to the fs.  Currently, when we want to commit, we want for them *all* to
apply.  This can take a very long time (the default queue length is 500
operations!).

Instead, mark an Op as started ("applying") when the thread pool actually
starts to apply it.  At that point, only wait for applying ops to complete.
We let any threads with an op seq < max_applying_seq begin as well so that
we have a proper ordering/barrier.  When those flush, applied_seq will ==
max_applying_seq, and that becomes the committing_seq value.

Note that 'applied_seq' is still maintain, but serves no real purpose
except to populate our asserts with sanity checks.  max_applying_seq serves
the purpose applied_seq used to.

This removes once unnecessary source of latency associated with fs
commits.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-02 14:30:32 -08:00