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>
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>
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>
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>
Caused by 3bd48cbbad
feature 4207 implementation
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
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>
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>
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>
In SelfManagedSnapRollbackPP add some overlapping writes
New SelfManagedSnapOverlap creates overlapping writes
Signed-off-by: David Zafman <david.zafman@inktank.com>
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>
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>
python-ceph complains when installed to debian squeeze about the 'with'
statement. Apparently installation tries to install the python-ceph package for
python 2.5, which does not support the 'with' statement natively.
Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
Local async events are obsolete if the pg is deleting or if the
epoch at which they were created is prior to last_peering_reset.
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 62999ea2d3)
What we really care about is that the epoch in which the Context
was submitted is at complete() time >= last_peering_reset.
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit a01dea6af9)