This reverts commit 2b4acfb1b8.
We fixed this on the receiving end in
fc51ce2a83 a few weeks after this commit
was added. It's ugly and no longer needed.
This *does* mean that we'll start to copy some data and then abort
partway through, but that's better than an kludgey protocol/interface.
Signed-off-by: Sage Weil <sage@redhat.com>
If librados constructs the CephContext, lockdep will be initialized
in both the librados shared address space and also within the app
address space. This breaks lockdep's functionality and results in
a crash upon shutdown.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Avoid keeping the metadata object alive through the lifespan of the
future. Callers can expect to receive a re-entrant callback if the
future is already safe and flush/wait is invoked.
Fixes: http://tracker.ceph.com/issues/15364
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Previously even directories were getting added to the
list of inodes to check in rejoin. This was a (small)
waste of time, with these dir inodes getting passed
all the way down into check_inode_max_size for no purpose.
Signed-off-by: John Spray <john.spray@redhat.com>
Include the pool ID in the log message when
we get a write error (and don't say "dir ino"
because this is also the path for files)
Move the duplicated logic for picking the pool out
into get_backtrace_pool()
In get_backtrace_pool(), assert that files do indeed
have a pool set.
Signed-off-by: John Spray <john.spray@redhat.com>
This is the state we get after an OSD write
error, so it's definitely something we want
to tell the user about in ceph status.
Signed-off-by: John Spray <john.spray@redhat.com>
The sched_scrub() method can be called by various code path, such as
OSD::tick() or triggered by a scrub_reserve_reply message.
The sched_scrub() will check whether or not the noscrub is globally set or
set for a specified pool before really starting to schedule a scrub job.
However, if we set noscrub flag for a specified pool, there are other pools
for which scrub are still legal and thus shall be granted.
The problem here is that we may stopping a pg's scrub in an intermidate stage
due to setting of the corresponding pool's noscrub flag whithout releasing
the reservation. Which as a result shall prevent other pgs of a different
pool from going scrubbing because we have already hit the reservation limit.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
One of our tests in our local testbed shows that if the number of snapshots
become extremely huge, the process of chunky-scrub() may encouter
heart-beat failure. This is because it takes a real long time for the
procedure to traverse and determine the boundary for a single run of
chunk scrub under this case.
This pr tries to solve the above the problem by resetting the tp handle
passed in once in a while(after a certain number of loops, 64 by default)
since the search can become very time-consumptive. Furthermore, the
BUILD_MAP stage later on shall encouter the same problem but has already
got fixed in the same way. Therefore, although the test case is rare,
but this change is defensive and make our code strong and thus shall be
considered as worthwhile.
Fixes: tracker.ceph.com/issues/12892
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
If we're using bluefs, only pass in the short relative
path (db, db.wal, db.slow). The leading components
are ignored and only lead to errors if the configuration
provides relative paths that do not match (e.g., if one
if using ceph-objectstore-tool).
Fixes: http://tracker.ceph.com/issues/15376
Signed-off-by: Sage Weil <sage@redhat.com>
Don't use this config option in librbd until
http://tracker.ceph.com/issues/15034 is avoided.
The option itself is still useful for mirroring threads, where
ordering is unimportant.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Implement the full object permission model for librgw (aka, NFS
and similar) operations.
Fixes DIRS1 unit tests.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
If a caller does an atomic create using rgw_lookup() and
RGW_LOOKUP_FLAG_CREATE, it needs to fix up the attributes using
create_stat().
For use outside of test cases, it probably needs an interlock also,
but for now, do just enough to satisfy existing attribute checks.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Gentoo's normal build process uses a sandbox to catch writes outside the
build environment; this includes providing a value other than /tmp for
TMPDIR. Use TMPDIR by default for CEPH_BUILD_VIRTUALENV.
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
If you data pool was pool 0, this was transforming
that to -1 unconditionally, which broke upgrades. We
only want do that for a fully zeroed ceph_file_layout,
so that it still maps to a file_layout_t. If any fields
are set, though, we trust the fl_pgpool to be a valid
pool.
Signed-off-by: Sage Weil <sage@redhat.com>
If systemd has task accounting enabled, a default of 512 tasks
will be applied to all systemd units.
For ceph, this is way to low even for a modest cluster, so stop
this restriction being applied and allow administrators to apply
limits using sysctl.
Signed-off-by: James Page <james.page@ubuntu.com>