Add sanity checks in close_dir(), and make sure we aren't replacing a dn
with the same name in link().
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
When merging readdir results into the cache, we want to remove any names
_preceeding_ the current item before updating it. Then, at the end, we
clean up the trailing items.
This fixes a cfuse crash on workunits/snaps/snaptest-2.sh.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Previously, we stored the collection_list handle as an opaque
uint64_t. Now, collection_list_handle_t is a struct defined
in types.h.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
CollectionIndex implementations may perform compound operations
leaving invalid state if interrupted. index->cleanup() gives
the implementation an oportunity to cleanup any in-progress
operation. For HashIndex, split and merge fall in this
category
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
update_version_stamp may be used to refresh the filestore version
stamp when all collections have been brought to the current
version.
Signed-off-by: Samuel Just <rexludorum@gmail.com>
A filestore will now be tagged with a version stamp during
mkfs. If on mount the version stamp detected lags the current
version, the mount will fail unless filestore_update_collections
is set in gconf. If it is set, opening a collection will cause
the version stamp on the collection to be read and the
appropriate indexing implmentation to be used. This will allow
for conversion from old collection indexing schemes to new
ones.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Adds ColletionIndex, an interface for collection indexing
systems, and HashIndex, a mechanism for organising a prehashed
collection.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
sobject_t requires only an object_t and a snapid_t. hobject_t also
requires the hash which should be used for the object. In most cases,
the osd must fill this in using the op message. In cases where the hash
used does not matter (as in the metadata collection), the explicit
hobject_t(const sobject_t &) constructor supplies a hash.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Previously, the rename operated on the collection names. Now, rename
operations on the full paths to the collections.
Signed-off-by: Samuel Just <rexludorum@gmail.com>
Previously, committed_seq was set to op_seq at the end of
replay_journal. committed_seq should not actually be set until the
sync thread runs.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
To build the docs, run ./admin/build-doc. To browse them, either get
them on any static website, or just run ./admin/serve-doc to serve
them quickly off of port 8080.
build-doc sets up a virtualenv to avoid needing Sphinx installed
system-wide. serve-doc needs thttpd installed.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
If you have a ThreadPool used by multiple WorkQueues, and some of them are
setting a suicide timeout, we need to clear it when a suicide timeout is
not set.
Signed-off-by: Sage Weil <sage@newdream.net>
OpWQ: timeout * 10
RecoveryWQ: this does no io; it if stalls we're probably stuck in an
infinite loop. timeout * 10.
ScrubFinalizeWQ: this is cpu only. we're probably stuck in a loop, or
swapping. timeout * 10.
Signed-off-by: Sage Weil <sage@newdream.net>
We were warning if there were any not up or in osds. Instead, warn if
there are any osds that are in but not up. That means if a node fails
and successfully marks the node out and retracts onto remaining nodes, the
ceph cluster is healthy again.
Presumably the fact that the nodes failed should raise other alerts,
because those specific daemons/nodes are not healthy.
Signed-off-by: Sage Weil <sage@newdream.net>