close() was never called for the passed in IoCtx which
could probably result in an IoCtx leak if the original
IoCtx was a valid pool context allocated earlier.
Its kind of better to do it here rather than to leave
the destruction on the caller for better (or cleaner)
common case handling.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
A new CDentry will not have a parent until its projected parent is
flushed to journal. During path construction a given dentry may have no
parent yet which will cause fallbacks to be used (the inode number).
This can cause access checks to fail:
2016-11-17 19:50:43.830207 7eff9977a700 20 Session check_access path #10000000002/3
compare to an earlier check:
2016-11-17 19:50:43.824223 7eff9977a700 20 Session check_access path /test/1/2
This commit refactors path construction to optionally use projected
parents for the entire chain of directories. Existing use of real stable
parents is unchanged. For example, this line is the same before and
after the patch:
2016-11-18 23:17:15.611680 7f153f97a700 12 mds.0.cache.dir(10000000002) add_null_dentry [dentry #10000000002/3 [2,head] auth NULL (dversion lock) pv=0 v=1 inode=0 0x55e0f771f5f0]
Here inode "#10000000002" has no stable parent yet. So the path is
constructed as "#10000000002/3".
One notable change in this commit is the removal of
make_path_string_projected which was only used in debugging code. Here's
an example difference:
2016-11-17 19:50:43.827915 7eff9977a700 10 mds.0.server traverse_to_auth_dir [dir 10000000003 {#10000000003 #10000000002/3}/ [2,head] auth v=1 cv=0/0 state=1073741826|complete f() n() hs=0+0,ss=0+0 0x55f5d35e2ee0]
to:
2016-11-18 23:17:15.617757 7f153f97a700 10 mds.0.server traverse_to_auth_dir [dir 10000000003 /test/1/2/3/ [2,head] auth v=1 cv=0/0 state=1073741826|complete f() n() hs=0+0,ss=0+0 0x55e0f7706ee0]
Fixes: http://tracker.ceph.com/issues/17858
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Ensure that we can add new flags in the future by not allowing anyone
to set flags that we don't currently recognize.
Fixes: http://tracker.ceph.com/issues/17911
Signed-off-by: Jeff Layton <jlayton@redhat.com>
We're changing the default value because the previous one was
a makeshift solution to not fail Ceph compilation due to
the Beast's dependency on Boost >= 1.54 that wasn't available
on CentoOS 7. As we got the in-tree Boost we can compile
the ASIO front-end by default.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
If this txc or any txc that precedes it has unstable IO we cannot queue
our kv transaction without a bdev sync. Currently such a sync is only
triggered from the kv_sync_thread, so we need to do this kv submission
async.
Signed-off-by: Sage Weil <sage@redhat.com>
For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-
60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-
33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok
Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).
For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.
Fixes: http://tracker.ceph.com/issues/16014
Signed-off-by: Loic Dachary <loic@dachary.org>
If we submit the txc synchronously, we can't immediately release our
freed space to the allocator; that still needs to be done between
commit_start() and commit_finish() from the kv_sync_thread, protected
by the bdev barriers.
Signed-off-by: Sage Weil <sage@redhat.com>
- change order of testing
- But report the same error types.
- Changed to report for the last error since the value is there but
not allowed characters follow.
Error found by: run-cli-tests, because the wrong string was returned.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
While it is being worked on, because it frequently fails.
Refs: http://tracker.ceph.com/issues/17830
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Loic Dachary <loic@dachary.org>