aboutsummaryrefslogtreecommitdiff
blob: b3ff994d164cf3145306a889dba6b4e826b33189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
From cd81037fa6ecc7f6b36d3c49205a3d6f3e7aa0de Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Tue, 21 Jan 2014 12:06:59 -0500
Subject: [PATCH 11/13] LU-3319 lprocfs: client side cleanups

Now that all the client side seq_file patches it is
time to handle the issue that people pointed out but
were not severe enough to prevent landing. This patch
addresses all the concerns as well and move all struct
lprocfs_seq_var to be initialized C99 style.

Change-Id: I89e8b719bd067ecf4e3cab481a2d4c62d5052af0
Signed-off-by: James Simmons <uja.ornl@gmail.com>
---
 lustre/fid/lproc_fid.c           | 21 ++++++---
 lustre/lmv/lproc_lmv.c           | 15 ++++---
 lustre/lov/lproc_lov.c           | 42 ++++++++++++------
 lustre/mdc/lproc_mdc.c           | 52 ++++++++++++++--------
 lustre/mgc/lproc_mgc.c           | 25 +++++++----
 lustre/obdclass/lprocfs_status.c |  1 -
 lustre/obdecho/echo.c            |  3 +-
 lustre/osc/lproc_osc.c           | 94 +++++++++++++++++++++++++++-------------
 lustre/osc/osc_request.c         |  2 +-
 lustre/ost/ost_handler.c         |  3 +-
 lustre/ptlrpc/lproc_ptlrpc.c     |  2 +-
 lustre/quota/qmt_pool.c          |  3 +-
 lustre/quota/qsd_lib.c           | 12 +++--
 13 files changed, 183 insertions(+), 92 deletions(-)

diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c
index d89c4f6..3b9d170 100644
--- a/lustre/fid/lproc_fid.c
+++ b/lustre/fid/lproc_fid.c
@@ -203,9 +203,12 @@ LPROC_SEQ_FOPS(lprocfs_server_fid_width);
 LPROC_SEQ_FOPS_RO(lprocfs_server_fid_server);
 
 struct lprocfs_seq_vars seq_server_proc_list[] = {
-	{ "space",      &lprocfs_server_fid_space_fops },
-	{ "width",      &lprocfs_server_fid_width_fops },
-	{ "server",     &lprocfs_server_fid_server_fops },
+	{ .name	=	"space",
+	  .fops	=	&lprocfs_server_fid_space_fops	},
+	{ .name	=	"width",
+	  .fops	=	&lprocfs_server_fid_width_fops	},
+	{ .name	=	"server",
+	  .fops	=	&lprocfs_server_fid_server_fops	},
 	{ NULL }
 };
 
@@ -623,10 +626,14 @@ LPROC_SEQ_FOPS_RO(lprocfs_client_fid_server);
 LPROC_SEQ_FOPS_RO(lprocfs_client_fid_fid);
 
 struct lprocfs_seq_vars seq_client_proc_list[] = {
-	{ "space",	&lprocfs_client_fid_space_fops },
-	{ "width",	&lprocfs_client_fid_width_fops },
-	{ "server",	&lprocfs_client_fid_server_fops },
-	{ "fid",	&lprocfs_client_fid_fid_fops },
+	{ .name	=	"space",
+	  .fops	=	&lprocfs_client_fid_space_fops	},
+	{ .name	=	"width",
+	  .fops	=	&lprocfs_client_fid_width_fops	},
+	{ .name	=	"server",
+	  .fops	=	&lprocfs_client_fid_server_fops	},
+	{ .name	=	"fid",
+	  .fops	=	&lprocfs_client_fid_fid_fops	},
 	{ NULL }
 };
 #endif
diff --git a/lustre/lmv/lproc_lmv.c b/lustre/lmv/lproc_lmv.c
index eea5927..5a7271a 100644
--- a/lustre/lmv/lproc_lmv.c
+++ b/lustre/lmv/lproc_lmv.c
@@ -203,11 +203,16 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file)
 LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid);
 
 struct lprocfs_seq_vars lprocfs_lmv_obd_vars[] = {
-	{ "numobd",	&lmv_numobd_fops	},
-	{ "placement",	&lmv_placement_fops	},
-	{ "activeobd",	&lmv_activeobd_fops	},
-	{ "uuid",	&lmv_uuid_fops		},
-	{ "desc_uuid",	&lmv_desc_uuid_fops	},
+	{ .name	=	"numobd",
+	  .fops	=	&lmv_numobd_fops	},
+	{ .name	=	"placement",
+	  .fops	=	&lmv_placement_fops	},
+	{ .name	=	"activeobd",
+	  .fops	=	&lmv_activeobd_fops	},
+	{ .name	=	"uuid",
+	  .fops	=	&lmv_uuid_fops		},
+	{ .name	=	"desc_uuid",
+	  .fops	=	&lmv_desc_uuid_fops	},
 	{ 0 }
 };
 
diff --git a/lustre/lov/lproc_lov.c b/lustre/lov/lproc_lov.c
index e400faf..7786513 100644
--- a/lustre/lov/lproc_lov.c
+++ b/lustre/lov/lproc_lov.c
@@ -263,20 +263,34 @@ LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesfree);
 LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail);
 
 struct lprocfs_seq_vars lprocfs_lov_obd_vars[] = {
-	{ "uuid",		&lov_uuid_fops		},
-	{ "stripesize",		&lov_stripesize_fops	},
-	{ "stripeoffset",	&lov_stripeoffset_fops	},
-	{ "stripecount",	&lov_stripecount_fops	},
-	{ "stripetype",		&lov_stripetype_fops	},
-	{ "numobd",		&lov_numobd_fops	},
-	{ "activeobd",		&lov_activeobd_fops	},
-	{ "filestotal",		&lov_filestotal_fops	},
-	{ "filesfree",		&lov_filesfree_fops	},
-	{ "blocksize",		&lov_blksize_fops	},
-	{ "kbytestotal",	&lov_kbytestotal_fops	},
-	{ "kbytesfree",		&lov_kbytesfree_fops	},
-	{ "kbytesavail",	&lov_kbytesavail_fops	},
-	{ "desc_uuid",		&lov_desc_uuid_fops	},
+	{ .name	=	"uuid",
+	  .fops	=	&lov_uuid_fops		},
+	{ .name	=	"stripesize",
+	  .fops	=	&lov_stripesize_fops	},
+	{ .name	=	"stripeoffset",
+	  .fops	=	&lov_stripeoffset_fops	},
+	{ .name	=	"stripecount",
+	  .fops	=	&lov_stripecount_fops	},
+	{ .name	=	"stripetype",
+	  .fops	=	&lov_stripetype_fops	},
+	{ .name	=	"numobd",
+	  .fops	=	&lov_numobd_fops	},
+	{ .name	=	"activeobd",
+	  .fops	=	&lov_activeobd_fops	},
+	{ .name	=	"filestotal",
+	  .fops	=	&lov_filestotal_fops	},
+	{ .name	=	"filesfree",
+	  .fops	=	&lov_filesfree_fops	},
+	{ .name	=	"blocksize",
+	  .fops	=	&lov_blksize_fops	},
+	{ .name	=	"kbytestotal",
+	  .fops	=	&lov_kbytestotal_fops	},
+	{ .name	=	"kbytesfree",
+	  .fops	=	&lov_kbytesfree_fops	},
+	{ .name	=	"kbytesavail",
+	  .fops	=	&lov_kbytesavail_fops	},
+	{ .name	=	"desc_uuid",
+	  .fops	=	&lov_desc_uuid_fops	},
 	{ 0 }
 };
 
diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c
index cba4f61..69e377f 100644
--- a/lustre/mdc/lproc_mdc.c
+++ b/lustre/mdc/lproc_mdc.c
@@ -103,29 +103,47 @@ LPROC_SEQ_FOPS_RW_TYPE(mdc, import);
 LPROC_SEQ_FOPS_RW_TYPE(mdc, pinger_recov);
 
 struct lprocfs_seq_vars lprocfs_mdc_obd_vars[] = {
-	{ "uuid",		&mdc_uuid_fops,		0,	0 },
-	{ "ping",		&mdc_ping_fops,		0,	0222 },
-	{ "connect_flags",	&mdc_connect_flags_fops,0,	0 },
-	{ "blocksize",		&mdc_blksize_fops,	0,	0 },
-	{ "kbytestotal",	&mdc_kbytestotal_fops,	0,	0 },
-	{ "kbytesfree",		&mdc_kbytesfree_fops,	0,	0 },
-	{ "kbytesavail",	&mdc_kbytesavail_fops,	0,	0 },
-	{ "filestotal",		&mdc_filestotal_fops,	0,	0 },
-	{ "filesfree",		&mdc_filesfree_fops,	0,	0 },
-	{ "mds_server_uuid",	&mdc_server_uuid_fops,	0,	0 },
-	{ "mds_conn_uuid",	&mdc_conn_uuid_fops,	0,	0 },
+	{ .name	=	"uuid",
+	  .fops	=	&mdc_uuid_fops		},
+	{ .name	=	"ping",
+	  .fops	=	&mdc_ping_fops,
+	  .proc_mode =	0222			},
+	{ .name	=	"connect_flags",
+	  .fops	=	&mdc_connect_flags_fops	},
+	{ .name	=	"blocksize",
+	  .fops	=	&mdc_blksize_fops	},
+	{ .name	=	"kbytestotal",
+	  .fops	=	&mdc_kbytestotal_fops	},
+	{ .name	=	"kbytesfree",
+	  .fops	=	&mdc_kbytesfree_fops	},
+	{ .name	=	"kbytesavail",
+	  .fops	=	&mdc_kbytesavail_fops	},
+	{ .name	=	"filestotal",
+	  .fops	=	&mdc_filestotal_fops	},
+	{ .name	=	"filesfree",
+	  .fops	=	&mdc_filesfree_fops	},
+	{ .name	=	"mds_server_uuid",
+	  .fops	=	&mdc_server_uuid_fops	},
+	{ .name	=	"mds_conn_uuid",
+	  .fops	=	&mdc_conn_uuid_fops	},
 	/*
 	 * FIXME: below proc entry is provided, but not in used, instead
 	 * sbi->sb_md_brw_size is used, the per obd variable should be used
 	 * when CMD is enabled, and dir pages are managed in MDC layer.
 	 * Remember to enable proc write function.
 	 */
-	{ "max_pages_per_rpc",	&mdc_obd_max_pages_per_rpc_fops	},
-	{ "max_rpcs_in_flight",	&mdc_max_rpcs_in_flight_fops	},
-	{ "timeouts",		&mdc_timeouts_fops		},
-	{ "import",		&mdc_import_fops		},
-	{ "state",		&mdc_state_fops			},
-	{ "pinger_recov",	&mdc_pinger_recov_fops		},
+	{ .name	=	"max_pages_per_rpc",
+	  .fops	=	&mdc_obd_max_pages_per_rpc_fops	},
+	{ .name	=	"max_rpcs_in_flight",
+	  .fops	=	&mdc_max_rpcs_in_flight_fops	},
+	{ .name	=	"timeouts",
+	  .fops	=	&mdc_timeouts_fops		},
+	{ .name	=	"import",
+	  .fops	=	&mdc_import_fops		},
+	{ .name	=	"state",
+	  .fops	=	&mdc_state_fops			},
+	{ .name	=	"pinger_recov",
+	  .fops	=	&mdc_pinger_recov_fops		},
 	{ 0 }
 };
 #endif /* LPROCFS */
diff --git a/lustre/mgc/lproc_mgc.c b/lustre/mgc/lproc_mgc.c
index 648b6e5..f818def 100644
--- a/lustre/mgc/lproc_mgc.c
+++ b/lustre/mgc/lproc_mgc.c
@@ -59,14 +59,23 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v)
 LPROC_SEQ_FOPS_RO(mgc_ir_state);
 
 struct lprocfs_seq_vars lprocfs_mgc_obd_vars[] = {
-	{ "uuid",		&mgc_uuid_fops,		0,	0 },
-	{ "ping",		&mgc_ping_fops,		0,	0222 },
-	{ "connect_flags",	&mgc_connect_flags_fops,0,	0 },
-	{ "mgs_server_uuid",	&mgc_server_uuid_fops,	0,	0 },
-	{ "mgs_conn_uuid",	&mgc_conn_uuid_fops,	0,	0 },
-	{ "import",		&mgc_import_fops,	0,	0 },
-	{ "state",		&mgc_state_fops,	0,	0 },
-	{ "ir_state",		&mgc_ir_state_fops,	0,	0 },
+	{ .name	=	"uuid",
+	  .fops	=	&mgc_uuid_fops		},
+	{ .name	=	"ping",
+	  .fops	=	&mgc_ping_fops,
+	  .proc_mode =	0222			},
+	{ .name	=	"connect_flags",
+	  .fops	=	&mgc_connect_flags_fops	},
+	{ .name	=	"mgs_server_uuid",
+	  .fops	=	&mgc_server_uuid_fops	},
+	{ .name	=	"mgs_conn_uuid",
+	  .fops	=	&mgc_conn_uuid_fops	},
+	{ .name	=	"import",
+	  .fops	=	&mgc_import_fops	},
+	{ .name	=	"state",
+	  .fops	=	&mgc_state_fops		},
+	{ .name	=	"ir_state",
+	  .fops	=	&mgc_ir_state_fops	},
 	{ 0 }
 };
 #endif /* LPROCFS */
diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c
index f9cb944..abe5d71 100644
--- a/lustre/obdclass/lprocfs_status.c
+++ b/lustre/obdclass/lprocfs_status.c
@@ -2581,7 +2581,6 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats)
 EXPORT_SYMBOL(lprocfs_init_ldlm_stats);
 
 #ifdef HAVE_SERVER_SUPPORT
-/* No one appears to be using this ?? */
 int lprocfs_exp_nid_seq_show(struct seq_file *m, void *data)
 {
 	struct obd_export *exp = m->private;
diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c
index 6d63aff..8563e68 100644
--- a/lustre/obdecho/echo.c
+++ b/lustre/obdecho/echo.c
@@ -561,7 +561,8 @@ commitrw_cleanup:
 
 LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
 static struct lprocfs_seq_vars lprocfs_echo_obd_vars[] = {
-	{ "uuid",	&echo_uuid_fops		},
+	{ .name	=	"uuid",
+	  .fops	=	&echo_uuid_fops		},
 	{ 0 }
 };
 
diff --git a/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c
index d6e3703..ccfc212 100644
--- a/lustre/osc/lproc_osc.c
+++ b/lustre/osc/lproc_osc.c
@@ -543,37 +543,69 @@ LPROC_SEQ_FOPS_RW_TYPE(osc, import);
 LPROC_SEQ_FOPS_RW_TYPE(osc, pinger_recov);
 
 struct lprocfs_seq_vars lprocfs_osc_obd_vars[] = {
-	{ "uuid",		&osc_uuid_fops			},
-	{ "ping",		&osc_ping_fops,		0, 0222	},
-	{ "connect_flags",	&osc_connect_flags_fops		},
-	{ "blocksize",		&osc_blksize_fops		},
-	{ "kbytestotal",	&osc_kbytestotal_fops		},
-	{ "kbytesfree",		&osc_kbytesfree_fops		},
-	{ "kbytesavail",	&osc_kbytesavail_fops		},
-	{ "filestotal",		&osc_filestotal_fops		},
-	{ "filesfree",		&osc_filesfree_fops		},
-	{ "ost_server_uuid",	&osc_server_uuid_fops		},
-	{ "ost_conn_uuid",	&osc_conn_uuid_fops		},
-	{ "active",		&osc_active_fops		},
-	{ "max_pages_per_rpc",	&osc_obd_max_pages_per_rpc_fops	},
-	{ "max_rpcs_in_flight",	&osc_max_rpcs_in_flight_fops	},
-	{ "destroys_in_flight",	&osc_destroys_in_flight_fops	},
-	{ "max_dirty_mb",	&osc_max_dirty_mb_fops		},
-	{ "osc_cached_mb",	&osc_cached_mb_fops		},
-	{ "cur_dirty_bytes",	&osc_cur_dirty_bytes_fops	},
-	{ "cur_grant_bytes",	&osc_cur_grant_bytes_fops	},
-	{ "cur_lost_grant_bytes",	&osc_cur_lost_grant_bytes_fops	},
-	{ "grant_shrink_interval",	&osc_grant_shrink_interval_fops	},
-	{ "checksums",		&osc_checksum_fops		},
-	{ "checksum_type",	&osc_checksum_type_fops		},
-	{ "resend_count",	&osc_resend_count_fops		},
-	{ "timeouts",		&osc_timeouts_fops		},
-	{ "contention_seconds",	&osc_contention_seconds_fops	},
-	{ "lockless_truncate",	&osc_lockless_truncate_fops	},
-	{ "import",		&osc_import_fops		},
-	{ "state",		&osc_state_fops			},
-	{ "pinger_recov",	&osc_pinger_recov_fops		},
-	{ "unstable_stats",	&osc_unstable_stats_fops	},
+	{ .name	=	"uuid",
+	  .fops	=	&osc_uuid_fops			},
+	{ .name	=	"ping",
+	  .fops	=	&osc_ping_fops,
+	  .proc_mode =	0222				},
+	{ .name	=	"connect_flags",
+	  .fops	=	&osc_connect_flags_fops		},
+	{ .name	=	"blocksize",
+	  .fops	=	&osc_blksize_fops		},
+	{ .name	=	"kbytestotal",
+	  .fops	=	&osc_kbytestotal_fops		},
+	{ .name	=	"kbytesfree",
+	  .fops	=	&osc_kbytesfree_fops		},
+	{ .name	=	"kbytesavail",
+	  .fops	=	&osc_kbytesavail_fops		},
+	{ .name	=	"filestotal",
+	  .fops	=	&osc_filestotal_fops		},
+	{ .name	=	"filesfree",
+	  .fops	=	&osc_filesfree_fops		},
+	{ .name	=	"ost_server_uuid",
+	  .fops	=	&osc_server_uuid_fops		},
+	{ .name	=	"ost_conn_uuid",
+	  .fops	=	&osc_conn_uuid_fops		},
+	{ .name	=	"active",
+	  .fops	=	&osc_active_fops		},
+	{ .name	=	"max_pages_per_rpc",
+	  .fops	=	&osc_obd_max_pages_per_rpc_fops	},
+	{ .name	=	"max_rpcs_in_flight",
+	  .fops	=	&osc_max_rpcs_in_flight_fops	},
+	{ .name	=	"destroys_in_flight",
+	  .fops	=	&osc_destroys_in_flight_fops	},
+	{ .name	=	"max_dirty_mb",
+	  .fops	=	&osc_max_dirty_mb_fops		},
+	{ .name	=	"osc_cached_mb",
+	  .fops	=	&osc_cached_mb_fops		},
+	{ .name	=	"cur_dirty_bytes",
+	  .fops	=	&osc_cur_dirty_bytes_fops	},
+	{ .name	=	"cur_grant_bytes",
+	  .fops	=	&osc_cur_grant_bytes_fops	},
+	{ .name	=	"cur_lost_grant_bytes",
+	  .fops	=	&osc_cur_lost_grant_bytes_fops	},
+	{ .name	=	"grant_shrink_interval",
+	  .fops	=	&osc_grant_shrink_interval_fops	},
+	{ .name	=	"checksums",
+	  .fops	=	&osc_checksum_fops		},
+	{ .name	=	"checksum_type",
+	  .fops	=	&osc_checksum_type_fops		},
+	{ .name	=	"resend_count",
+	  .fops	=	&osc_resend_count_fops		},
+	{ .name	=	"timeouts",
+	  .fops	=	&osc_timeouts_fops		},
+	{ .name	=	"contention_seconds",
+	  .fops	=	&osc_contention_seconds_fops	},
+	{ .name	=	"lockless_truncate",
+	  .fops	=	&osc_lockless_truncate_fops	},
+	{ .name	=	"import",
+	  .fops	=	&osc_import_fops		},
+	{ .name	=	"state",
+	  .fops	=	&osc_state_fops			},
+	{ .name	=	"pinger_recov",
+	  .fops	=	&osc_pinger_recov_fops		},
+	{ .name	=	"unstable_stats",
+	  .fops	=	&osc_unstable_stats_fops	},
 	{ 0 }
 };
 
diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c
index b9d1b71..f95fb55 100644
--- a/lustre/osc/osc_request.c
+++ b/lustre/osc/osc_request.c
@@ -3669,7 +3669,7 @@ int osc_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
 	int rc = class_process_proc_seq_param(PARAM_OSC, obd->obd_vars,
 					      lcfg, obd);
-	return(rc > 0 ? 0: rc);
+	return rc > 0 ? 0: rc;
 }
 
 static int osc_process_config(struct obd_device *obd, obd_count len, void *buf)
diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c
index d4da00d..d20a30f 100644
--- a/lustre/ost/ost_handler.c
+++ b/lustre/ost/ost_handler.c
@@ -75,7 +75,8 @@ static struct cfs_cpt_table	*ost_io_cptable;
 LPROC_SEQ_FOPS_RO_TYPE(ost, uuid);
 
 static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
-	{ "uuid",	&ost_uuid_fops	},
+	{ .name	=	"uuid",
+	  .fops	=	&ost_uuid_fops	},
 	{ 0 }
 };
 #endif /* LPROCFS */
diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c
index 8e5a397..bf21958 100644
--- a/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/lustre/ptlrpc/lproc_ptlrpc.c
@@ -1382,7 +1382,7 @@ lprocfs_import_seq_write(struct file *file, const char *buffer, size_t count,
 
 		*ptr = 0;
 		do_reconn = 0;
-		ptr += strlen("::");
+		ptr += 2; /* Skip :: */
 		inst = simple_strtol(ptr, &endptr, 10);
 		if (*endptr) {
 			CERROR("config: wrong instance # %s\n", ptr);
diff --git a/lustre/quota/qmt_pool.c b/lustre/quota/qmt_pool.c
index afd450c..df6d6fc 100644
--- a/lustre/quota/qmt_pool.c
+++ b/lustre/quota/qmt_pool.c
@@ -171,7 +171,8 @@ static int qpi_state_seq_show(struct seq_file *m, void *data)
 LPROC_SEQ_FOPS_RO(qpi_state);
 
 static struct lprocfs_seq_vars lprocfs_quota_qpi_vars[] = {
-	{ "info",	&qpi_state_fops	},
+	{ .name	=	"info",
+	  .fops	=	&qpi_state_fops	},
 	{ NULL }
 };
 
diff --git a/lustre/quota/qsd_lib.c b/lustre/quota/qsd_lib.c
index 990cfee..573473c 100644
--- a/lustre/quota/qsd_lib.c
+++ b/lustre/quota/qsd_lib.c
@@ -208,10 +208,14 @@ qsd_timeout_seq_write(struct file *file, const char *buffer,
 LPROC_SEQ_FOPS(qsd_timeout);
 
 static struct lprocfs_seq_vars lprocfs_quota_qsd_vars[] = {
-	{ "info",		&qsd_state_fops		},
-	{ "enabled",		&qsd_enabled_fops	},
-	{ "force_reint",	&qsd_force_reint_fops	},
-	{ "timeout",		&qsd_timeout_fops	},
+	{ .name	=	"info",
+	  .fops	=	&qsd_state_fops		},
+	{ .name	=	"enabled",
+	  .fops	=	&qsd_enabled_fops	},
+	{ .name	=	"force_reint",
+	  .fops	=	&qsd_force_reint_fops	},
+	{ .name	=	"timeout",
+	  .fops	=	&qsd_timeout_fops	},
 	{ NULL }
 };
 
-- 
1.8.5.3