Commit Graph

24521 Commits

Author SHA1 Message Date
David Zafman
f52ec6decd osd: fadvise replica data don't use
Add transaction flag indicating if op is at a replica
After write has been sync'ed use posix_fadvise() to clear kernel cache

Feature: #2733

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-07 19:36:07 -08:00
Jan Harkes
08d5a283df Avoid sending a success response when an error occurs.
Functions called from RGWGetObj_ObjStore_S3::send_response_data may
change the value of the non-local variable 'ret'. But the response
relies on a local 'req_state' which copies ret at the start of the
function.

Right now none of the called functions actually changes ret so the
problem doesn't trigger, but to avoid future breakage it is safer
to not rely on the (early) copy of the ret variable.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-07 22:29:39 -05:00
David Zafman
edd0a1c69f Fix FileStore to notice if filestore_flusher config is changed
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 17:59:31 -08:00
Sage Weil
de62a79589 Merge branch 'wip-traceless'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-07 17:52:26 -08:00
Sage Weil
eb9b5f074f client: move annoying traceless handling into verify_reply_trace()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3f1b7fd590 client: debug async cache invalidation
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3a7233bc8b mds: pass created_ino back to client on replayed requests
After an MDS restart, the client will resend uncommitted requests.  Use the
information we now have in the session_info_t to pass the created ino
back via the extra_bl payload in the reply.

Fixes: #4034
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
0bcf2ac081 mds: track created inos with completed request ids in session info
Along with each session completed request (tid), also track the created
ino (if any).  This will be used to pass back to the client when they
replay requests in the next patch.

Do not bother making this a backward compatible encoding.  The only
benefit is to allow ceph-mds code to run and then old mds code to run
after it.  Given all of the other incompat changes we *just* made, this
is highly unlikely and not worth the code clutter.  If we had spanned
more releases or a stable release the story would be different.

While we are here, inline the second add_completed_request() method variant
since there is only a single caller and having it overloaded somewhat
obscures what is going on.  This also avoids a duplicate lookup in the
session map in the have_session() check and then in the (old) helper.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:56 -08:00
Sage Weil
977a1cb257 client: debug created ino
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:47 -08:00
Sage Weil
974dc84f6e client: unlink old_dentry on traceless rename reply
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:44 -08:00
Sage Weil
bc92b40617 client: force lookup on traceless reply
Call _do_lookup directly so that we avoid hitting the cache

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
0d501f6121 client: make _do_lookup take a const string
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
31127548bd mds: do not do traceless reply for open O_TRUNC requests
Even though these are "may_write" and may be a mutation, the MDS should not
fake out a traceless reply.  In a real failure, it looks like:

 - mds process request (mutation)
 - mds fails
 - client resends request
 - mds notes that it is O_TRUNC, and already committed, and proceeds with
   a regular open

And that is all fine.

But, that means that if we are trying to simulate this behavior without a
failure, then we should never do a traceless reply on an O_TRUNC request,
because the client will never see such a reply--it'll get a full open
request response instead.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
98a383be2e client: handle fh cleanup in ll_create() failure path
Release the fh if we fail the permissions check.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
d87035c0c4 client: root can write to any file
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
613c8f1edf client: clear I_COMPLETE on traceless reply for dentry request
If a request is against a dentry, and we get a traceless reply, clear
the directory I_COMPLETE flag on the parent directory because we can no
longer trust that our cache is complete.

It is possible we could do something a bit more intelligent here, but it
is not trivial because of racing requests, and traceless replies are
rare, so it's not worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
80e122f5e8 client: pass ptarget from link, create, mkdir, symlink, setattr
Use the new make_request functionality to ensure that we properly handle
the re-lookup/getattr when we get a traceless reply back from the MDS.

Note that we have to do this on setattr() because ll_getattr() expects to
return the updated inode metadata to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
29abaf66ad client: handle traceless replies from make_request()
Modify the generic make_request wrapper to retry lookups or getattrs on
requests when the ptarget pointer is specified but there is no trace in
the reply.

Refactor the _create() method to use this, effectively moving all of the
extra_bl code processing into make_request where it is generically
useful.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 15:22:21 -08:00
Sage Weil
1e2864a020 osd: increate default pg log size from 1000 -> 3000
This reduces the probability that we will fail to detect a dup op.  See
#4368.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 10:31:27 -08:00
Sage Weil
e19b8f5fb0 Merge remote-tracking branch 'gh/wip-log-max' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 09:29:44 -08:00
Sage Weil
a714c16656 vstart.sh: osd debug op order = true
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 09:28:17 -08:00
Josh Durgin
e6caf69cf4 config: note which options are overridden by common_preinit()
Defaults for these differ based on the context in which they're used.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-06 17:49:57 -08:00
Josh Durgin
7c208d2f8e common: reduce default in-memory logs for non-daemons
The default of 100000 can result in hundreds of MBs of extra memory
used. This was most obvious when using librbd with caching enabled,
since there was a dout(0) accidentally left in the ObjectCacher.

refs: #4352
backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-06 17:47:28 -08:00
Sage Weil
a58eec90ca init-ceph: fix run dir
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-06 17:09:58 -08:00
Sage Weil
de2c5b3fb7 osd: add ctor for clone_info
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 439d0e334d)
2013-03-06 15:13:16 -08:00
David Zafman
e1e2d5d217 Missed adding rados_types.hpp to package
Caused by 3bd48cbbadb7908dd833ccde75359f085828fc5c
feature 4207 implementation

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-03-06 14:40:29 -08:00
Josh Durgin
cb3ee33532 ObjectCacher: fix debug log level in split
Level 0 should never be used for this kind of debugging.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-03-06 12:32:43 -08:00
Sage Weil
439d0e334d osd: add ctor for clone_info
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-06 10:21:59 -08:00
Sage Weil
1e01b045d3 Merge remote-tracking branch 'gh/wip-expose-topo'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-06 08:11:26 -08:00
Sage Weil
de31531da3 Merge pull request #90 from grosskur/fix-debian-libsnappy
debian: require libsnappy-dev for ceph
2013-03-06 07:54:13 -08:00
Alan Grosskurth
a319f5cb74 debian: require libsnappy-dev for ceph
Debian builds are currently broken without this requirement.
2013-03-06 02:21:12 -08:00
Noah Watkins
ee158ed267 libcephfs: return osd location from crush map
Adds ceph_get_osd_crush_location that returns a list of (type,name)
pairs for devices that exist between a given osd and the root of the
bucket hierarchy.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-05 23:18:07 -08:00
Gary Lowell
e694ea58c2 release-process.rst: Fix typos
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-03-05 22:08:15 -08:00
Noah Watkins
e8da4bf9b5 client: expose extent/osd mapping
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-05 16:04:55 -08:00
Sage Weil
8184b68c37 Merge branch 'wip-prepare'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Tested-by: Tamil Muthamizhan <tamil.muthamizhan@inktank.com>
2013-03-05 13:33:05 -08:00
Sage Weil
32407c994f ceph-disk-prepare: move in-use checks to the top, before zap
Move the in-use checks to the very top, before we (say) zap!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-05 13:08:26 -08:00
Sage Weil
8550e5c6ab doc/release-notes: v0.58
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-05 11:03:08 -08:00
carsonoid
b244b87f28 Update doc/radosgw/s3/python.rst
Note about creating conn object for non-ssl implementations.
2013-03-05 11:03:08 -08:00
David Zafman
3bd48cbbad Merge branch 'wip-4207'
Feature: #4207: osd/librados: add ops to list snaps for an object

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reported-by: Sam Just <sam.just@inktank.com>
2013-03-05 10:26:29 -08:00
Gary Lowell
af6b6eddae Merge branch 'master' of https://github.com/ceph/ceph 2013-03-05 09:06:24 -08:00
Gary Lowell
66cadbe515 Merge branch 'next' 2013-03-05 09:05:21 -08:00
David Zafman
7cd1cb2f9e Add list_snaps() calls to snapshots test cases
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:50 -08:00
David Zafman
818f3d298e Add rados listsnaps command
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:50 -08:00
David Zafman
db4ccc0827 osd/librados: add op to list clones/snaps for an object
Returning snap_set_t with clone info
and snapshots in ascending order
Add clones with snapshots to obj_list_snap_response_t
New rados_types.hpp with snap_set_t/clone_info_t
Move snap_t to rados_types.hpp
Add generate_test_instances() and TYPE() to encoding/types.h

Feature: #4207

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:43 -08:00
David Zafman
3b5933e0a0 Remove unused SnapContext in librados.hpp
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
David Zafman
1ebfb41455 osd: Improve snapshot test
In SelfManagedSnapRollbackPP add some overlapping writes
New SelfManagedSnapOverlap creates overlapping writes

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
David Zafman
84183303a6 osd: correct comment
SnapSet snaps are in descending order

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
Sage Weil
a6196de9e2 ceph-disk-prepare: verify device is not in use by device-mapper
Be nice and tell the user which devices/mappings are consuming the device,
too.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 20:57:52 -08:00
Sage Weil
3bd0ac0ab0 ceph-disk-prepare: verify device is not mounted before using
Make sure the data and/or journal device(s) are not in use (mounted)
before using them.  Make room for additional "in-use" checks in the future.

Closes: #3256
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 17:30:13 -08:00
Josh Durgin
867586c674 debian: require >= python2.6 for ceph as well
ceph-disk-prepare and ceph-disk-activate use the with statement,
str.format, and possibly other new features from python 2.6.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-04 16:49:14 -08:00