This counts dirfrag auth_pins and ensure the inode's nested_auth_pins
count is correct. Helped catch the bug fixed in the previous commit.
Signed-off-by: Sage Weil <sage@newdream.net>
The diri gets an auth_pin on the first frag pin when it is not a subtree
root. When we are moving dentries between frags during refragment, make
sure we use the adjust_nested_auth_pins method to have one such pin per
fragment.
Carry an auth_pin on the old fragment for the duration to ensure that the
pinning/unpinning as no side-effects.
Signed-off-by: Sage Weil <sage@newdream.net>
fragment_mark_and_complete aims to complete the in-cache directory,
mark+pin every dentry, then drop a final auth_pin so that the whole thing
freezes. The problem is we may not be holding the final auth_pin, and
other dentries may get added (or removed?) between the mark and freeze
stages.
Use the DNPINNEDFRAG dir state bit to maintain the invariant that that
bit is set IFF all dentries are similarly pinned and marked. Update the
add_*_dentry and remove_dentry methods to do that.
Fix the success path to assert this was true and to clean up(!). Also
fix the unwind/failure path to assert.
Signed-off-by: Sage Weil <sage@newdream.net>
Freeze the target fragment(s) before unfreezing the old fragment(s) to
avoid any weird events going off when the unfreeze unauth_pins the dir
inode (in certain cases). This makes the whole process cleaner and more
symmetrical.
Signed-off-by: Sage Weil <sage@newdream.net>
With this, "./configure --without-debug && make -C src testceph" will work.
Before this, it would use make builtin rules, and fail to compile in a
confusing manner.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This is for the client map journaling, but that's handled
elsewhere within this function...no idea why it ever had
a fixme there!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Consider:
- send discover on frag X
- X refragments
- we take the waiter and rediscover on frag Y
- we get the reply for the X discover
The auth mds will correctly delay sending the reply until the refragment
completes and it unfreezes, but the reply was getting the original frag_t,
not the new one.
Signed-off-by: Sage Weil <sage@newdream.net>
Ancient versions of gcc, such as the gcc 4.1.2 in RHEL 5.5, don't
support some -W flags that newer versions do. Fix up configure.ac
and Makefile.am to use them if you have them.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Assign a standby-replay at any time based on rank, name, or no preference.
Previously this could only happen when the MDS first started, and we would
fail if the target MDS wasn't followable at that point in time.
Signed-off-by: Sage Weil <sage@newdream.net>
Implement RadosStore, a storage backend which accesses librados
directly, without going through RGW (Rados GateWay).
This version is still very preliminary because ACLs aren't supported.
We need ACLs even to do things like properly create buckets.
Instead, this version has ACL_HACK, which is just for testing purposes.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Order this op wrt reads the same way a read-modify-write would be.
(Otherwise we may get a fast/stale read result on a not-yet-complete
write.)
This fixes a problem where the Filer was marking a probe stat as a write
to get this same effect, but the OSD would EINVAL if it was a snapped
object (which happens in certain cases where the MDS is recovering the
file size of a snapped file).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We want to be able to handle a failure mid-way through an OSDOp
transaction and bail out with no side effects. This patch
* puts an ObjectState new_obs in the OoContext that modifications go in
* only applies if it the transaction is a success
* only does make_writeable (at the end!) if the transaction is a success
There are still side effects with the watch/notify stuff, though.
Signed-off-by: Sage Weil <sage@newdream.net>