Commit Graph

14785 Commits

Author SHA1 Message Date
Sage Weil
00ec86a204 mds: open renamed import child frags during journal replay
Open up any child frags of the imported renamed inode that are noted in
the journal event.  (Note we blindly open up that list here; it's up to the
journaler to only populate it when appropriate.)  If the listed frags are
not already open, open them up and set the dir_auth to unknown; presumably
they belong to the rename source/exporter.  If we already had them open,
then the adjust_subtree_after_rename call above will have caught them and
already done the necessary subtree adjustment.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 20:48:52 -07:00
Sage Weil
44d19304a9 mds: journal open srci frags on srci import (master)
If we are importing the renamed inode, and it is a directory, journal a
list of all open dirfrags (currently, this is actually all frags) so that
we can open them up during journal replay.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 20:46:42 -07:00
Sage Weil
a7c083ecbf mds: journal renames on witnesses if we have nested subtrees
If a rename witness has any subtrees that are nested beneath the renamed
directory, we need to journal the rename event so that our cache is
properly updated on journal replay.

Further, if we are exporting srci, we also need to journal the dest
(even if we aren't auth for destdn) if we have any open dirfrags because
those will turn into nested subtrees shortly.

We still need to ensure that the cache is properly trimmed during replay.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 20:43:29 -07:00
Sage Weil
5c870c60ec mds: CDir::contains() should use projected hierarchy
The only current callers are in resolve stage, when nothing is projected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 20:40:39 -07:00
Colin Patrick McCabe
1b0fdcae59 re-fix ignore return value change
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 16:14:26 -07:00
Sage Weil
3a2ce92b2c mds: fix check for no-op rename of two links to the same inode
touch a
ln a b
mv a b

is a no-op, according to posix.  Move the check earlier.


Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 15:13:04 -07:00
Colin Patrick McCabe
a7012f289e cfuse: really ignore write() return value
Hopefully this will make gcc stop complaining. The void cast no longer
seems to silence unchecked return code errors, on gitbuilder at least.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 14:27:20 -07:00
Josh Durgin
dfa4aeb8ae Merge remote branch 'origin/wip_gcov' 2011-06-07 13:57:28 -07:00
Sage Weil
2969161b9e qa: add rename dir checks
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 13:34:57 -07:00
Josh Durgin
b32f00ebe3 coverage: add ceph-coverage to run something with the right GCOV_PREFIX_STRIP
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 13:29:21 -07:00
Josh Durgin
0eda719502 Makefile.am: add check-coverage to get coverage of 'make check'
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 13:29:21 -07:00
Josh Durgin
1f2740a020 Makefile.am: install gcno files
This is needed so that coverage data can be generated from the
gitbuilder tarballs.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 13:29:21 -07:00
Josh Durgin
e4f0541592 Makefile.am: clean gcno and gcda files in "make clean"
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 13:28:44 -07:00
Sage Weil
2cb0c110b5 qa: rename tests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 13:27:31 -07:00
Sage Weil
3e0352d37c mds: rename: add missing pop_and_dirty_projected_inode calls
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 13:24:38 -07:00
Sage Weil
569baab64b mds: rename: use temp *in in _rename_apply
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 13:24:35 -07:00
Sage Weil
bdfcc0df34 mds: rename: move unlink out of every possible branch
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 13:24:11 -07:00
Colin Patrick McCabe
12bb308135 test/bufferlist: add copy_all test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 12:05:50 -07:00
Josh Durgin
eb09764903 coverage: add helper script to get coverage for a local test
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:04:29 -07:00
Josh Durgin
69092735c4 mon: add all_exit and exit commands
all_exit makes each daemon exit(0), for gcov data collection.
exit causes cmon to do this.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:04:29 -07:00
Josh Durgin
c01961ff4b mds: allow mds to 'exit immediately'
This is temporary until shutting down cleans up well.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:04:29 -07:00
Josh Durgin
347dba4e04 mon: ceph tell mds * is a valid command
Previously this fell through and returned -EINVAL to the user.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:04:29 -07:00
Josh Durgin
1cc78b6a86 osd: add command to exit cleanly
This is required for gcov to work on daemons since the coverage data
is written atexit, and the function that writes the data is not
exported.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:04:29 -07:00
Josh Durgin
24195b9c87 configure: add option for building with gcov coverage support
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-06-07 12:02:40 -07:00
Colin Patrick McCabe
7b9fa3c3d1 test/bufferlist.cc: retab for consistency
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 11:58:06 -07:00
Colin Patrick McCabe
d9d3c78eb0 cfuse.cc: fix warning
We genuinely don't care about the return code we get back from this call
to write(2). So cast the result to void to tell gcc that we don't care.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 11:56:05 -07:00
Colin Patrick McCabe
ea9c4fc296 bufferlist::iterator: add copy_all, use in KeyRing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 11:40:48 -07:00
Sage Weil
6b2bf234b8 mds: rename: fix oldin pop
- make the pop match position with the project in prepare
- don't pop on linkmerge, since we don't project in that case

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:25:39 -07:00
Sage Weil
bf7d7fa938 mds: rename: some cleanup
- add oldin temp
- make if conditions match between _prepare and _apply

no functional changes.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:24:50 -07:00
Sage Weil
b794aeb394 client: fix rename request target selection
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:23:54 -07:00
Sage Weil
084a1c747d client: fix mds selection for unlink
It was broken when a remote link target was on another mds.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:11:07 -07:00
Sage Weil
a2288574aa client: make debug prints for choose_target_mds more helpful
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:08:02 -07:00
Sage Weil
5e679d3ae6 client: allow caps to be dropped on another inode for requests
We need the ability to drop caps on another inode that isn't req->inode
or req->old_inode in the request struct.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 11:07:44 -07:00
Sage Weil
0fb7973745 mds: fix unlink new snaprealm check
The bool was flipped.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 10:59:09 -07:00
Sage Weil
dbe41a30f2 client: fix rename debug print
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 10:50:50 -07:00
Colin Patrick McCabe
83e49cd833 g_conf: change to pointer
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 10:38:54 -07:00
Colin Patrick McCabe
e61f5c5c4f simple_spin: fix compiler warnings
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 10:23:45 -07:00
Colin Patrick McCabe
776d3814cc init: set cct->module_type in common_preinit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-07 10:17:40 -07:00
Sage Weil
e36a4b261b mds: rename: fix handling of target that is remote dentry
If the target is a remote dentry, we need to consider that the destdn
and desti may have different auths.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 10:04:09 -07:00
Sage Weil
a5662293a2 client: fix mds routing for link requests
We want to send link requests to the auth for the new name, not the
target inode.  We also want to drop FILE_SHARED caps on new name's
directory.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 09:58:29 -07:00
Sage Weil
7770e1c626 mds: rename: only add target to stray if destdn is a primary
Only add target into the stray dir if we are renaming over a primary
dentry.  (Otherwise we aren't moving the target.)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 09:49:04 -07:00
Sage Weil
df7f8954c3 mds: fix/clean up xlock import/export
- create xlock import/export helpers
- fix/simplify checks: we want to export/import only xlocks on the inode
that is being migrated, unless they are locallock.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-07 09:41:56 -07:00
Yehuda Sadeh
3c6a7e1934 gitbuilder: quiet 2011-06-06 15:16:40 -07:00
Yehuda Sadeh
f292fb7c4d radosgw_admin: link bucket to user 2011-06-06 14:22:49 -07:00
Sage Weil
b5011e2116 mds: adjust subtree roots on rename
If we replay a dir rename operation, we need to adjust the subtree map
accordingly.

This covers the case where the metablob contains both the src and dest
dentries.  Remaining cases will follow.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-06 13:30:25 -07:00
Sage Weil
10750f803f common: add module_type to CephContext; use to initialize rotating keys
This fixes rotating keys.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-06 13:06:41 -07:00
Sage Weil
8e69c39f69 v0.29 2011-06-06 11:09:28 -07:00
Greg Farnum
f9af9ced28 remove dumpjournal
This code has suffered a great deal of bitrot and is superceded
by the cmds --dump-journal functionality anyway, which
is much more full-featured.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-06-06 11:46:07 -07:00
Sage Weil
73257a0d4b Merge remote branch 'origin/wip_librbd_locking' 2011-06-06 10:58:32 -07:00
Sage Weil
4e95ac5a62 Merge remote branch 'origin/stable' into next 2011-06-06 09:57:41 -07:00