Commit Graph

16250 Commits

Author SHA1 Message Date
Samuel Just
bf1963c2ef object.h: make hobject key private, prevent objects where key == oid
There should be no difference between an object with a key identical to
its name and an object with the same name but no key.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-07 15:10:33 -07:00
Yehuda Sadeh
c164904db4 rgw: make loop exit case explicit, removes warning 2011-09-07 10:37:09 -07:00
Sage Weil
61708dc5cc README: update a bit
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 10:23:59 -07:00
Samuel Just
fa14765ddc IndexManager: delete index during RemoveOnDelete
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-07 10:13:36 -07:00
Samuel Just
cd2716c415 OSD: use creating_pgs[pgid].history in get_or_create_pg for new pg
If info.pgid is in creating_pgs, we should use the history from
creating_pgs.  The history passed in will be an empty history from a
creation probe in that case.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-07 10:03:04 -07:00
Sage Weil
bce271ee68 client: add inode on IMPORT
If we get an IMPORT and don't have the inode, add it.  This fixes a race
like:

 mds0 -> client .. mknod reply (or similar)
 mds0 -> mds1 .. migrate cap
 mds1 -> client .. send IMPORT
 client <- mds1 .. rx IMPORT, but don't have inode
 client <- mds0 .. rx mknod reply, add it.

With this fix, we add the inode and set up the cap on IMPORT, and when we
get the mknod reply we update the inode immutable fields that aren't
present in the cap message (rdev, symlink target).

Fixes: #1513
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 09:48:35 -07:00
Sage Weil
15cd43de64 client: factor out flush_cap_releases() helper
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 09:39:53 -07:00
Sage Weil
3444e48462 mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking
Unlike other lock transitions, we are moving to an _unstable_ state and
then taking our (x)lock.  That means that if we don't actually finish for
some reason (lock order changes, request is canceled, whatever) we leave
things in an unstable state--in this case, PREXLOCK, where nothing else
will touch it.

Call cancel_lock in drop_locks (or in acquire_locks when the order changes)
to clean up after an aborted lock attempt.

Original but reproduced (though not easily) by multimds collection task
fsstress_thrash_subtrees.yaml.

Fixes: #1425
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 08:44:59 -07:00
Sage Weil
f9412b102d mds: _finish_xlock helper
Factor out _finish_xlock helper to move from XLOCKDONE (or, later,
PREXLOCK) to a non-xlock state.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 08:44:59 -07:00
Sage Weil
8f7c72bcb5 mds: mutation: add start/finish locking hooks
Keep track of which lock we are currently working on locking in the
Mutation.  Use helpers to make sure we start/finish locking in a sane
way.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 08:44:59 -07:00
Sage Weil
c975bb8815 mds: move Mutation + children out of MDCache.h
Uninline while we're at it.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 08:44:59 -07:00
Sage Weil
c46430fb33 librbd: {remove,resize,snap_rollback}_with_progress
C and C++ APIs.  Mirrors the copy_with_progress addition.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-06 22:07:33 -07:00
Sage Weil
3fc9c2f96c mon: log when we get an error
...before we assert(!err).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-06 21:49:06 -07:00
Brian Chrisman
c29b2213c7 ceph.spec: spec file should be creating /var/run/ceph
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
2011-09-06 21:08:47 -07:00
Jim Schutt
22fa86cbae osd: nss build of OSD.cc needs CRYPTO_CXXFLAGS since
nss build fails like this:

if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.   \
-D__KERNEL_STRICT_NAMES -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT \
-D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -rdynamic   -Winit-self \
-Wpointer-arith -fno-strict-aliasing -Wnon-virtual-dtor -Wno-invalid-offsetof \
-Wstrict-null-sentinel   -g -MT OSD.lo -MD -MP -MF ".deps/OSD.Tpo" -c -o OSD.lo `test \
                -f 'osd/OSD.cc' || echo './'`osd/OSD.cc; \
        then mv -f ".deps/OSD.Tpo" ".deps/OSD.Plo"; else rm -f ".deps/OSD.Tpo"; exit \
1; fi  g++ -DHAVE_CONFIG_H -I. -I. -I. -D__KERNEL_STRICT_NAMES -Wall -D__CEPH__ \
-D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS \
-D_GNU_SOURCE -rdynamic -Winit-self -Wpointer-arith -fno-strict-aliasing \
-Wnon-virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel -g -MT OSD.lo -MD -MP \
-MF .deps/OSD.Tpo -c osd/OSD.cc  -fPIC -DPIC -o .libs/OSD.o In file included from \
./os/LFNIndex.h:27,  from ./os/HashIndex.h:20,
                 from ./os/FileStore.h:26,
                 from osd/OSD.cc:25:
./common/ceph_crypto.h:44:22: error: pk11pub.h: No such file or directory

Commit d59f34ab made FileStore.h include HashIndex.h, which ultimately
results in OSD.cc including ceph_crypto.h.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
2011-09-06 21:05:38 -07:00
Yehuda Sadeh
2d2746f1ea rgw: fix arg parsing 2011-09-06 20:40:50 -07:00
Colin Patrick McCabe
22867fedcc rbd: fix command option parsing, honor --
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 18:01:34 -07:00
Josh Durgin
4fa647b1f4 cephtool: add --concise option again
This was accidentally removed in the arg parsing conversion.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-06 17:31:11 -07:00
Yehuda Sadeh
78a364662f rgw: prepare for supporting other meta headers 2011-09-06 16:58:43 -07:00
Josh Durgin
0f87638d61 osdmaptool: fix typo in argument
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-06 17:10:55 -07:00
Tommi Virtanen
37c7067351 doc: Note that mkcephfs can't do upgrades etc.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 16:08:58 -07:00
Tommi Virtanen
ecefa8e697 doc: mkcephfs ssh's directly as root@
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 15:57:17 -07:00
Tommi Virtanen
71dc75bdaf mkcephfs: Config $user is irrelevant when we want to run as root.
It used to just not sudo if $user was empty, on non-ssh do_root_cmd's.
This bug was exposed by commit 47b09e2f04.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 15:57:17 -07:00
Colin Patrick McCabe
693c4e50e5 Merge branch 'wip-argparse'
Conflicts:
	src/rgw/rgw_admin.cc
2011-09-06 15:39:30 -07:00
Colin Patrick McCabe
24939ceda4 ceph tool: convert to new-style arg parsing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:31:55 -07:00
Colin Patrick McCabe
21dbec9cec ceph_argparse: remove unused macros, functions
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
a00e9db205 cfuse: use new-style argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
64e5308726 cmon: use new argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
b1da7ec0dd cosd.cc: use new argument parsing functions
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
ba05e5e27b crushtool: use new argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
79ba94241f rgw_admin: use new argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
d481797484 rbd.cc: use new argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
316dd910b1 Add ceph_argparse_withlonglong
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:45 -07:00
Colin Patrick McCabe
39538d73eb monmaptool, osdmaptool: fix double-dash handling
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
1a1eab2303 monmaptool: use new argument parsing stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
a5fe5e2155 cmds: remove unused macro
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
aca43cc1b1 TestSignalHandlers: use new argument parsing stuff
Use new argument parsing stuff, remove some deadcode, cleanup.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
98edb3b861 osdmaptool: use new ceph_argparse stuff
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
1ccbfeabdf ceph_argparse: add ceph_argparse_withint
Add an easy way of parsing an int argument. Always match va_start with
va_end.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
b71f24a78e rados.cc: remove unused macro
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
7f453881d9 librados-config: remove unused old-style argparse
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:44 -07:00
Colin Patrick McCabe
290da11e2f cauthtool: convert to new-style arg parsing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:28:38 -07:00
Colin Patrick McCabe
bb167e50bd gceph tool: convert to new-style arg parsing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-06 15:23:17 -07:00
Yehuda Sadeh
77153d9fd2 rgw: set perm_mask for swift operations 2011-09-06 14:37:57 -07:00
Yehuda Sadeh
988ff0fd51 rgw: fix update_container_stats()
being used when using swift
2011-09-06 14:37:57 -07:00
Tommi Virtanen
1a52cbdeb7 doc: Explicitly say ceph.conf host= must not include domain name.
Hopefully this will work some day, but it doesn't right now.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 13:48:44 -07:00
Tommi Virtanen
47b09e2f04 mkcephfs: cosd and cmon setup must happen as root.
Without this, they cannot e.g. write to /var/log, or probably
even to their data directories.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 13:25:00 -07:00
Tommi Virtanen
28539ccde8 doc: Document mkcephfs-style installation.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 13:19:44 -07:00
Tommi Virtanen
fd7a422a55 man: mkcephfs: Typo.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-06 11:51:14 -07:00
Samuel Just
703631e5cc FileStore: close correct fd in version_stamp methods
version_stamp_is_valid and write_version_stamp previously closed op_fd
rather than fd causing write_op_sep to fail in sync_entry.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-06 11:49:38 -07:00