Colin Patrick McCabe
a8a16c7106
obsync: only require --owner if --xuser is set
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-03 10:06:11 -07:00
Colin Patrick McCabe
441b54c101
obsync: implement --owner
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 18:41:31 -07:00
Sage Weil
5ac87ffd36
cfuse: encode/decode dev_t properly
...
The fuse layer passes through "encoded" dev_t values (probably for
compatibility reasons or something). I copied the encode/decode methods
from the kernel and encode/decode the st_rdev values where appropriate
(where struct stat is exposed directory or via the fuse_entry_param
struct).
Fixes : #1031
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-02 18:23:13 -07:00
Colin Patrick McCabe
8bd2305d1c
obsync: implement user translation (--xuser)
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 16:54:44 -07:00
Colin Patrick McCabe
fa2da0c5e7
rgw: fix ACL XML generation
...
Put AccessControlPolicy in the http://s3.amazonaws.com/doc/2006-03-01/
namespace.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 15:57:06 -07:00
Colin Patrick McCabe
931b58044d
obsync: refactor LocalCopy
...
Combine LocalCopy, S3StoreLocalCopy, and RadosStoreLocalCopy into one
class called LocalCopy.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 14:47:10 -07:00
Greg Farnum
1701804d34
FileStore: use proper object names for linking
...
They were backward before, which broke EVERYTHING.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-02 13:47:23 -07:00
Greg Farnum
ac23196bc5
MDS: fix handle_client_rename use of path_traverse.
...
It was using the MDS_TRAVERSE_DISCOVERXLOCK flag, which allows
path_traverse to return success if it encounters a NULL dentry. When
we're looking for a source inode, though, that doesn't work out! We
want MDS_TRAVERSE_DISCOVER, which will go away and look for the dentry
on other inodes but requires a linked dentry, not a NULL one.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-02 13:16:35 -07:00
Sage Weil
7d19f184c5
mds: trim non-auth swallowed subtrees during resolve
...
Consider:
- peer auth for /foo
- ambiguous import /foo/bar
- peer claims /foo, swallows /foo/bar.
- disambiguate_imports sees we didn't get /foo/bar, cancels ambiguous
import.
-> we are left with /foo/bar (and content) in cache, even tho it is
non-auth.
Fix by pulling the try_trim_non_auth_subtree() back out of
cancel_ambiguous_import, and trimming the containing subtree in the
disambiguate (resolve completion) case. (For the journal replay case the
subtree structure is deterministic and no such check is needed.)
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-29 17:46:24 -07:00
Sage Weil
9e4e345261
mds: fix replay of EFragment rollback
...
Remove from the uncommitted list.
Also, make uncommitted list updated unconditional: we need to do it even
if the inode wasn't already in our cache.
Also, journal the rollback with the same signedness as the prepare, so that
the descriptor/map key matches up. Adjust signs accordingly.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-29 17:46:23 -07:00
Yehuda Sadeh
a09eb0c33f
rgw: log bytes received
2011-04-29 17:17:23 -07:00
Yehuda Sadeh
6a16019099
rgw: fix some logging problems
2011-04-29 16:15:23 -07:00
Yehuda Sadeh
03d82a3fec
rgw_admin: dump also user email
2011-04-29 16:15:23 -07:00
Tommi Virtanen
e97ce8ec87
test/ceph_crypto: Check that the shutdown/fork/init trick works for NSS.
...
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 14:48:30 -07:00
Yehuda Sadeh
fc36eb6b99
filestore: fiemap should close the fd
2011-04-29 14:10:53 -07:00
Yehuda Sadeh
e4cdc583fd
filestore: fiemap should close the fd
2011-04-29 14:09:30 -07:00
Tommi Virtanen
264829b5b1
common, cfuse: Hook into daemonization and shutdown/init NSS.
...
NSS cannot tolerate forks without this.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:19:17 -07:00
Tommi Virtanen
98b0877183
msgr, common: Refactor to extract daemonization out of messenger.
...
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:17:30 -07:00
Tommi Virtanen
0e6bacc6e7
msgr: Rename SimpleMessenger::start(daemonize, nonce) to start_with_nonce.
...
Otherwise, once we remove daemonize from the prototype,
all the existing ->start(false) calls will be taken
to mean nonce=0.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:08:37 -07:00
Tommi Virtanen
84454c24d1
ceph_crypto: Assert that NSS initialization works.
...
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:08:36 -07:00
Colin Patrick McCabe
4107e2966a
common_init: create common_init_daemonize
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-29 11:29:03 -07:00
Wido den Hollander
2d82fefc04
config: Update sample config with more examples
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Signed-off-by: Wido den Hollander <wido@widodh.nl>
2011-04-29 10:39:04 -07:00
Colin Patrick McCabe
2047b59d65
common_init: set log_file, not log_dir, by default
...
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-29 10:23:10 -07:00
Colin Patrick McCabe
689a1bdd6e
common_init: don't modify log_per_instance
...
check it in DoutStreambuf instead.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-29 10:21:26 -07:00
Sage Weil
0a2d3f2505
msgr: remove dup .start() call check, remove cruft
...
There is now no ordering constraint wrt the daemonize bits; those can
safely be pulled out.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-29 09:49:05 -07:00
Jim Schutt
e0ec41380a
hadoop: cleanups for libceph type update
...
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-29 08:43:04 -07:00
Sage Weil
c9712e4ffc
lfn: put lfn outside of user.ceph namesapce
...
This completely hides the lfn from the ObjectStore interface users.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-28 16:01:23 -07:00
Sage Weil
6e727a9bdd
Merge remote branch 'origin/master' into lfn
2011-04-28 15:45:19 -07:00
Sage Weil
3a146f07e0
mdsmap: show mds name in summary
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:55:20 -07:00
Sage Weil
f468742166
hadoop: update libceph types
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:52:07 -07:00
Sage Weil
347bc9f2b7
hypertable: update libceph types
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:52:01 -07:00
Sage Weil
101506aa6a
libceph: error out if USE_FILE_OFFSET64 not defined
...
Otherwise struct dirent will not match user code and badness on readdir
will ensure.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:49:37 -07:00
Yehuda Sadeh
95cea34e8d
lfn: don't return ENOENT if it's not lfn in some cases
2011-04-28 15:44:28 -07:00
Sage Weil
e9fac67fe1
mds: ignore fragment_notify when dft state doesn't match
...
In particular, if there is a resolve in there somewhere, we may have found
out about this refragment from the src because they send resolve messages
to all nodes (to resolve ambiguous migrations). If that's the case we
can ignore the message.
Fixes crash like
2011-04-28 14:30:31.179106 7fe72e325710 -- 10.0.1.252:6805/22158 <== mds2 10.0.1.252:6803/25635 548 ==== fragment_notify(300000000b4#00* 1) v1 ==== 17+0+0 (2192211443 0 0) 0x2c9ec00 con 0x323d140
2011-04-28 14:30:31.179116 7fe72e325710 mds1.cache handle_fragment_notify fragment_notify(300000000b4#00* 1) v1 from mds2
2011-04-28 14:30:31.179149 7fe72e325710 mds1.cache adjust_dir_fragments 00* 1 on [inode 300000000b4 [...2,head] /syn.4114.0/dir.0/dir.0/dir.0/dir.0/dir.0/dir.5/dir.5/ auth{0=1,2=1} fragtree_t(*^2 00*^1) v188 ap=1 f(v0 m2011-04-28 14:23:59.074510 7=7+0) n(v2 rc2011-04-28 14:23:59.074510 15=14+1) (idft mix->lock g=0,2 dirty) (inest mix dirty) (ifile excl dirty) (ixattr excl) (iversion lock) caps={4114=pAsLsXsxFsx/-@1},l=4114(-1) | dirtyscattered dirfrag caps replicated dirty authpin 0x32bec70]
2011-04-28 14:30:31.179182 7fe72e325710 mds1.cache adjust_dir_fragments 00* bits 1 srcfrags 0x3080860,0x378da50 on [inode 300000000b4 [...2,head] /syn.4114.0/dir.0/dir.0/dir.0/dir.0/dir.0/dir.5/dir.5/ auth{0=1,2=1} fragtree_t(*^2 00*^1) v188 ap=1 f(v0 m2011-04-28 14:23:59.074510 7=7+0) n(v2 rc2011-04-28 14:23:59.074510 15=14+1) (idft mix->lock g=0,2 dirty) (inest mix dirty) (ifile excl dirty) (ixattr excl) (iversion lock) caps={4114=pAsLsXsxFsx/-@1},l=4114(-1) | dirtyscattered dirfrag caps replicated dirty authpin 0x32bec70]
2011-04-28 14:30:31.179218 7fe72e325710 mds1.cache new fragtree is fragtree_t(*^2 00*^1)
mds/MDCache.cc: In function 'void MDCache::adjust_dir_fragments(CInode*, std::list<CDir*, std::allocator<CDir*> >&, frag_t, int, std::list<CDir*, std::allocator<CDir*> >&, std::list<Context*, std::allocator<Context*> >&, bool)', in thread '0x7fe72e325710'
mds/MDCache.cc: 9254: FAILED assert(srcfrags.size() == 1)
ceph version 0.27-165-gaf908f8 (commit:af908f82924a67be3aeb2767eaa05ba04c145f42)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0xa5775e]
2: (MDCache::adjust_dir_fragments(CInode*, std::list<CDir*, std::allocator<CDir*> >&, frag_t, int, std::list<CDir*, std::allocator<CDir*> >&, std::list<Context*, std::allocator<Context*> >&, bool)+0x2dd) [0x888bbf]
3: (MDCache::adjust_dir_fragments(CInode*, frag_t, int, std::list<CDir*, std::allocator<CDir*> >&, std::list<Context*, std::allocator<Context*> >&, bool)+0x13d) [0x88817d]
4: (MDCache::handle_fragment_notify(MMDSFragmentNotify*)+0x199) [0x88bac5]
5: (MDCache::dispatch(Message*)+0x124) [0x8765ea]
6: (MDS::handle_deferrable_message(Message*)+0x1f5) [0x77a607]
7: (MDS::_dispatch(Message*)+0x784) [0x77ba90]
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:17:18 -07:00
Sage Weil
1c58f8069b
mds: do not send fragment_notify to <= recovering nodes
...
They will get sorted out during rejoin.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 15:02:58 -07:00
Sage Weil
27ca30dc5f
mds: fix uninint warning on cur
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 14:57:45 -07:00
Sage Weil
4f39fae043
mds: handle import cancel while logging EImportStart
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 14:57:45 -07:00
Sage Weil
2614583882
client: do not send request to mds -1
...
If we can't find a target, or the chosen target isn't active, wait.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 14:57:45 -07:00
Yehuda Sadeh
aee209732a
lfn: set hash and file name constants
2011-04-28 13:57:45 -07:00
Yehuda Sadeh
9b3c3aafb2
osd: remove warning about max object name length
2011-04-28 13:51:48 -07:00
Sage Weil
87efc95227
mds: try_trim_non_auth_subtree on any canceled import (including resolve)
...
We were trimming on journal replay of an import failure, but not on a
canceled ambiguous import during resolve. Fix that by moving the call into
the helper (and passing a CDir* instead of a dirfrag_t).
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 13:44:55 -07:00
Sage Weil
e942a2a000
mds: make trim_non_auth paths complete filepaths (not dnames)
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 13:34:34 -07:00
Sage Weil
21cc059eab
mds: fix steal_dentry dir_auth_pins adjustment
...
Pass down the correct value for dir_auth_pins (dh->auth_pins plus the
inode's auth_pins, but nothing nested beneath the inode). The CDentry
doesn't track dir auth pins independently, and doesn't really need to.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 13:22:30 -07:00
Sage Weil
81041de1e1
mon: use tcmalloc
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 13:08:34 -07:00
Sage Weil
8e4eed58bd
mds: fix export_prep trace format
...
The prep message includes a spanning tree in the interior of the subtree
that includes all parent inodes of bounding dirfrags. That used to look
like
df dentry inode (dir dentry inode)*
The code to generate those traces was stopping if the df->ino had already
been included. The problem was that we may have done the that inode on a
different dirfrag.
Change this to be
df ('-' | ('f' dir | 'd') dentry inode (dir dentry inode)*)
so that we can start with a dentry (already had the dirfrag, same check
as before) or a dirfrag (already had the inode, the new case), or a '-'
(nothing at all). A single byte is used to indicate which it is and how
to start decoding.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 13:00:44 -07:00
Sage Weil
47afbdae38
mon: make 'ceph osd (down,out,in) N' take mulitple osd numbers
...
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-28 12:42:23 -07:00
Sage Weil
5d6718e676
libceph: no _t types
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-28 12:34:11 -07:00
Yehuda Sadeh
4b9c093c70
lfn: short fn length is constant and accurate
...
also, disabling real hashing for now
2011-04-28 11:24:50 -07:00
Yehuda Sadeh
c8859f0471
osd: bump up max object name size
2011-04-28 11:16:17 -07:00
Yehuda Sadeh
7dd592aaf1
crypto: add support for SHA256
2011-04-28 11:15:50 -07:00