* [PATCH 0/3] libceph: update ceph_fs.h and related code
@ 2013-02-16 17:05 Alex Elder
2013-02-16 17:06 ` [PATCH 1/2] libceph: update ceph_fs.h Alex Elder
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alex Elder @ 2013-02-16 17:05 UTC (permalink / raw)
To: ceph-devel
This series updates "include/linux/ceph/ceph_fs.h" to nearly match
its user space counterpart in "src/include/ceph_fs.h".
There are still a few things that should be reconciled by updating
that user space code; that work is covered by:
http://tracker.ceph.com/issues/4168
-Alex
[PATCH 1/2] libceph: update ceph_fs.h
[PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name()
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] libceph: update ceph_fs.h
2013-02-16 17:05 [PATCH 0/3] libceph: update ceph_fs.h and related code Alex Elder
@ 2013-02-16 17:06 ` Alex Elder
2013-02-16 17:06 ` [PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name() Alex Elder
2013-02-16 23:58 ` [PATCH 0/3] libceph: update ceph_fs.h and related code Josh Durgin
2 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2013-02-16 17:06 UTC (permalink / raw)
To: ceph-devel
(Whoops, there were only two patches, not three.)
Update most of "include/linux/ceph/ceph_fs.h" to match its user
space counterpart in "src/include/ceph_fs.h" in the ceph tree.
Everything that has changed is either:
- added definitions (therefore no real effect on existing code)
- deleting unused symbols
- added or revised comments
There were some differences between the struct definitions for
ceph_mon_subscribe_item and the open field of ceph_mds_request_args;
those differences remain.
This and the next commit resolve:
http://tracker.ceph.com/issues/4165
Signed-off-by: Alex Elder <elder@inktank.com>
---
include/linux/ceph/ceph_fs.h | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index cf6f4d9..2ad7b86 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -21,16 +21,14 @@
* internal cluster protocols separately from the public,
* client-facing protocol.
*/
-#define CEPH_OSD_PROTOCOL 8 /* cluster internal */
-#define CEPH_MDS_PROTOCOL 12 /* cluster internal */
-#define CEPH_MON_PROTOCOL 5 /* cluster internal */
#define CEPH_OSDC_PROTOCOL 24 /* server/client */
#define CEPH_MDSC_PROTOCOL 32 /* server/client */
#define CEPH_MONC_PROTOCOL 15 /* server/client */
-#define CEPH_INO_ROOT 1
-#define CEPH_INO_CEPH 2 /* hidden .ceph dir */
+#define CEPH_INO_ROOT 1
+#define CEPH_INO_CEPH 2 /* hidden .ceph dir */
+#define CEPH_INO_DOTDOT 3 /* used by ceph fuse for parent (..) */
/* arbitrary limit on max # of monitors (cluster of 3 is typical) */
#define CEPH_MAX_MON 31
@@ -51,7 +49,7 @@ struct ceph_file_layout {
__le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if
any */
/* object -> pg layout */
- __le32 fl_unused; /* unused; used to be preferred primary (-1) */
+ __le32 fl_unused; /* unused; used to be preferred primary for pg
(-1 for none) */
__le32 fl_pg_pool; /* namespace, crush ruleset, rep level */
} __attribute__ ((packed));
@@ -101,6 +99,8 @@ struct ceph_dir_layout {
#define CEPH_MSG_MON_SUBSCRIBE_ACK 16
#define CEPH_MSG_AUTH 17
#define CEPH_MSG_AUTH_REPLY 18
+#define CEPH_MSG_MON_GET_VERSION 19
+#define CEPH_MSG_MON_GET_VERSION_REPLY 20
/* client <-> mds */
#define CEPH_MSG_MDS_MAP 21
@@ -221,6 +221,11 @@ struct ceph_mon_subscribe_ack {
} __attribute__ ((packed));
/*
+ * mdsmap flags
+ */
+#define CEPH_MDSMAP_DOWN (1<<0) /* cluster deliberately down */
+
+/*
* mds states
* > 0 -> in
* <= 0 -> out
@@ -233,6 +238,7 @@ struct ceph_mon_subscribe_ack {
#define CEPH_MDS_STATE_CREATING -6 /* up, creating MDS instance. */
#define CEPH_MDS_STATE_STARTING -7 /* up, starting previously
stopped mds */
#define CEPH_MDS_STATE_STANDBY_REPLAY -8 /* up, tailing active node's
journal */
+#define CEPH_MDS_STATE_REPLAYONCE -9 /* up, replaying an active
node's journal */
#define CEPH_MDS_STATE_REPLAY 8 /* up, replaying journal. */
#define CEPH_MDS_STATE_RESOLVE 9 /* up, disambiguating distributed
@@ -264,6 +270,7 @@ extern const char *ceph_mds_state_name(int s);
#define CEPH_LOCK_IXATTR 2048
#define CEPH_LOCK_IFLOCK 4096 /* advisory file locks */
#define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */
+#define CEPH_LOCK_IPOLICY 16384 /* policy lock on dirs. MDS internal */
/* client_session ops */
enum {
@@ -338,6 +345,12 @@ extern const char *ceph_mds_op_name(int op);
#define CEPH_SETATTR_SIZE 32
#define CEPH_SETATTR_CTIME 64
+/*
+ * Ceph setxattr request flags.
+ */
+#define CEPH_XATTR_CREATE 1
+#define CEPH_XATTR_REPLACE 2
+
union ceph_mds_request_args {
struct {
__le32 mask; /* CEPH_CAP_* */
@@ -522,14 +535,17 @@ int ceph_flags_to_mode(int flags);
#define CEPH_CAP_GWREXTEND 64 /* (file) client can extend EOF */
#define CEPH_CAP_GLAZYIO 128 /* (file) client can perform lazy io */
+#define CEPH_CAP_SIMPLE_BITS 2
+#define CEPH_CAP_FILE_BITS 8
+
/* per-lock shift */
#define CEPH_CAP_SAUTH 2
#define CEPH_CAP_SLINK 4
#define CEPH_CAP_SXATTR 6
#define CEPH_CAP_SFILE 8
-#define CEPH_CAP_SFLOCK 20
+#define CEPH_CAP_SFLOCK 20
-#define CEPH_CAP_BITS 22
+#define CEPH_CAP_BITS 22
/* composed values */
#define CEPH_CAP_AUTH_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SAUTH)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name()
2013-02-16 17:05 [PATCH 0/3] libceph: update ceph_fs.h and related code Alex Elder
2013-02-16 17:06 ` [PATCH 1/2] libceph: update ceph_fs.h Alex Elder
@ 2013-02-16 17:06 ` Alex Elder
2013-02-16 23:58 ` [PATCH 0/3] libceph: update ceph_fs.h and related code Josh Durgin
2 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2013-02-16 17:06 UTC (permalink / raw)
To: ceph-devel
Update ceph_mds_state_name() and ceph_mds_op_name() to include the
newly-added definitions in "ceph_fs.h", and to match its counterpart
in the user space code.
Signed-off-by: Alex Elder <elder@inktank.com>
---
fs/ceph/strings.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ceph/strings.c b/fs/ceph/strings.c
index cd5097d..89fa4a9 100644
--- a/fs/ceph/strings.c
+++ b/fs/ceph/strings.c
@@ -15,6 +15,7 @@ const char *ceph_mds_state_name(int s)
case CEPH_MDS_STATE_BOOT: return "up:boot";
case CEPH_MDS_STATE_STANDBY: return "up:standby";
case CEPH_MDS_STATE_STANDBY_REPLAY: return "up:standby-replay";
+ case CEPH_MDS_STATE_REPLAYONCE: return "up:oneshot-replay";
case CEPH_MDS_STATE_CREATING: return "up:creating";
case CEPH_MDS_STATE_STARTING: return "up:starting";
/* up and in */
@@ -50,10 +51,13 @@ const char *ceph_mds_op_name(int op)
case CEPH_MDS_OP_LOOKUP: return "lookup";
case CEPH_MDS_OP_LOOKUPHASH: return "lookuphash";
case CEPH_MDS_OP_LOOKUPPARENT: return "lookupparent";
+ case CEPH_MDS_OP_LOOKUPINO: return "lookupino";
case CEPH_MDS_OP_GETATTR: return "getattr";
case CEPH_MDS_OP_SETXATTR: return "setxattr";
case CEPH_MDS_OP_SETATTR: return "setattr";
case CEPH_MDS_OP_RMXATTR: return "rmxattr";
+ case CEPH_MDS_OP_SETLAYOUT: return "setlayou";
+ case CEPH_MDS_OP_SETDIRLAYOUT: return "setdirlayout";
case CEPH_MDS_OP_READDIR: return "readdir";
case CEPH_MDS_OP_MKNOD: return "mknod";
case CEPH_MDS_OP_LINK: return "link";
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/3] libceph: update ceph_fs.h and related code
2013-02-16 17:05 [PATCH 0/3] libceph: update ceph_fs.h and related code Alex Elder
2013-02-16 17:06 ` [PATCH 1/2] libceph: update ceph_fs.h Alex Elder
2013-02-16 17:06 ` [PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name() Alex Elder
@ 2013-02-16 23:58 ` Josh Durgin
2 siblings, 0 replies; 4+ messages in thread
From: Josh Durgin @ 2013-02-16 23:58 UTC (permalink / raw)
To: Alex Elder; +Cc: ceph-devel
On 02/16/2013 09:05 AM, Alex Elder wrote:
> This series updates "include/linux/ceph/ceph_fs.h" to nearly match
> its user space counterpart in "src/include/ceph_fs.h".
>
> There are still a few things that should be reconciled by updating
> that user space code; that work is covered by:
> http://tracker.ceph.com/issues/4168
>
> -Alex
>
> [PATCH 1/2] libceph: update ceph_fs.h
> [PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name()
These look good.
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-16 23:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-16 17:05 [PATCH 0/3] libceph: update ceph_fs.h and related code Alex Elder
2013-02-16 17:06 ` [PATCH 1/2] libceph: update ceph_fs.h Alex Elder
2013-02-16 17:06 ` [PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name() Alex Elder
2013-02-16 23:58 ` [PATCH 0/3] libceph: update ceph_fs.h and related code Josh Durgin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.