aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-22 14:30:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-22 14:30:10 -0400
commit1204c464458e9837320a326a9fce550e3c5ef5de (patch)
treef0e19354d7d0d5553a0e0e6f7fd7c7e2f8465696 /include/linux
parent4f2112351b4ac964b0249bdd883f7b79601f39d8 (diff)
parentf77303bddabf73ebccb60f613b77da391f933cf6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph updates from Sage Weil: "This time around we have a collection of CephFS fixes from Zheng around MDS failure handling and snapshots, support for a new CRUSH straw2 algorithm (to sync up with userspace) and several RBD cleanups and fixes from Ilya, an error path leak fix from Taesoo, and then an assorted collection of cleanups from others" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (28 commits) rbd: rbd_wq comment is obsolete libceph: announce support for straw2 buckets crush: straw2 bucket type with an efficient 64-bit crush_ln() crush: ensuring at most num-rep osds are selected crush: drop unnecessary include from mapper.c ceph: fix uninline data function ceph: rename snapshot support ceph: fix null pointer dereference in send_mds_reconnect() ceph: hold on to exclusive caps on complete directories libceph: simplify our debugfs attr macro ceph: show non-default options only libceph: expose client options through debugfs libceph, ceph: split ceph_show_options() rbd: mark block queue as non-rotational libceph: don't overwrite specific con error msgs ceph: cleanup unsafe requests when reconnecting is denied ceph: don't zero i_wrbuffer_ref when reconnecting is denied ceph: don't mark dirty caps when there is no auth cap ceph: keep i_snap_realm while there are writers libceph: osdmap.h: Add missing format newlines ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/ceph_features.h16
-rw-r--r--include/linux/ceph/ceph_fs.h1
-rw-r--r--include/linux/ceph/debugfs.h8
-rw-r--r--include/linux/ceph/libceph.h2
-rw-r--r--include/linux/ceph/osdmap.h5
-rw-r--r--include/linux/crush/crush.h12
6 files changed, 31 insertions, 13 deletions
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 71e05bbf8ceb..4763ad64e832 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -50,6 +50,19 @@
50#define CEPH_FEATURE_MDS_INLINE_DATA (1ULL<<40) 50#define CEPH_FEATURE_MDS_INLINE_DATA (1ULL<<40)
51#define CEPH_FEATURE_CRUSH_TUNABLES3 (1ULL<<41) 51#define CEPH_FEATURE_CRUSH_TUNABLES3 (1ULL<<41)
52#define CEPH_FEATURE_OSD_PRIMARY_AFFINITY (1ULL<<41) /* overlap w/ tunables3 */ 52#define CEPH_FEATURE_OSD_PRIMARY_AFFINITY (1ULL<<41) /* overlap w/ tunables3 */
53#define CEPH_FEATURE_MSGR_KEEPALIVE2 (1ULL<<42)
54#define CEPH_FEATURE_OSD_POOLRESEND (1ULL<<43)
55#define CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 (1ULL<<44)
56#define CEPH_FEATURE_OSD_SET_ALLOC_HINT (1ULL<<45)
57#define CEPH_FEATURE_OSD_FADVISE_FLAGS (1ULL<<46)
58#define CEPH_FEATURE_OSD_REPOP (1ULL<<46) /* overlap with fadvise */
59#define CEPH_FEATURE_OSD_OBJECT_DIGEST (1ULL<<46) /* overlap with fadvise */
60#define CEPH_FEATURE_OSD_TRANSACTION_MAY_LAYOUT (1ULL<<46) /* overlap w/ fadvise */
61#define CEPH_FEATURE_MDS_QUOTA (1ULL<<47)
62#define CEPH_FEATURE_CRUSH_V4 (1ULL<<48) /* straw2 buckets */
63#define CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY (1ULL<<49)
64// duplicated since it was introduced at the same time as MIN_SIZE_RECOVERY
65#define CEPH_FEATURE_OSD_PROXY_FEATURES (1ULL<<49) /* overlap w/ above */
53 66
54/* 67/*
55 * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature 68 * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature
@@ -93,7 +106,8 @@ static inline u64 ceph_sanitize_features(u64 features)
93 CEPH_FEATURE_EXPORT_PEER | \ 106 CEPH_FEATURE_EXPORT_PEER | \
94 CEPH_FEATURE_OSDMAP_ENC | \ 107 CEPH_FEATURE_OSDMAP_ENC | \
95 CEPH_FEATURE_CRUSH_TUNABLES3 | \ 108 CEPH_FEATURE_CRUSH_TUNABLES3 | \
96 CEPH_FEATURE_OSD_PRIMARY_AFFINITY) 109 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
110 CEPH_FEATURE_CRUSH_V4)
97 111
98#define CEPH_FEATURES_REQUIRED_DEFAULT \ 112#define CEPH_FEATURES_REQUIRED_DEFAULT \
99 (CEPH_FEATURE_NOSRCADDR | \ 113 (CEPH_FEATURE_NOSRCADDR | \
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index 31eb03d0c766..d7d072a25c27 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -323,6 +323,7 @@ enum {
323 CEPH_MDS_OP_MKSNAP = 0x01400, 323 CEPH_MDS_OP_MKSNAP = 0x01400,
324 CEPH_MDS_OP_RMSNAP = 0x01401, 324 CEPH_MDS_OP_RMSNAP = 0x01401,
325 CEPH_MDS_OP_LSSNAP = 0x00402, 325 CEPH_MDS_OP_LSSNAP = 0x00402,
326 CEPH_MDS_OP_RENAMESNAP = 0x01403,
326}; 327};
327 328
328extern const char *ceph_mds_op_name(int op); 329extern const char *ceph_mds_op_name(int op);
diff --git a/include/linux/ceph/debugfs.h b/include/linux/ceph/debugfs.h
index 1df086d7882d..29cf897cc5cd 100644
--- a/include/linux/ceph/debugfs.h
+++ b/include/linux/ceph/debugfs.h
@@ -7,13 +7,7 @@
7#define CEPH_DEFINE_SHOW_FUNC(name) \ 7#define CEPH_DEFINE_SHOW_FUNC(name) \
8static int name##_open(struct inode *inode, struct file *file) \ 8static int name##_open(struct inode *inode, struct file *file) \
9{ \ 9{ \
10 struct seq_file *sf; \ 10 return single_open(file, name, inode->i_private); \
11 int ret; \
12 \
13 ret = single_open(file, name, NULL); \
14 sf = file->private_data; \
15 sf->private = inode->i_private; \
16 return ret; \
17} \ 11} \
18 \ 12 \
19static const struct file_operations name##_fops = { \ 13static const struct file_operations name##_fops = { \
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 16fff9608848..30f92cefaa72 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -135,6 +135,7 @@ struct ceph_client {
135 struct dentry *debugfs_dir; 135 struct dentry *debugfs_dir;
136 struct dentry *debugfs_monmap; 136 struct dentry *debugfs_monmap;
137 struct dentry *debugfs_osdmap; 137 struct dentry *debugfs_osdmap;
138 struct dentry *debugfs_options;
138#endif 139#endif
139}; 140};
140 141
@@ -191,6 +192,7 @@ extern struct ceph_options *ceph_parse_options(char *options,
191 const char *dev_name, const char *dev_name_end, 192 const char *dev_name, const char *dev_name_end,
192 int (*parse_extra_token)(char *c, void *private), 193 int (*parse_extra_token)(char *c, void *private),
193 void *private); 194 void *private);
195int ceph_print_client_options(struct seq_file *m, struct ceph_client *client);
194extern void ceph_destroy_options(struct ceph_options *opt); 196extern void ceph_destroy_options(struct ceph_options *opt);
195extern int ceph_compare_options(struct ceph_options *new_opt, 197extern int ceph_compare_options(struct ceph_options *new_opt,
196 struct ceph_client *client); 198 struct ceph_client *client);
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 561ea896c657..e55c08bc3a96 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -175,13 +175,12 @@ static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid)
175 __u8 version; 175 __u8 version;
176 176
177 if (!ceph_has_room(p, end, 1 + 8 + 4 + 4)) { 177 if (!ceph_has_room(p, end, 1 + 8 + 4 + 4)) {
178 pr_warning("incomplete pg encoding"); 178 pr_warn("incomplete pg encoding\n");
179
180 return -EINVAL; 179 return -EINVAL;
181 } 180 }
182 version = ceph_decode_8(p); 181 version = ceph_decode_8(p);
183 if (version > 1) { 182 if (version > 1) {
184 pr_warning("do not understand pg encoding %d > 1", 183 pr_warn("do not understand pg encoding %d > 1\n",
185 (int)version); 184 (int)version);
186 return -EINVAL; 185 return -EINVAL;
187 } 186 }
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 4fad5f8ee01d..48a1a7d100f1 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -96,13 +96,15 @@ struct crush_rule {
96 * uniform O(1) poor poor 96 * uniform O(1) poor poor
97 * list O(n) optimal poor 97 * list O(n) optimal poor
98 * tree O(log n) good good 98 * tree O(log n) good good
99 * straw O(n) optimal optimal 99 * straw O(n) better better
100 * straw2 O(n) optimal optimal
100 */ 101 */
101enum { 102enum {
102 CRUSH_BUCKET_UNIFORM = 1, 103 CRUSH_BUCKET_UNIFORM = 1,
103 CRUSH_BUCKET_LIST = 2, 104 CRUSH_BUCKET_LIST = 2,
104 CRUSH_BUCKET_TREE = 3, 105 CRUSH_BUCKET_TREE = 3,
105 CRUSH_BUCKET_STRAW = 4 106 CRUSH_BUCKET_STRAW = 4,
107 CRUSH_BUCKET_STRAW2 = 5,
106}; 108};
107extern const char *crush_bucket_alg_name(int alg); 109extern const char *crush_bucket_alg_name(int alg);
108 110
@@ -149,6 +151,11 @@ struct crush_bucket_straw {
149 __u32 *straws; /* 16-bit fixed point */ 151 __u32 *straws; /* 16-bit fixed point */
150}; 152};
151 153
154struct crush_bucket_straw2 {
155 struct crush_bucket h;
156 __u32 *item_weights; /* 16-bit fixed point */
157};
158
152 159
153 160
154/* 161/*
@@ -189,6 +196,7 @@ extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b);
189extern void crush_destroy_bucket_list(struct crush_bucket_list *b); 196extern void crush_destroy_bucket_list(struct crush_bucket_list *b);
190extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b); 197extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b);
191extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b); 198extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b);
199extern void crush_destroy_bucket_straw2(struct crush_bucket_straw2 *b);
192extern void crush_destroy_bucket(struct crush_bucket *b); 200extern void crush_destroy_bucket(struct crush_bucket *b);
193extern void crush_destroy_rule(struct crush_rule *r); 201extern void crush_destroy_rule(struct crush_rule *r);
194extern void crush_destroy(struct crush_map *map); 202extern void crush_destroy(struct crush_map *map);