Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/lustre/, sys-cluster/lustre/files/
Date: Tue, 20 May 2014 13:44:33
Message-Id: 1400593437.74d0e393903bacf89db7bf392cddcd629bec24d1.alexxy@gentoo
1 commit: 74d0e393903bacf89db7bf392cddcd629bec24d1
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 20 13:43:57 2014 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Tue May 20 13:43:57 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=74d0e393
7
8 Some more fixes
9
10 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
11
12 ---
13 ...cfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch | 2 +-
14 ...cfs-update-zfs-proc-handling-to-seq_files.patch | 2 +-
15 ...rocfs-move-osp-proc-handling-to-seq_files.patch | 2 +-
16 ...procfs-symlinks-for-forward-compatibility.patch | 199 ---------------------
17 ...fs-move-mdd-ofd-proc-handling-to-seq_fil.patch} | 21 ++-
18 ...-Backport-shrinker-changes-from-upstream.patch} | 4 +-
19 sys-cluster/lustre/lustre-9999.ebuild | 5 +-
20 7 files changed, 17 insertions(+), 218 deletions(-)
21
22 diff --git a/sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch b/sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch
23 index 1b625a8..326e02b 100644
24 --- a/sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch
25 +++ b/sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch
26 @@ -1,7 +1,7 @@
27 From d6775461847a80d82de476b78fc2322702c516af Mon Sep 17 00:00:00 2001
28 From: James Simmons <uja.ornl@×××××.com>
29 Date: Tue, 25 Feb 2014 12:54:05 -0500
30 -Subject: [PATCH 1/6] LU-3319 procfs: Move NRS TBF proc handling to seq_files
31 +Subject: [PATCH 1/5] LU-3319 procfs: Move NRS TBF proc handling to seq_files
32
33 With newer kernels moving their proc file system handling
34 to seq_files this patch migrates the proc handling for NRS
35
36 diff --git a/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
37 index a44d310..bcaa434 100644
38 --- a/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
39 +++ b/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
40 @@ -1,7 +1,7 @@
41 From c16260bdb1cd63a50d37f2161279fc71b9e03efb Mon Sep 17 00:00:00 2001
42 From: James Simmons <uja.ornl@×××××.com>
43 Date: Wed, 23 Apr 2014 09:31:09 -0400
44 -Subject: [PATCH 2/6] LU-3319 procfs: update zfs proc handling to seq_files
45 +Subject: [PATCH 2/5] LU-3319 procfs: update zfs proc handling to seq_files
46
47 Migrate all zfs proc handling to using strictly seq_files.
48
49
50 diff --git a/sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
51 index 5361aca..969c229 100644
52 --- a/sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
53 +++ b/sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
54 @@ -1,7 +1,7 @@
55 From 63f3f2e29c2745b3491712a4a3f7a868ec6ece8d Mon Sep 17 00:00:00 2001
56 From: James Simmons <uja.ornl@×××××.com>
57 Date: Thu, 24 Apr 2014 12:04:57 -0400
58 -Subject: [PATCH 3/6] LU-3319 procfs: move osp proc handling to seq_files
59 +Subject: [PATCH 3/5] LU-3319 procfs: move osp proc handling to seq_files
60
61 With 3.10 linux kernel and above proc handling now only
62 uses struct seq_files. This patch migrates the osp
63
64 diff --git a/sys-cluster/lustre/files/0004-LU-2096-lprocfs-symlinks-for-forward-compatibility.patch b/sys-cluster/lustre/files/0004-LU-2096-lprocfs-symlinks-for-forward-compatibility.patch
65 deleted file mode 100644
66 index b835516..0000000
67 --- a/sys-cluster/lustre/files/0004-LU-2096-lprocfs-symlinks-for-forward-compatibility.patch
68 +++ /dev/null
69 @@ -1,199 +0,0 @@
70 -From ae21b1ad797973ad686dfc1c0cad8d313ddaf4d7 Mon Sep 17 00:00:00 2001
71 -From: Andreas Dilger <andreas.dilger@×××××.com>
72 -Date: Tue, 6 May 2014 09:51:45 -0400
73 -Subject: [PATCH 4/6] LU-2096 lprocfs: symlinks for forward compatibility
74 -
75 -Currently, the "ofd" device is still named "obdfilter" in the Lustre
76 -configuration and in /proc/fs/lustre. It would be better to name it
77 -"ost" which is has been the long term goal but retain the "ofd"
78 -module name.
79 -
80 -The per-OST device statistics should really be under "ost/{target}",
81 -like the per-MDT statistics are under "mdt/{target}" already in 2.x.
82 -
83 -Similarly, the "OSS" statistics have always been under "ost/OSS", but
84 -would be better in their own "oss" subdirectory much like what is done
85 -for "MDS" statistics.
86 -
87 -Add symlinks in lprocfs for "ost/OSS -> oss", "obdfilter -> ofd -> ost",
88 -and "obdfilter/{target} -> ost/{target}" for forward compatibility so
89 -that when we finally are able to make these changes to the module names
90 -userspace tools and scripts can have a smoother transition between
91 -Lustre versions.
92 -
93 -Signed-off-by: Andreas Dilger <andreas.dilger@×××××.com>
94 -Signed-off-by: John L. Hammond <john.hammond@×××××.com>
95 -Signed-off-by: James Simmons <uja.ornl@×××××.com>
96 -Change-Id: Ia0835e39aba7c8a540a6247bd3d56bc14e500c1e
97 -Signed-off-by: Alexey Shvetsov <alexxy@g.o>
98 ----
99 - lustre/include/obd.h | 4 ++--
100 - lustre/mgs/mgs_llog.c | 4 ++--
101 - lustre/obdclass/genops.c | 2 +-
102 - lustre/ofd/ofd_dev.c | 32 +++++++++++++++++++++++++++++++-
103 - lustre/ofd/ofd_internal.h | 2 ++
104 - lustre/ost/ost_handler.c | 12 +++++++++++-
105 - 6 files changed, 49 insertions(+), 7 deletions(-)
106 -
107 -diff --git a/lustre/include/obd.h b/lustre/include/obd.h
108 -index 3abcc4d..a79c901 100644
109 ---- a/lustre/include/obd.h
110 -+++ b/lustre/include/obd.h
111 -@@ -516,8 +516,8 @@ struct niobuf_local {
112 - #define LUSTRE_MDS_NAME "mds"
113 - #define LUSTRE_MDT_NAME "mdt"
114 - #define LUSTRE_MDC_NAME "mdc"
115 --#define LUSTRE_OSS_NAME "ost" /* FIXME change name to oss */
116 --#define LUSTRE_OST_NAME "obdfilter" /* FIXME change name to ost */
117 -+#define LUSTRE_OSS_NAME "oss"
118 -+#define LUSTRE_OST_NAME "ost"
119 - #define LUSTRE_OSC_NAME "osc"
120 - #define LUSTRE_LOV_NAME "lov"
121 - #define LUSTRE_MGS_NAME "mgs"
122 -diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c
123 -index aca72e3..cd1174d 100644
124 ---- a/lustre/mgs/mgs_llog.c
125 -+++ b/lustre/mgs/mgs_llog.c
126 -@@ -2450,7 +2450,7 @@ static int mgs_write_log_ost(const struct lu_env *env,
127 - }
128 -
129 - /*
130 -- attach obdfilter ost1 ost1_UUID
131 -+ attach ost ost1 ost1_UUID
132 - setup /dev/loop2 ldiskfs f|n errors=remount-ro,user_xattr
133 - */
134 - if (class_find_param(ptr, PARAM_FAILMODE, &ptr) == 0)
135 -@@ -2466,7 +2466,7 @@ static int mgs_write_log_ost(const struct lu_env *env,
136 - snprintf(mti->mti_uuid, sizeof(mti->mti_uuid),
137 - "%s_UUID", mti->mti_svname);
138 - rc = record_attach(env, llh, mti->mti_svname,
139 -- "obdfilter"/*LUSTRE_OST_NAME*/, mti->mti_uuid);
140 -+ "ost"/*LUSTRE_OST_NAME*/, mti->mti_uuid);
141 - if (rc)
142 - GOTO(out_end, rc);
143 - rc = record_setup(env, llh, mti->mti_svname,
144 -diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
145 -index d7c541a..1479f5a 100644
146 ---- a/lustre/obdclass/genops.c
147 -+++ b/lustre/obdclass/genops.c
148 -@@ -121,7 +121,7 @@ struct obd_type *class_get_type(const char *name)
149 - if (!type) {
150 - const char *modname = name;
151 -
152 -- if (strcmp(modname, "obdfilter") == 0)
153 -+ if (strcmp(modname, "ost") == 0)
154 - modname = "ofd";
155 -
156 - if (strcmp(modname, LUSTRE_LWP_NAME) == 0)
157 -diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c
158 -index 0f0d51a..b597b03 100644
159 ---- a/lustre/ofd/ofd_dev.c
160 -+++ b/lustre/ofd/ofd_dev.c
161 -@@ -2375,10 +2375,23 @@ static struct lu_device_type ofd_device_type = {
162 - .ldt_ctx_tags = LCT_DT_THREAD
163 - };
164 -
165 -+/*
166 -+ * In the normal case all we have one symlink, type->typ_procsym to
167 -+ * address the renaming of proc directories due to the OSD api
168 -+ * introducton. OFD is special in that this subsystem the name has
169 -+ * changed from obdfilter to ofd to lastly ost. So we need two
170 -+ * symlinks to point to "ost". Hopefully in 2.9 we can removal all
171 -+ * this symlink madness.
172 -+ *
173 -+ * Symlink called "obdfilter" that points to "ost" directory.
174 -+ */
175 -+static struct proc_dir_entry *ofd_symlink;
176 -+
177 - int __init ofd_init(void)
178 - {
179 - struct lprocfs_static_vars lvars;
180 -- int rc;
181 -+ struct obd_type *type;
182 -+ int rc;
183 -
184 - rc = lu_kmem_init(ofd_caches);
185 - if (rc)
186 -@@ -2397,13 +2410,30 @@ int __init ofd_init(void)
187 - lvars.module_vars,
188 - #endif
189 - LUSTRE_OST_NAME, &ofd_device_type);
190 -+
191 -+ /* For forward compatibility symlink "obdfilter" and "ofd" to "ost"
192 -+ * in procfs. Remove the symlinks entirely when access via
193 -+ * "obdfilter/ofd" can be deprecated, maybe 2.9? */
194 -+ type = class_search_type(LUSTRE_OST_NAME);
195 -+ LASSERT(type != NULL);
196 -+ type->typ_procsym = lprocfs_add_symlink("ofd", proc_lustre_root,
197 -+ "ost");
198 -+
199 -+ ofd_symlink = lprocfs_add_symlink("obdfilter", proc_lustre_root,
200 -+ "ost");
201 - return rc;
202 - }
203 -
204 - void __exit ofd_exit(void)
205 - {
206 -+ struct obd_type *type = class_search_type(LUSTRE_OST_NAME);
207 -+
208 - ofd_fmd_exit();
209 - lu_kmem_fini(ofd_caches);
210 -+ if (ofd_symlink)
211 -+ lprocfs_remove(&ofd_symlink);
212 -+ if (type->typ_procsym)
213 -+ lprocfs_remove(&type->typ_procsym);
214 - class_unregister_type(LUSTRE_OST_NAME);
215 - }
216 -
217 -diff --git a/lustre/ofd/ofd_internal.h b/lustre/ofd/ofd_internal.h
218 -index 4f12506..98a5cba 100644
219 ---- a/lustre/ofd/ofd_internal.h
220 -+++ b/lustre/ofd/ofd_internal.h
221 -@@ -193,6 +193,8 @@ struct ofd_device {
222 - struct ptlrpc_thread ofd_inconsistency_thread;
223 - struct list_head ofd_inconsistency_list;
224 - spinlock_t ofd_inconsistency_lock;
225 -+ /* create a symlink "obdfilter" from the "ost" directory */
226 -+ struct proc_dir_entry *ofd_symlink;
227 - };
228 -
229 - static inline struct ofd_device *ofd_dev(struct lu_device *d)
230 -diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c
231 -index bae0a40..02ddb87 100644
232 ---- a/lustre/ost/ost_handler.c
233 -+++ b/lustre/ost/ost_handler.c
234 -@@ -95,13 +95,20 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
235 - RETURN(rc);
236 -
237 - #ifdef LPROCFS
238 -+ obd->obd_type->typ_procsym = lprocfs_add_symlink("ost/OSS", proc_lustre_root,
239 -+ "../oss/OSS");
240 -+ if (IS_ERR(obd->obd_type->typ_procsym)) {
241 -+ CERROR("ost: can't create compat entry \"ost/OSS\": %d\n",
242 -+ (int)PTR_ERR(obd->obd_type->typ_procsym));
243 -+ obd->obd_type->typ_procsym = NULL;
244 -+ }
245 - obd->obd_vars = lprocfs_ost_obd_vars;
246 - lprocfs_seq_obd_setup(obd);
247 - #endif
248 - mutex_init(&ost->ost_health_mutex);
249 -
250 - svc_conf = (typeof(svc_conf)) {
251 -- .psc_name = LUSTRE_OSS_NAME,
252 -+ .psc_name = "ost",
253 - .psc_watchdog_factor = OSS_SERVICE_WATCHDOG_FACTOR,
254 - .psc_buf = {
255 - .bc_nbufs = OST_NBUFS,
256 -@@ -379,6 +386,9 @@ static int ost_cleanup(struct obd_device *obd)
257 -
258 - mutex_unlock(&ost->ost_health_mutex);
259 -
260 -+ if (obd->obd_type->typ_procsym)
261 -+ lprocfs_remove(&obd->obd_type->typ_procsym);
262 -+
263 - lprocfs_obd_cleanup(obd);
264 -
265 - if (ost_io_cptable != NULL) {
266 ---
267 -1.9.3
268 -
269
270 diff --git a/sys-cluster/lustre/files/0005-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch b/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
271 similarity index 99%
272 rename from sys-cluster/lustre/files/0005-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
273 rename to sys-cluster/lustre/files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
274 index f2c13f7..95b5c90 100644
275 --- a/sys-cluster/lustre/files/0005-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
276 +++ b/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
277 @@ -1,7 +1,7 @@
278 -From c96c9b415fa5863d1c0a64530d6df87cd67e8b9a Mon Sep 17 00:00:00 2001
279 +From 46c87e9a30b44d31a2551217da6818ffbb5eed02 Mon Sep 17 00:00:00 2001
280 From: James Simmons <uja.ornl@×××××.com>
281 Date: Mon, 5 May 2014 10:02:21 -0400
282 -Subject: [PATCH 5/6] LU-3319 procfs: move mdd/ofd proc handling to seq_files
283 +Subject: [PATCH 4/5] LU-3319 procfs: move mdd/ofd proc handling to seq_files
284
285 With 3.10 linux kernel and above proc handling now only
286 uses struct seq_files. This patch migrates the mdd/ofd
287 @@ -9,7 +9,6 @@ layer proc entries over to using seq_files.
288
289 Signed-off-by: James Simmons <uja.ornl@×××××.com>
290 Change-Id: I61b7df6bfd5efd0f12e3ca1a1813b7b62d493168
291 -Signed-off-by: Alexey Shvetsov <alexxy@g.o>
292 ---
293 lustre/include/lustre_lfsck.h | 6 +-
294 lustre/lfsck/lfsck_internal.h | 9 +-
295 @@ -1879,7 +1878,7 @@ index 359b373..fcde82a 100644
296 {
297 LASSERT(stats && stats->ls_num >= LPROC_OFD_STATS_LAST);
298 diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c
299 -index b597b03..e186c41 100644
300 +index 0f0d51a..6172913 100644
301 --- a/lustre/ofd/ofd_dev.c
302 +++ b/lustre/ofd/ofd_dev.c
303 @@ -239,8 +239,7 @@ static int ofd_process_config(const struct lu_env *env, struct lu_device *d,
304 @@ -2038,15 +2037,15 @@ index b597b03..e186c41 100644
305 lprocfs_free_per_client_stats(obd);
306 lprocfs_obd_cleanup(obd);
307 lprocfs_free_obd_stats(obd);
308 -@@ -2389,7 +2388,6 @@ static struct proc_dir_entry *ofd_symlink;
309 +@@ -2377,7 +2376,6 @@ static struct lu_device_type ofd_device_type = {
310
311 int __init ofd_init(void)
312 {
313 - struct lprocfs_static_vars lvars;
314 - struct obd_type *type;
315 - int rc;
316 + int rc;
317
318 -@@ -2403,11 +2401,9 @@ int __init ofd_init(void)
319 + rc = lu_kmem_init(ofd_caches);
320 +@@ -2390,11 +2388,9 @@ int __init ofd_init(void)
321 return(rc);
322 }
323
324 @@ -2058,12 +2057,12 @@ index b597b03..e186c41 100644
325 + NULL,
326 #endif
327 LUSTRE_OST_NAME, &ofd_device_type);
328 -
329 + return rc;
330 diff --git a/lustre/ofd/ofd_internal.h b/lustre/ofd/ofd_internal.h
331 -index 98a5cba..a630a9c 100644
332 +index 4f12506..2e75de5 100644
333 --- a/lustre/ofd/ofd_internal.h
334 +++ b/lustre/ofd/ofd_internal.h
335 -@@ -405,13 +405,9 @@ int ofd_txn_stop_cb(const struct lu_env *env, struct thandle *txn,
336 +@@ -403,13 +403,9 @@ int ofd_txn_stop_cb(const struct lu_env *env, struct thandle *txn,
337
338 /* lproc_ofd.c */
339 #ifdef LPROCFS
340
341 diff --git a/sys-cluster/lustre/files/0006-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch b/sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
342 similarity index 99%
343 rename from sys-cluster/lustre/files/0006-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
344 rename to sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
345 index c27b478..53e36b3 100644
346 --- a/sys-cluster/lustre/files/0006-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
347 +++ b/sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
348 @@ -1,7 +1,7 @@
349 -From 54b05aa8e43dd1c0ce1d7c78c8fea11e64bef099 Mon Sep 17 00:00:00 2001
350 +From 1d943d37d99ba9503561c341fc9cff5fcaa37441 Mon Sep 17 00:00:00 2001
351 From: Yang Sheng <yang.sheng@×××××.com>
352 Date: Thu, 24 Apr 2014 11:43:09 +0800
353 -Subject: [PATCH 6/6] LU-4416 mm: Backport shrinker changes from upstream
354 +Subject: [PATCH 5/5] LU-4416 mm: Backport shrinker changes from upstream
355
356 Convert shrinker to new count/scan API.
357 --ptlrpc shrinker
358
359 diff --git a/sys-cluster/lustre/lustre-9999.ebuild b/sys-cluster/lustre/lustre-9999.ebuild
360 index d26599a..d1fa334 100644
361 --- a/sys-cluster/lustre/lustre-9999.ebuild
362 +++ b/sys-cluster/lustre/lustre-9999.ebuild
363 @@ -43,9 +43,8 @@ PATCHES=(
364 "${FILESDIR}/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch"
365 "${FILESDIR}/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch"
366 "${FILESDIR}/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch"
367 - "${FILESDIR}/0004-LU-2096-lprocfs-symlinks-for-forward-compatibility.patch"
368 - "${FILESDIR}/0005-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch"
369 - "${FILESDIR}/0006-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch"
370 + "${FILESDIR}/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch"
371 + "${FILESDIR}/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch"
372 "${FILESDIR}/lustre-readline6.3_fix.patch"
373 )