objectstore: use enum for OP_*

Enforce no dups.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
objectstore: OP_COLL_MOVE

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
filestore: implement OP_COLL_MOVE

Equivalent to OP_COLL_ADD, OP_COLL_REMOVE.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
osd: use new collection_move() operation

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Merge remote branch 'gh/wip-msgr-interface'

Reviewed-by: Sage Weil <sage@newdream.net>
rbd OCF RA: fix whitespace inconsistency

Signed-off-by: Florian Haas <florian@hastexo.com>
Merge pull request #9 from fghaas/ocf-ra

OCF resource agents: add rbd

Reviewed-by: Sage Weil <sage@newdream.net>
Reviewed-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
filestore: drop useless read_op_seq() arg

Signed-off-by: Sage Weil <sage@newdream.net>
filestore: create snap_0 on mkfs

If we create a new filestore, apply one transaction, and then crash, we
want to make sure roll back to a consistent reference point--empty.  The
simplest solution is to create that snap_0 during mkfs.  This avoids
strangeness like

2012-02-27 00:42:00.336703 7fb1381ef780 filestore(/ceph/osd.0) mkfs in /ceph/osd.0
2012-02-27 00:42:00.341399 7fb1381ef780 journal _open /ceph/osd.0.journal fd 10: 1048576000 bytes, block size 4096 bytes, directio = 1, aio = 0
2012-02-27 00:42:00.349705 7fb1381ef780 filestore(/ceph/osd.0) mkjournal created journal on /ceph/osd.0.journal
2012-02-27 00:42:00.349728 7fb1381ef780 filestore(/ceph/osd.0) mkfs done in /ceph/osd.0
2012-02-27 00:42:00.349787 7fb1381ef780 filestore(/ceph/osd.0) mount FIEMAP ioctl is NOT supported
2012-02-27 00:42:00.349800 7fb1381ef780 filestore(/ceph/osd.0) mount detected btrfs
2012-02-27 00:42:00.349813 7fb1381ef780 filestore(/ceph/osd.0) mount btrfs CLONE_RANGE ioctl is supported
2012-02-27 00:42:00.357023 7fb1381ef780 filestore(/ceph/osd.0) mount btrfs SNAP_CREATE is supported
2012-02-27 00:42:00.405174 7fb1381ef780 filestore(/ceph/osd.0) mount btrfs SNAP_DESTROY is supported
2012-02-27 00:42:00.405214 7fb1381ef780 filestore(/ceph/osd.0) mount btrfs START_SYNC got (25) Inappropriate ioctl for device
2012-02-27 00:42:00.405228 7fb1381ef780 filestore(/ceph/osd.0) mount btrfs START_SYNC is NOT supported: (25) Inappropriate ioctl for device
2012-02-27 00:42:00.405235 7fb1381ef780 filestore(/ceph/osd.0) mount WARNING: btrfs snaps enabled, but no SNAP_CREATE_V2 ioctl (from kernel 2.6.37+)
2012-02-27 00:42:00.405561 7fb1381ef780 filestore(/ceph/osd.0) mount found snaps <>
2012-02-27 00:42:00.405576 7fb1381ef780 filestore(/ceph/osd.0) mount WARNING: no consistent snaps found, store may be in inconsistent state

and subsequent badness if we fail before a proper commit is made.

Fixes: #2105
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
.gitignore: src/ocf/rbd

Signed-off-by: Sage Weil <sage@newdream.net>
Merge remote-tracking branch 'gh/wip-2105'

Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
journaler: add generic write error handler

Specify a generic callback for any write error the journaler encounters.
This is more helpful than passing up write errors to specific callers
because

 - there are several of them
 - journaler initiates writes on its own (like the head)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
mds: respawn when blacklisted

If we are blacklisted by the OSD cluster, it's because we were too slow
and were replaced by another ceph-mds.  Respawn and re-register as a
standby.

If we get some other write error, shut down.

Fixes: #1796
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Merge branch 'wip-1796'

Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
librados: add tmap_put to ObjectWriteOperation

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
ReplicatedPG: add omap_header to recovery

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
osdc: Add omap operation stubs to Objecter::ObjectOperation

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
librados: Added omap operations to librados

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
ReplicatedPG: Add omap ops to ReplicatedPG

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
RadosModel: Add omap operations to RadosModel

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>