This should fix the file_excl case on a file_max update when there
is more than one mds.
If we dont issue caps here its possible when we eval_gather on
the returning lockack that we don't push the lock forward which
will leave the inode auth pinned. If an export occurs that tries
to freeze a tree this inode is in, we'll have a freezing tree
waiting for an auth_pin that can no longer be removed.
Signed-off-by: Brandon Seibel <brandon@seibelnet.ca>
This way the object is actually deleted when it has no snapshots,
since the transaction is not aborted. This makes
test_rbd:TestImage.test_rollback_to_snap_sparse pass.
Fixes: #1554
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
The block_map is a waste of memory. It is simpler just to keep track of
what offset a Log::Entry was read/written/appended to, and trim based on
that.
Motivated by alldown-to-cleanboth.pdf on #1583.
Signed-off-by: Sage Weil <sage@newdream.net>
They're both short, and log_op only ends up hiding information that
append_log will soon need (the raw Log::Entry's).
Signed-off-by: Sage Weil <sage@newdream.net>
When restarting a stopped MDS, we need to mark the Journaler read/write
before we use it. Do this in MDLog::append(), when we position the write
pointer at the end of the journal.
Signed-off-by: Sage Weil <sage@newdream.net>
We don't really need mydir here. It is normally opened up in the
subsequent call to open_root(). That will be identical on journal replay,
so no need to have it beforehand (and in the ESubtreeMap entry).
Signed-off-by: Sage Weil <sage@newdream.net>
This is the same object that rgw_rados removes from the root pool now.
And since nobody calls rgw_remove_bucket_info, kill it.
(Hopefully we can kill all of the pi_buckets functions soon.)
While we're at it, rename rgw_remove_bucket to rgw_remove_user_bucket_info,
since that's what it does.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
It's more consistent for RGWRados to delete the bucket object, rather
than the rgw_user functions.
And commenting functions out is not a happy practice.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Get the version from the same io_ctx that you write with.
Also, use a private one, so that we don't race with other threads.
Signed-off-by: Sage Weil <sage@newdream.net>
This is probably wrong, but it fixes the immediate problem of the first
entry in the log not having the owner field set. The 'log show' looks at
that first entry to spit out key bucket metadata.
A better approach is probably to put that bucket/log metadata (bucket_id,
owner) that doesn't change as an xattr on the object instead of dupilcating
it in every record. Or something like that...
Signed-off-by: Sage Weil <sage@newdream.net>
Use a single method to store bucket metadata.
Store it in both locations, so it never diverges. (This can still be
cleaned up.. probably one object should just point to the other, so the
data is only in one place.)
Disable to 'pool create' thing for now, which is still confusing me...
Signed-off-by: Sage Weil <sage@newdream.net>
Don't rely on the bucketinfo object for this, as it may be deleted. Having
it there most of the time but not always is going to mean breakage for
users.
Signed-off-by: Sage Weil <sage@newdream.net>
Commit 25499b644b introduced the initial
work for pool sharing and markers, but didn't set radosgw_admin to
use that infrastructure. We definitely want to be doing so, though,
since radosgw_admin isn't creating system buckets. Do so.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously, is_locked could erroneously return true if there were any
threads waiting on a cond on that lock. In particular, any lock
associated with a timer would always return true for is_locked if any
events were scheduled on the timer.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
The normal object listing API seemed like a real poor match here so I
hacked in something that just lists the raw rados objects. It also looks
like that may need some fixing.
This patch at least establishes a usable interface that is purely
radosgw-admin based for listing, fetching, and removing logs, so users can
avoid looking at rados pools directly.
Signed-off-by: Sage Weil <sage@newdream.net>
Users can create buckets named "8", but they can't name them ".8". So
prepend the actual on-disk objects with a period.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
If we want a plain output, we should implement a PlainFormatter of some
sort. For now, pretty json is good enough.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Conflicts:
src/rgw/rgw_admin.cc