Commit Graph

16139 Commits

Author SHA1 Message Date
Samuel Just
600bc8fda0 MOSDSubOpReply/MSDSubOp: No need to update encoding version.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-31 16:10:01 -07:00
Samuel Just
bcef985deb FlatIndex: lfn_get needs to set *exist for short filenames
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-31 14:59:07 -07:00
Samuel Just
00e0b77e8b OSD: Fix encoding versions affected by hobject switch
PG log did not previously store the object locator.  To get the hash for
the hobject, scan the collection for the object during read_log if we
encouter an old style log entry.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-31 14:48:07 -07:00
Josh Durgin
39fa9d8deb Merge remote branch 'origin/wip-scrub-oi-size' 2011-08-31 11:58:15 -07:00
Sage Weil
d08c7843d7 Makefile: os/CollectionIndex.h
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:08:11 -07:00
Sage Weil
47a8063556 assert: work around libatomic_ops vs assert in a less lame way
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:05:09 -07:00
Sage Weil
5b7f9786a0 filestore: reorder includes
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:00:51 -07:00
Sage Weil
cf862c65fd assert: use our assert
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:00:51 -07:00
Sage Weil
5ae3e13617 crypto: reinclude our assert to clobber system one
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:00:51 -07:00
Sage Weil
3714862123 global_init: make startup line consistent, less ugly
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-31 10:00:51 -07:00
Sage Weil
961260d3a2 Makefile: add os/*Index.h to dist tarball
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-30 21:24:27 -07:00
Colin Patrick McCabe
4dce9fe5ea doc/architecture: describe lib arch, config arch
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-30 19:35:13 -07:00
Yehuda Sadeh
6180c2cccf osd: fix osd reply message 2011-08-30 15:56:09 -07:00
Samuel Just
5b70958935 cosd,OSD: Improve filestore upgrade path
Previously, fsconverter was required to update an osd filestore to the
most recent version.  cosd will now handle that automatically on
startup.  cosd --convert-filestore will also update the FileStore
to the most recent version.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-30 15:35:51 -07:00
Samuel Just
be2187c805 ObjectStore: Support older format on journal replay
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-30 15:35:51 -07:00
Yehuda Sadeh
f9b8537027 librados: don't hide error in case of failed pool ctx creation 2011-08-30 14:17:40 -07:00
Sage Weil
f0b626d4a4 Merge branch 'stable' 2011-08-30 13:15:00 -07:00
Sage Weil
7a8ab747ad client: plug leak of inode refs on seekdir(0)
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-30 13:14:56 -07:00
Sage Weil
6247df6be6 client: fix iterator adjustment in readdir assimilation
We need to move past the item we already had or else we'll remove it again
during the next iteration of the loop.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-30 13:14:56 -07:00
Sage Weil
ed7ebf35b1 client: drop mostly-useless relink()
Just use unlink() and then link().  Carry an inode ref to avoid badness.
The relink() is left over from a simpler time when we didn't do proper
refcounting.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-30 13:14:48 -07:00
Tommi Virtanen
cc1cb8da7e doc: Hide empty and broken "module index" page.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-08-30 12:47:24 -07:00
Tommi Virtanen
df0f32b73a doc: Disable static file copying, we don't use it.
Avoids a warning from sphinx on every run.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-08-30 12:38:37 -07:00
Tommi Virtanen
3144fd73d9 doc: Flesh out librados API example, to show doxygen & sphinx integration.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-08-30 12:37:12 -07:00
Samuel Just
df38a7013b JournalingObjectStore: journal_replay committed_seq fix
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>
2011-08-30 11:50:07 -07:00
Tommi Virtanen
c85c2f7535 doc: Adjust how table of contents is presented.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-08-30 11:26:56 -07:00
Sage Weil
ae552539e3 client: additional sanity checks on link/unlink
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-30 08:40:13 -07:00
Sage Weil
c44f134bfe Merge remote branch 'vapre/stable' 2011-08-30 08:38:47 -07:00
Sage Weil
8b8e47b1b3 client: simplify Inode operator<<
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-30 08:38:37 -07:00
Sage Weil
3d58d007f9 client: fix readder result merge
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>
2011-08-30 07:15:10 -07:00
Sage Weil
8d4c7e84cd client: relink_inode -> relink
and some comments.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-30 07:13:53 -07:00
Sage Weil
70178046ae client: add some asserts
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>
2011-08-30 07:10:04 -07:00
Sage Weil
afd5236c65 client: fix readder result merge
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>
2011-08-30 07:09:06 -07:00
Sage Weil
89fb93e448 os/hashindex: fix #include
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-29 19:32:22 -07:00
Samuel Just
b4e84cf7bc Merge branch 'wip_colindex' 2011-08-29 17:59:10 -07:00
Samuel Just
05989673dd osd/,os/,osdc/: Convert collection_list_handle_t to a struct
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>
2011-08-29 17:43:06 -07:00
Samuel Just
e6c91f6b55 fsconverter.cc: Added fsconverter
fsconverter updates an existing FileStore to the most recent FileStore
format

Signed-off-by: Samuel Just <rexludorum@gmail.com>
2011-08-29 17:43:06 -07:00
Samuel Just
279e16354a FileStore: On mount, scan collections for unstable state
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>
2011-08-29 17:43:06 -07:00
Samuel Just
42742ccd31 FileStore: Added update_version_stamp
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>
2011-08-29 17:43:06 -07:00
Samuel Just
341fb208aa FileStore: Add filestore version stamp
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>
2011-08-29 17:43:06 -07:00
Samuel Just
e23e1924dc osd_types.h: Fix support for old object_info_t
The object locator in the old encoding is necessary
to get the hash for soid.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:06 -07:00
Samuel Just
d59f34ab0e FileStore: Integrates HashIndex/IndexManager into FileStore
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:06 -07:00
Samuel Just
eb22b8df6d os/FlatIndex: FlatIndex encapsulates previous FileStore behavior
FlatIndex will be used to read and convert the previous on disk
format.

Signed-off-by: Samuel Just <rexludorum@gmail.com>
2011-08-29 17:43:06 -07:00
Samuel Just
d0744cdd1a FileStore: CollectionIndex, HashIndex, IndexManager
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>
2011-08-29 17:43:05 -07:00
Samuel Just
5492cbdfda ReplicatedPG: find_object_context now takes an hobject_t
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00
Samuel Just
5e927ebe0b osd/: fix hobject_t construction
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>
2011-08-29 17:43:05 -07:00
Samuel Just
a09c49134c dupstore: s/sobject_t/hobject_t
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00
Samuel Just
8fed10e265 src/messages/: s/sobject_t/hobject_t
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00
Samuel Just
f76baf1e9b src/osd/: s/sobject_t/hobject_t/g
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00
Samuel Just
1f591c2933 src/os/: s/sobject_t/hobject_t/g
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00
Samuel Just
45d829646d object.h: hobject_t definition
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-29 17:43:05 -07:00