Commit Graph

36141 Commits

Author SHA1 Message Date
Greg Farnum
26736b2244 MDS: add a flush_dentry() function, and wire it up to the admin socket
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:53:03 -08:00
Greg Farnum
86384fe33a MDS: CInode: create a flush() function
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:53:03 -08:00
Greg Farnum
063cd2fca5 MDCache: handle internal ops in respond_to_request()
This only works for those which have specified a finisher in the MDR.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:53:03 -08:00
Greg Farnum
f82f6efec9 MDCache: make scrub_dentry schedulable and reentrant
Rather than assuming that any necessary inodes are in the cache, split up
MDCache::scrub_dentry into setup and work phases. Add an internal_op_finisher()
to MDRequest. Dispatch any CEPH_MDS_OP_VALIDATE internal operations to
scrub_dentry_work(). Taken together, these make everything work properly when
path_traverse() (by way of rdlock_path_pin_ref()) needs to go to disk before
satisfying the lookup.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:53:02 -08:00
Greg Farnum
391740215d MDCache: "handle" request_forward on internal ops
For now, just return -EXDEV ("Cross-device link") on internal ops that
require forwarding, as forwarding internal ops will require a great deal more
infrastructure.. But push the issue down to this level instead of worrying
about it in path_traverse, and consider the possibility that the MDRequest
might not have a client_request that it's wrapped around.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:15 -08:00
Greg Farnum
a4da522665 Server: rename reply_request() -> respond_to_request()
This is no longer necessarily a reply; it could turn into a Context
activation or something.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:15 -08:00
Greg Farnum
cfac5c3319 Server: rename reply_request -> reply_client_request; make it private
The generic reply_request(MDRequest, int) is now the only caller. It's still
just building an MClientRequest to pass along, but we can change it a lot more
easily now to support responding to non-client requests.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
e980d1b291 Server: add snapbl to MDRequest and eliminate last explicit MClientReply
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
592be4dd0a Server: use mdr->reply_extra_bl instead of explicit MClientReply
Set the MClientReply::extra_bl from reply_extra_bl unconditionally in
reply_request(), instead of only in early_reply(). Further isolate
the reply_request() callers from the use of MClientReply this way.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
c9f8d11d2b Server: do not use explicit MClientReply if we don't need to
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
a65d986898 Server: remove tracei and tracedn parameters from reply_request
We have members for these two parameters in the MDRequestImpl already, so
make use of them. This helps us move towards dropping the expectation of an
MClientRequest from functions like rdlock_path_pin_ref().

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
515ab2d587 MDCache: add a scrub_dentry() function, and wire it up to the admin socket
scrub_dentry() is passed a string path, and it validates it before replying. We
hook up an admin socket command "scrub_path" to call it and dump the output.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
fa75434faf MDS: CInode: implement validated_data::dump()
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:41:51 -08:00
Greg Farnum
0d6f8b659f MDS: CInode::validate_disk_state()
Add a function that will validate the on-disk state of the CInode. We currently
check that the on-disk backtrace matches (or is older) and compare rstats on
dirfrags against the parent dir's inode (for directories only).

TODO: validate that the on-disk Inode object matches what the parent
directory holds.

It's using a sort-of new programming model, trying to stuff stack data into
a Continuation object and write everything sequentially instead of having
a function and Context per IO.

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: John Spray <john.spray@redhat.com>
2014-11-07 11:48:44 -08:00
Greg Farnum
153aa2027b Rebase: MDS: Add an MDSContinuation for ease of use
Unlike the regular Continuation, this one works in terms of an MDRequest
and has wrappers to provide Context callbacks that are either
internal MDS or IO appropriate.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2014-11-07 11:48:44 -08:00
Greg Farnum
a7020dd1c2 Continuation: Add a new Continuation class.
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: John Spray <john.spray@redhat.com>

SQUASH "Continuation: Add a new Continuation class."
2014-11-07 11:48:43 -08:00
Greg Farnum
c575d16290 MDCache: create_unlinked_system_inode() as the guts of create_system_inode()
This way we can create duplicate CInodes without actually linking them
into the cache. It'll be helpful for comparing different versions of
disk states and in-memory state, etc.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
9441283f03 MDS: MDRequestImpl: provide filepath/filepath2 substitute for MClientRequest
Use this passthru in the Server path locking functions so that we can get
locks or auth pins without an associated MClientRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
adee21bfa3 MDRequest: dump internal op names as well as IDs
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
05d2444d73 MDCache: remove #if 0'd code
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
f8db040c46 mdstypes: add a same_sums() function to nest_info_t
operator== is checking equality of the version as well, but I want
something I can use to check that the internal sums match. This is useful
for eg comparing the sums of a set of dirfrags to the tally stored in
the inode.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
af4bddd54d test/mds: unit tests for the inode_backtrace_t and inode_t compare() functions
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
4743f28b26 mdstypes: write inode_t::compare() function
This compares one inode_t against another, seeing which version is newer
and checking that differences in the data members make sense given that.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
7795a4e113 MDS: add operator==() and compare() for inode_backtrace_t
The compare() function checks one backtrace against another and indicates
if they're equivalent (or divergent!) and the relative freshness.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
aed1498922 MDS: CInode: add a fetch_backtrace() utility function
Expose MDCache::fetch_backtrace and call it from the CInode context.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
80fac9e627 mds: add an MDSInternalContextWrapper and MDSIOContextWrapper
These let us wrap generic function tooling up inside of the appropriate
type-checking, and verify we haven't done anything too stupid.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:00 -08:00
Sage Weil
674781960b Merge pull request #2707 from ceph/wip-9731
PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.ren...

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-13 11:17:17 -07:00
Loic Dachary
f1fccb1d19 rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7
The || instead of && had it always installed. That was fixed in EPEL
already.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 5ff4a850a0)
2014-10-13 08:16:40 -07:00
Samuel Just
d458b4f0f3 PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.rend()
Fixes: #9731
Backport: giant, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-10 13:55:42 -07:00
Samuel Just
bd61ee001b Merge pull request #2684 from ceph/wip-9696
PG::choose_acting: in mixed cluster case, acting may include backfill

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-10 10:32:15 -07:00
Gregory Farnum
75fc54bf9e Merge pull request #2693 from ceph/giant-unused-variable
Giant unused variable
2014-10-10 06:59:22 -07:00
Yan, Zheng
459b2d245e mds: Locker: remove unused variable
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:57:53 +08:00
Yan, Zheng
33d2c735ef Merge pull request #2679 from ceph/giant-locker-null
mds: Locker: fix a NULL deref in _update_cap_fields
2014-10-10 09:37:28 +08:00
Samuel Just
9b18d99817 PG::choose_acting: in mixed cluster case, acting may include backfill
Fixes: 9696
Backport: firefly, giant
Introduced: 92cfd37039
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-09 16:21:25 -07:00
Greg Farnum
3cd8a7fb96 mds: Locker: fix a NULL deref in _update_cap_fields
The MClientCaps* is allowed to be NULL, so we can't deref it unless
the dirty param is non-zero. So don't do the ahead-of-time lookup;
just call it explicitly in the if block.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-09 15:12:19 -07:00
Samuel Just
3bfb5fab41 Merge pull request #2616 from guangyy/wip-giant-9614
PG::actingset should be used when checking the number of acting OSDs for a given PG.

Backport: firefly
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-08 11:08:35 -07:00
Samuel Just
e0d37c55a3 Merge pull request #2663 from ceph/wip-9496
mon: PGMonitor: populate scrub timestamps with 'now' on pg creation

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-08 11:07:06 -07:00
Samuel Just
4a5af13912 Merge pull request #2650 from ceph/wip-9128
Add reset_tp_timeout in long loop in add_source_info for suicide timeout

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-08 11:04:42 -07:00
Samuel Just
e684abcb3f Merge pull request #2543 from ceph/wip-9419
Wip 9419

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-08 11:01:26 -07:00
Loic Dachary
66eb04664f Merge pull request #2661 from dachary/wip-9677-ioprio-class-giant
common: ceph_ioprio_string_to_class always returns -EINVAL
2014-10-08 08:44:08 +02:00
Joao Eduardo Luis
0dd3afd87e mon: PGMonitor: populate scrub timestamps with 'now' on pg creation
Fixes: #9496

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-08 00:13:49 +01:00
Joao Eduardo Luis
ccdbfb441a mon: PGMonitor: prettify access to pg_stats_t in register_pg
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-08 00:12:29 +01:00
Sage Weil
60de42c296 Merge pull request #2660 from athanatos/wip-9203
test/osd/Object: don't generate length of 0

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-07 14:08:39 -07:00
Sage Weil
ae5d294902 Merge pull request #2659 from athanatos/wip-9113
Wip 9113

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-07 14:06:38 -07:00
Sage Weil
ef006aeb1a Merge pull request #2658 from athanatos/wip-9625
PG: release backfill reservations if a backfill peer rejects

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-07 14:03:55 -07:00
David Zafman
9b39033f2b osd: Return EOPNOTSUPP if a set-alloc-hint occurs with OSDs that don't support
Add CEPH_FEATURE_OSD_SET_ALLOC_HINT feature bit
Collect the intersection of all peer feature bits during peering
When handling CEPH_OSD_OP_SETALLOCHINT check that all OSDs support it
by checking for CEPH_FEATURE_OSD_SET_ALLOC_HINT feature bit.

Fixes: #9419
Backport: firefly

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-07 14:01:04 -07:00
David Zafman
70ef4c11cb osd: Remove unused PG functions queue_notify(), queue_info(), queue_log()
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-07 14:01:04 -07:00
Sage Weil
f91188e013 v0.86
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJUM+iVAAoJEH6/3V0X7TFt2twP+wSdzthj36mTpv7Q1THNEFix
 /D8q69gHhDNGFLXT9xvd11IDJlD+Nhhl0SNbK40WDRRIlcgUxv7RXfw6CEVz9CTe
 9ELV6m9jjtA3VyogygKOsC5p9zwQ1lvh8Fq2K/vPBpQ7UcKSdg+5mBD5hiraAvsz
 /VnXxMYOIaMDAWyWURR2PefwKjepiBIcyJQeD+gANfneYjNhq9UiH2OvO8RcyMjA
 gAzgnnq1bPfjJ5VY2CTrynPy36yHgwMVbAuhcDTRv0NR9Qpdj6bqdHD4wbidz0Cj
 wmCMVRmAqQh0fQJOoOJZpKWwX+FiUesz84bINX4oZYS4PyjMLFnvsX8HZUqPf8+L
 m02j+zy58nfMAUTS7FHJiBOpp5Ufg3lEd1nVSUJNJXihWWeHsQ52dTuEf5x4ZanD
 h6H6fBgS8Deeuc8LP3rot7AVsC5j1S3nY3AMb6WAklk9JARVmA94Y3xP0d7LRSBj
 at/l54omBLsg6RKbiUR25d7nJLcfFsqoYAyutsxHcJh8vltJSM2SrZOkB4RQWi6C
 Cl6+uNmMZPrqwPHzHNcRePQcs4LOzgkTzB4Og6gJyvThkGj4cDhWJmXgtvu1XLbv
 +BBKxxKMi7bitxm87qw0YpIFWKmucAkkkXZc3vobBhaY02e1K/lVDdjUhEfNzPxm
 T6LKWQnULtXIJC3lJ6df
 =9IZj
 -----END PGP SIGNATURE-----

Merge tag 'v0.86' into giant

v0.86
2014-10-07 12:34:10 -07:00
Jenkins
d14ca34a1c 0.86 2014-10-07 12:16:58 -07:00
Samuel Just
1d22575cb0 Merge remote-tracking branch 'guangyy/wip-9008' into giant 2014-10-07 11:42:14 -07:00