linux/drivers/block/rbd_types.h

/*
 * Ceph - scalable distributed file system
 *
 * Copyright (C) 2004-2010 Sage Weil <[email protected]>
 *
 * This is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1, as published by the Free Software
 * Foundation.  See file COPYING.
 *
 */

#ifndef CEPH_RBD_TYPES_H
#define CEPH_RBD_TYPES_H

#include <linux/types.h>

/* For format version 2, rbd image 'foo' consists of objects
 *   rbd_id.foo		- id of image
 *   rbd_header.<id>	- image metadata
 *   rbd_object_map.<id> - optional image object map
 *   rbd_data.<id>.0000000000000000
 *   rbd_data.<id>.0000000000000001
 *   ...		- data
 * Clients do not access header data directly in rbd format 2.
 */

#define RBD_HEADER_PREFIX
#define RBD_OBJECT_MAP_PREFIX
#define RBD_ID_PREFIX
#define RBD_V2_DATA_FORMAT

#define RBD_LOCK_NAME
#define RBD_LOCK_TAG
#define RBD_LOCK_COOKIE_PREFIX

enum rbd_notify_op {};

#define OBJECT_NONEXISTENT
#define OBJECT_EXISTS
#define OBJECT_PENDING
#define OBJECT_EXISTS_CLEAN

#define RBD_FLAG_OBJECT_MAP_INVALID
#define RBD_FLAG_FAST_DIFF_INVALID

/*
 * For format version 1, rbd image 'foo' consists of objects
 *   foo.rbd		- image metadata
 *   rb.<idhi>.<idlo>.<extra>.000000000000
 *   rb.<idhi>.<idlo>.<extra>.000000000001
 *   ...		- data
 * There is no notion of a persistent image id in rbd format 1.
 */

#define RBD_SUFFIX
#define RBD_V1_DATA_FORMAT

#define RBD_DIRECTORY
#define RBD_INFO

#define RBD_DEFAULT_OBJ_ORDER
#define RBD_MIN_OBJ_ORDER
#define RBD_MAX_OBJ_ORDER

#define RBD_HEADER_TEXT
#define RBD_HEADER_SIGNATURE
#define RBD_HEADER_VERSION

struct rbd_image_snap_ondisk {} __attribute__((packed));

struct rbd_image_header_ondisk {} __attribute__((packed));


#endif