aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/lustre/files')
-rw-r--r--sys-cluster/lustre/files/0001-LU-4554-lfsck-old-single-OI-MDT-always-scrubbed.patch41
-rw-r--r--sys-cluster/lustre/files/0002-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch (renamed from sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch)4
-rw-r--r--sys-cluster/lustre/files/0003-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch (renamed from sys-cluster/lustre/files/0005-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch)4
-rw-r--r--sys-cluster/lustre/files/0004-LU-3319-procfs-move-mgs-proc-handling-to-seq_files.patch2
-rw-r--r--sys-cluster/lustre/files/0005-LU-3319-procfs-fix-symlink-handling.patch (renamed from sys-cluster/lustre/files/0003-LU-3319-procfs-fix-symlink-handling.patch)85
-rw-r--r--sys-cluster/lustre/files/0006-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch13
-rw-r--r--sys-cluster/lustre/files/0007-LU-3319-procfs-move-lod-proc-handling-to-seq_files.patch15
-rw-r--r--sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch (renamed from sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch)157
-rw-r--r--sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch (renamed from sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch)18
-rw-r--r--sys-cluster/lustre/files/0010-LU-3319-procfs-update-ldiskfs-proc-handling-to-seq_f.patch21
-rw-r--r--sys-cluster/lustre/files/0011-LU-3319-lprocfs-client-side-cleanups.patch (renamed from sys-cluster/lustre/files/0002-LU-3319-lprocfs-client-side-cleanups.patch)8
-rw-r--r--sys-cluster/lustre/files/0011-LU-3373-osd-ldiskfs-readdir-replace-by-iterate.patch140
-rw-r--r--sys-cluster/lustre/files/0012-LU-3974-llite-use-new-struct-dir_context.patch9
-rw-r--r--sys-cluster/lustre/files/0013-LU-3974-llite-invalidatepage-api-changed.patch4
14 files changed, 224 insertions, 297 deletions
diff --git a/sys-cluster/lustre/files/0001-LU-4554-lfsck-old-single-OI-MDT-always-scrubbed.patch b/sys-cluster/lustre/files/0001-LU-4554-lfsck-old-single-OI-MDT-always-scrubbed.patch
new file mode 100644
index 000000000..18ec7cfe8
--- /dev/null
+++ b/sys-cluster/lustre/files/0001-LU-4554-lfsck-old-single-OI-MDT-always-scrubbed.patch
@@ -0,0 +1,41 @@
+From 9e3436c298d65a5867920b0de0d3920972465407 Mon Sep 17 00:00:00 2001
+From: Ned Bass <bass6@llnl.gov>
+Date: Thu, 30 Jan 2014 14:56:20 -0800
+Subject: [PATCH 01/13] LU-4554 lfsck: old single-OI MDT always scrubbed
+
+Old ldiskfs MDT's that contain a single OI container named "oi.16"
+trigger an automatic OI scrub on each restart. This is because
+osd_oi_table_open() gets ENOENT opening "oi.16.0" and consequently
+sets bit 0 in scrub_file::sf_oi_bitmap. This bit indicates the OI
+container 0 needs to be recreated, and it triggers a scrub in
+osd_fid_lookup() for lookups that fail with ENOENT. Fix this by
+clearing the bit in osd_oi_init() after a successful open of
+"oi.16".
+
+Signed-off-by: Ned Bass <bass6@llnl.gov>
+Change-Id: Ie69223d3f8289c90de46f9afe0a2de0e0625b0f6
+Reviewed-on: http://review.whamcloud.com/9067
+Tested-by: Jenkins
+Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
+Tested-by: Maloo <hpdd-maloo@intel.com>
+Reviewed-by: James Nunez <james.a.nunez@intel.com>
+Reviewed-by: Fan Yong <fan.yong@intel.com>
+---
+ lustre/osd-ldiskfs/osd_oi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lustre/osd-ldiskfs/osd_oi.c b/lustre/osd-ldiskfs/osd_oi.c
+index 6e690be..b4bfb9a 100644
+--- a/lustre/osd-ldiskfs/osd_oi.c
++++ b/lustre/osd-ldiskfs/osd_oi.c
+@@ -368,6 +368,7 @@ int osd_oi_init(struct osd_thread_info *info, struct osd_device *osd)
+ /* if previous failed then try found single OI from old filesystem */
+ rc = osd_oi_open(info, osd, OSD_OI_NAME_BASE, &oi[0], false);
+ if (rc == 0) { /* found single OI from old filesystem */
++ ldiskfs_clear_bit(0, sf->sf_oi_bitmap);
+ if (sf->sf_success_count == 0)
+ /* XXX: There is one corner case that if the OI_scrub
+ * file crashed or lost and we regard it upgrade,
+--
+1.8.5.3
+
diff --git a/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch b/sys-cluster/lustre/files/0002-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
index eaec9aa7b..f6b096528 100644
--- a/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
+++ b/sys-cluster/lustre/files/0002-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
@@ -1,7 +1,7 @@
-From 03643a33bd4d6a6fc3f8412f3e5f7f9a4bbd445b Mon Sep 17 00:00:00 2001
+From 247c87f4a981fd26bfaf219930193b1a35865736 Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@gentoo.org>
Date: Mon, 18 Mar 2013 16:22:27 +0400
-Subject: [PATCH 01/13] LU-2982 build: make AC check for linux arch sandbox
+Subject: [PATCH 02/13] LU-2982 build: make AC check for linux arch sandbox
friendly
this commit makes AC check for linux kernel arch sandbox friendly
diff --git a/sys-cluster/lustre/files/0005-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0003-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
index 4d11be880..a93c92a15 100644
--- a/sys-cluster/lustre/files/0005-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
+++ b/sys-cluster/lustre/files/0003-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
@@ -1,7 +1,7 @@
-From 3c08f9d074a2f89f71f41c8a99272706ad4450ea Mon Sep 17 00:00:00 2001
+From c05c0be01814527d8d3762963c7a6d4c28189d2d Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Fri, 3 Jan 2014 09:55:26 -0500
-Subject: [PATCH 05/13] LU-3319 procfs: update zfs proc handling to seq_files
+Subject: [PATCH 03/13] LU-3319 procfs: update zfs proc handling to seq_files
Migrate all zfs proc handling to using strictly seq_files.
diff --git a/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mgs-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mgs-proc-handling-to-seq_files.patch
index dd5e37782..fe3241142 100644
--- a/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mgs-proc-handling-to-seq_files.patch
+++ b/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mgs-proc-handling-to-seq_files.patch
@@ -1,4 +1,4 @@
-From 223f07785cbb8d28ef563bfba382b101a064a928 Mon Sep 17 00:00:00 2001
+From b262846027fbf96a5a80b81cfe86da53ce6e6f9f Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Fri, 3 Jan 2014 09:58:53 -0500
Subject: [PATCH 04/13] LU-3319 procfs: move mgs proc handling to seq_files
diff --git a/sys-cluster/lustre/files/0003-LU-3319-procfs-fix-symlink-handling.patch b/sys-cluster/lustre/files/0005-LU-3319-procfs-fix-symlink-handling.patch
index 8d1a0df42..533c4d925 100644
--- a/sys-cluster/lustre/files/0003-LU-3319-procfs-fix-symlink-handling.patch
+++ b/sys-cluster/lustre/files/0005-LU-3319-procfs-fix-symlink-handling.patch
@@ -1,7 +1,7 @@
-From ce693d2759e274a114a668e477264d1af8181159 Mon Sep 17 00:00:00 2001
+From 8f24a0e29b5f4b18193742c9aecd960c6b6102ff Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
-Date: Fri, 31 Jan 2014 11:37:53 -0500
-Subject: [PATCH 03/13] LU-3319 procfs: fix symlink handling
+Date: Sun, 9 Feb 2014 09:37:44 -0500
+Subject: [PATCH 05/13] LU-3319 procfs: fix symlink handling
While working on symlink handling for seq files I noticed a
long outstanding bug. Code was developed to link osc obds
@@ -17,11 +17,11 @@ only happens once.
Change-Id: Ib158ec4444ed7abc0f3c3e820ee4a333631a58d1
Signed-off-by: James Simmons <uja.ornl@gmail.com>
---
- lustre/include/obd.h | 17 ++++----
- lustre/lmv/lmv_obd.c | 49 +++++++++--------------
- lustre/lov/lov_obd.c | 100 +++++++++++++++++++++++++++--------------------
- lustre/obdclass/genops.c | 3 ++
- 4 files changed, 87 insertions(+), 82 deletions(-)
+ lustre/include/obd.h | 17 +++++----
+ lustre/lmv/lmv_obd.c | 48 ++++++++---------------
+ lustre/lov/lov_obd.c | 99 +++++++++++++++++++++++++++---------------------
+ lustre/obdclass/genops.c | 17 +++++----
+ 4 files changed, 91 insertions(+), 90 deletions(-)
diff --git a/lustre/include/obd.h b/lustre/include/obd.h
index c18052b..8fd2ce7 100644
@@ -59,7 +59,7 @@ index c18052b..8fd2ce7 100644
struct lprocfs_stats *obd_svc_stats;
struct lprocfs_seq_vars *obd_vars;
diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c
-index e0941c9..7e1738e 100644
+index e0941c9..93db311 100644
--- a/lustre/lmv/lmv_obd.c
+++ b/lustre/lmv/lmv_obd.c
@@ -242,9 +242,6 @@ static int lmv_connect(const struct lu_env *env,
@@ -97,20 +97,20 @@ index e0941c9..7e1738e 100644
}
#endif
-@@ -302,9 +296,9 @@ static int lmv_connect(const struct lu_env *env,
+@@ -302,10 +296,8 @@ static int lmv_connect(const struct lu_env *env,
rc = lmv_check_connect(obd);
#ifdef __KERNEL__
- if (rc && lmv_proc_dir) {
- lprocfs_remove(&lmv_proc_dir);
- obd->obd_proc_private = NULL;
-+ if (rc && obd->obd_type->typ_procsym != NULL) {
+- }
++ if (rc && obd->obd_type->typ_procsym != NULL)
+ lprocfs_remove(&obd->obd_type->typ_procsym);
-+ obd->obd_type->typ_procsym = NULL;
- }
#endif
RETURN(rc);
-@@ -384,9 +378,6 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize,
+ }
+@@ -384,9 +376,6 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize,
int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
{
@@ -120,7 +120,7 @@ index e0941c9..7e1738e 100644
struct lmv_obd *lmv = &obd->u.lmv;
struct obd_uuid *cluuid = &lmv->cluuid;
struct obd_uuid lmv_mdc_uuid = { "LMV_MDC_UUID" };
-@@ -466,14 +457,13 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
+@@ -466,14 +455,13 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
cfs_atomic_read(&obd->obd_refcount));
#ifdef __KERNEL__
@@ -137,18 +137,17 @@ index e0941c9..7e1738e 100644
"../../../%s/%s",
mdc_obd->obd_type->typ_name,
mdc_obd->obd_name);
-@@ -482,8 +472,8 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
+@@ -482,8 +470,7 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
"/proc/fs/lustre/%s/%s/target_obds/%s.",
obd->obd_type->typ_name, obd->obd_name,
mdc_obd->obd_name);
- lprocfs_remove(&lmv_proc_dir);
- obd->obd_proc_private = NULL;
+ lprocfs_remove(&obd->obd_type->typ_procsym);
-+ obd->obd_type->typ_procsym = NULL;
}
}
#endif
-@@ -675,9 +665,6 @@ int lmv_check_connect(struct obd_device *obd)
+@@ -675,9 +662,6 @@ int lmv_check_connect(struct obd_device *obd)
static int lmv_disconnect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
{
@@ -158,7 +157,7 @@ index e0941c9..7e1738e 100644
struct lmv_obd *lmv = &obd->u.lmv;
struct obd_device *mdc_obd;
int rc;
-@@ -695,9 +682,9 @@ static int lmv_disconnect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
+@@ -695,9 +679,9 @@ static int lmv_disconnect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
}
#ifdef __KERNEL__
@@ -171,7 +170,7 @@ index e0941c9..7e1738e 100644
#endif
rc = obd_fid_fini(tgt->ltd_exp->exp_obd);
if (rc)
-@@ -747,8 +734,8 @@ static int lmv_disconnect(struct obd_export *exp)
+@@ -747,8 +731,8 @@ static int lmv_disconnect(struct obd_export *exp)
}
#ifdef __KERNEL__
@@ -183,7 +182,7 @@ index e0941c9..7e1738e 100644
CERROR("/proc/fs/lustre/%s/%s/target_obds missing\n",
obd->obd_type->typ_name, obd->obd_name);
diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c
-index 286cd15..b52a263 100644
+index 286cd15..a3310fd 100644
--- a/lustre/lov/lov_obd.c
+++ b/lustre/lov/lov_obd.c
@@ -127,19 +127,16 @@ static int lov_notify(struct obd_device *obd, struct obd_device *watched,
@@ -215,7 +214,7 @@ index 286cd15..b52a263 100644
tgt_uuid = &lov->lov_tgts[index]->ltd_uuid;
tgt_obd = lov->lov_tgts[index]->ltd_obd;
-@@ -195,27 +192,26 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate,
+@@ -195,27 +192,25 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate,
obd_uuid2str(tgt_uuid), tgt_obd->obd_name, activate ? "":"in");
#ifdef __KERNEL__
@@ -257,11 +256,10 @@ index 286cd15..b52a263 100644
+ obd->obd_type->typ_name, obd->obd_name,
+ osc_obd->obd_name);
+ lprocfs_remove(&obd->obd_type->typ_procsym);
-+ obd->obd_type->typ_procsym = NULL;
}
}
#endif
-@@ -250,6 +246,17 @@ static int lov_connect(const struct lu_env *env,
+@@ -250,6 +245,17 @@ static int lov_connect(const struct lu_env *env,
if (data)
lov->lov_ocd = *data;
@@ -279,7 +277,7 @@ index 286cd15..b52a263 100644
obd_getref(obd);
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
tgt = lov->lov_tgts[i];
-@@ -280,7 +287,6 @@ static int lov_connect(const struct lu_env *env,
+@@ -280,7 +286,6 @@ static int lov_connect(const struct lu_env *env,
static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
{
@@ -287,7 +285,7 @@ index 286cd15..b52a263 100644
struct lov_obd *lov = &obd->u.lov;
struct obd_device *osc_obd;
int rc;
-@@ -296,18 +302,18 @@ static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
+@@ -296,18 +301,18 @@ static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
tgt->ltd_exp->exp_obd->obd_inactive = 1;
}
@@ -317,7 +315,7 @@ index 286cd15..b52a263 100644
}
obd_register_observer(osc_obd, NULL);
-@@ -353,6 +359,14 @@ static int lov_disconnect(struct obd_export *exp)
+@@ -353,6 +358,14 @@ static int lov_disconnect(struct obd_export *exp)
}
obd_putref(obd);
@@ -333,17 +331,32 @@ index 286cd15..b52a263 100644
rc = class_disconnect(exp); /* bz 9811 */
RETURN(rc);
diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
-index c9d8a4e..b9606bb 100644
+index c9d8a4e..a4a981c 100644
--- a/lustre/obdclass/genops.c
+++ b/lustre/obdclass/genops.c
-@@ -220,6 +220,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
- type->typ_procroot = NULL;
- GOTO (failed, rc);
- }
-+ type->typ_procsym = NULL;
- #endif
- if (ldt != NULL) {
- type->typ_lu = ldt;
+@@ -181,14 +181,15 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
+ RETURN(-EEXIST);
+ }
+
+- rc = -ENOMEM;
+- OBD_ALLOC(type, sizeof(*type));
+- if (type == NULL)
+- RETURN(rc);
++ rc = -ENOMEM;
++ OBD_ALLOC(type, sizeof(*type));
++ if (type == NULL)
++ RETURN(rc);
++ memset(type, 0, sizeof(*type));
+
+- OBD_ALLOC_PTR(type->typ_dt_ops);
+- OBD_ALLOC_PTR(type->typ_md_ops);
+- OBD_ALLOC(type->typ_name, strlen(name) + 1);
++ OBD_ALLOC_PTR(type->typ_dt_ops);
++ OBD_ALLOC_PTR(type->typ_md_ops);
++ OBD_ALLOC(type->typ_name, strlen(name) + 1);
+
+ if (type->typ_dt_ops == NULL ||
+ type->typ_md_ops == NULL ||
@@ -242,6 +243,8 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
if (type->typ_dt_ops != NULL)
OBD_FREE_PTR(type->typ_dt_ops);
diff --git a/sys-cluster/lustre/files/0006-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0006-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
index 4189564a8..0ff28fd65 100644
--- a/sys-cluster/lustre/files/0006-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
+++ b/sys-cluster/lustre/files/0006-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
@@ -1,6 +1,6 @@
-From 0af5f0dce053b1623b18bec48731d20c0a80b7b5 Mon Sep 17 00:00:00 2001
+From cfafe91ff9caf648f144c1a162112b7d1485aae4 Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
-Date: Fri, 31 Jan 2014 12:50:59 -0500
+Date: Sun, 9 Feb 2014 17:10:18 -0500
Subject: [PATCH 06/13] LU-3319 procfs: move osp proc handling to seq_files
With 3.10 linux kernel and above proc handling now only
@@ -10,14 +10,14 @@ layer proc entries over to using seq_files.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id8f77d72fd35755f1b7b1c17fcf27e0731bd5ac1
---
- lustre/osp/lproc_osp.c | 374 ++++++++++++++++++++++++----------------------
+ lustre/osp/lproc_osp.c | 373 ++++++++++++++++++++++++----------------------
lustre/osp/lwp_dev.c | 18 +--
lustre/osp/osp_dev.c | 48 +++---
lustre/osp/osp_internal.h | 2 -
- 4 files changed, 223 insertions(+), 219 deletions(-)
+ 4 files changed, 222 insertions(+), 219 deletions(-)
diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c
-index 75ebeb1..3dc5ec7 100644
+index 75ebeb1..1ec40fc 100644
--- a/lustre/osp/lproc_osp.c
+++ b/lustre/osp/lproc_osp.c
@@ -45,24 +45,23 @@
@@ -574,7 +574,7 @@ index 75ebeb1..3dc5ec7 100644
obd->obd_type->typ_procroot,
lprocfs_osp_osd_vars,
&osp->opd_dt_dev);
-@@ -502,34 +528,30 @@ void osp_lprocfs_init(struct osp_device *osp)
+@@ -502,34 +528,29 @@ void osp_lprocfs_init(struct osp_device *osp)
return;
}
@@ -618,7 +618,6 @@ index 75ebeb1..3dc5ec7 100644
+ CERROR("could not register OSC symlink for "
+ "/proc/fs/lustre/osp/%s.", obd->obd_name);
+ lprocfs_remove(&obd->obd_type->typ_procsym);
-+ obd->obd_type->typ_procsym = NULL;
+ } else {
+ osp->opd_symlink = symlink;
}
diff --git a/sys-cluster/lustre/files/0007-LU-3319-procfs-move-lod-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0007-LU-3319-procfs-move-lod-proc-handling-to-seq_files.patch
index 3aad32c41..dad3b481c 100644
--- a/sys-cluster/lustre/files/0007-LU-3319-procfs-move-lod-proc-handling-to-seq_files.patch
+++ b/sys-cluster/lustre/files/0007-LU-3319-procfs-move-lod-proc-handling-to-seq_files.patch
@@ -1,6 +1,6 @@
-From 9260e5e777af25ebc1a94113ede31667c5f10e97 Mon Sep 17 00:00:00 2001
+From 82953bddbc3c7b9aa044d9eecc796bc12638f476 Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
-Date: Fri, 31 Jan 2014 12:46:28 -0500
+Date: Sun, 9 Feb 2014 11:08:45 -0500
Subject: [PATCH 07/13] LU-3319 procfs: move lod proc handling to seq_files
With 3.10 linux kernel and above proc handling now only
@@ -13,8 +13,8 @@ Change-Id: Iaa0f617fcd430e91f12afbc0faf6906fd275a7a5
lustre/lod/lod_dev.c | 39 ++++---
lustre/lod/lod_internal.h | 1 -
lustre/lod/lod_pool.c | 7 +-
- lustre/lod/lproc_lod.c | 252 ++++++++++++++++++++++++----------------------
- 4 files changed, 153 insertions(+), 146 deletions(-)
+ lustre/lod/lproc_lod.c | 251 ++++++++++++++++++++++++----------------------
+ 4 files changed, 152 insertions(+), 146 deletions(-)
diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c
index 02a1e1e..b0ad1fd 100644
@@ -133,7 +133,7 @@ index 98b2416..1849e5d 100644
&pool_proc_operations);
if (IS_ERR(new_pool->pool_proc_entry)) {
diff --git a/lustre/lod/lproc_lod.c b/lustre/lod/lproc_lod.c
-index e976063..6e20b36 100644
+index e976063..e420a5e 100644
--- a/lustre/lod/lproc_lod.c
+++ b/lustre/lod/lproc_lod.c
@@ -42,23 +42,22 @@
@@ -556,7 +556,7 @@ index e976063..6e20b36 100644
if (IS_ERR(lod->lod_pool_proc_entry)) {
rc = PTR_ERR(lod->lod_pool_proc_entry);
lod->lod_pool_proc_entry = NULL;
-@@ -514,14 +514,19 @@ int lod_procfs_init(struct lod_device *lod)
+@@ -514,14 +514,18 @@ int lod_procfs_init(struct lod_device *lod)
GOTO(out, rc);
}
@@ -577,13 +577,12 @@ index e976063..6e20b36 100644
+ CERROR("could not register LOV symlink for "
+ "/proc/fs/lustre/lod/%s.", obd->obd_name);
+ lprocfs_remove(&obd->obd_type->typ_procsym);
-+ obd->obd_type->typ_procsym = NULL;
+ }
+ }
RETURN(0);
out:
-@@ -542,6 +547,9 @@ void lod_procfs_fini(struct lod_device *lod)
+@@ -542,6 +546,9 @@ void lod_procfs_fini(struct lod_device *lod)
lod->lod_pool_proc_entry = NULL;
}
diff --git a/sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch b/sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
index e2891347a..4019ae50c 100644
--- a/sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
+++ b/sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
@@ -1,14 +1,18 @@
-From 075cf04c212e2bf0f38c94433a80bca2e5bb051e Mon Sep 17 00:00:00 2001
+From 2790709429e9aaf4b11fca12e3f2e9d70f6608ce Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Fri, 31 Jan 2014 14:00:32 -0500
-Subject: [PATCH 09/13] LU-3319 procfs: move mdd/ofd proc handling to seq_files
+Subject: [PATCH 08/13] LU-3319 procfs: move mdd/ofd proc handling to seq_files
With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the mdd/ofd
layer proc entries over to using seq_files.
+Conflicts:
+ lustre/mdd/mdd_lproc.c
+
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I61b7df6bfd5efd0f12e3ca1a1813b7b62d493168
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
---
lustre/include/lustre_lfsck.h | 6 +-
lustre/lfsck/lfsck_internal.h | 9 +-
@@ -17,14 +21,14 @@ Change-Id: I61b7df6bfd5efd0f12e3ca1a1813b7b62d493168
lustre/lfsck/lfsck_namespace.c | 75 ++-----
lustre/mdd/mdd_device.c | 25 +--
lustre/mdd/mdd_internal.h | 1 -
- lustre/mdd/mdd_lproc.c | 293 ++++++++++++--------------
+ lustre/mdd/mdd_lproc.c | 300 ++++++++++++---------------
lustre/obdclass/lprocfs_status.c | 9 +-
lustre/ofd/lproc_ofd.c | 436 ++++++++++++++++++++-------------------
lustre/ofd/ofd_dev.c | 48 ++---
lustre/ofd/ofd_internal.h | 6 +-
lustre/osd-ldiskfs/osd_handler.c | 1 +
lustre/osd-zfs/osd_handler.c | 1 +
- 14 files changed, 463 insertions(+), 590 deletions(-)
+ 14 files changed, 462 insertions(+), 598 deletions(-)
diff --git a/lustre/include/lustre_lfsck.h b/lustre/include/lustre_lfsck.h
index 2e93420..0e578ac 100644
@@ -46,7 +50,7 @@ index 2e93420..0e578ac 100644
#endif /* _LUSTRE_LFSCK_H */
diff --git a/lustre/lfsck/lfsck_internal.h b/lustre/lfsck/lfsck_internal.h
-index 698fb5f..1893ccc 100644
+index 01d3c60..fb98cf2 100644
--- a/lustre/lfsck/lfsck_internal.h
+++ b/lustre/lfsck/lfsck_internal.h
@@ -288,8 +288,7 @@ struct lfsck_operations {
@@ -59,7 +63,7 @@ index 698fb5f..1893ccc 100644
int (*lfsck_double_scan)(const struct lu_env *env,
struct lfsck_component *com);
-@@ -539,10 +538,10 @@ void lfsck_component_cleanup(const struct lu_env *env,
+@@ -546,10 +545,10 @@ void lfsck_component_cleanup(const struct lu_env *env,
struct lfsck_component *com);
void lfsck_instance_cleanup(const struct lu_env *env,
struct lfsck_instance *lfsck);
@@ -74,10 +78,10 @@ index 698fb5f..1893ccc 100644
void lfsck_pos_fill(const struct lu_env *env, struct lfsck_instance *lfsck,
struct lfsck_position *pos, bool init);
diff --git a/lustre/lfsck/lfsck_layout.c b/lustre/lfsck/lfsck_layout.c
-index e7c12d2..8b9c43e 100644
+index bdcd4c4..1295764 100644
--- a/lustre/lfsck/lfsck_layout.c
+++ b/lustre/lfsck/lfsck_layout.c
-@@ -2024,69 +2024,53 @@ static int lfsck_layout_slave_post(const struct lu_env *env,
+@@ -2249,69 +2249,53 @@ static int lfsck_layout_slave_post(const struct lu_env *env,
}
static int lfsck_layout_dump(const struct lu_env *env,
@@ -156,7 +160,7 @@ index e7c12d2..8b9c43e 100644
"repaired_dangling: "LPU64"\n"
"repaired_unmatched_pair: "LPU64"\n"
"repaired_multiple_referenced: "LPU64"\n"
-@@ -2106,11 +2090,6 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2331,11 +2315,6 @@ static int lfsck_layout_dump(const struct lu_env *env,
lo->ll_objs_skipped,
lo->ll_objs_failed_phase1,
lo->ll_objs_failed_phase2);
@@ -168,7 +172,7 @@ index e7c12d2..8b9c43e 100644
if (lo->ll_status == LS_SCANNING_PHASE1) {
__u64 pos;
-@@ -2127,8 +2106,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2352,8 +2331,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
do_div(new_checked, duration);
if (rtime != 0)
do_div(speed, rtime);
@@ -178,7 +182,7 @@ index e7c12d2..8b9c43e 100644
"checked_phase2: "LPU64"\n"
"run_time_phase1: %u seconds\n"
"run_time_phase2: %u seconds\n"
-@@ -2142,11 +2120,6 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2367,11 +2345,6 @@ static int lfsck_layout_dump(const struct lu_env *env,
lo->ll_run_time_phase2,
speed,
new_checked);
@@ -190,7 +194,7 @@ index e7c12d2..8b9c43e 100644
LASSERT(lfsck->li_di_oit != NULL);
-@@ -2159,12 +2132,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2384,12 +2357,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
pos = iops->store(env, lfsck->li_di_oit);
if (!lfsck->li_current_oit_processed)
pos--;
@@ -204,7 +208,7 @@ index e7c12d2..8b9c43e 100644
} else {
/* XXX: LS_SCANNING_PHASE2 will be handled in the future. */
__u64 speed1 = lo->ll_objs_checked_phase1;
-@@ -2174,8 +2142,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2399,8 +2367,7 @@ static int lfsck_layout_dump(const struct lu_env *env,
do_div(speed1, lo->ll_run_time_phase1);
if (lo->ll_run_time_phase2 != 0)
do_div(speed2, lo->ll_run_time_phase2);
@@ -214,7 +218,7 @@ index e7c12d2..8b9c43e 100644
"checked_phase2: "LPU64"\n"
"run_time_phase1: %u seconds\n"
"run_time_phase2: %u seconds\n"
-@@ -2190,18 +2157,11 @@ static int lfsck_layout_dump(const struct lu_env *env,
+@@ -2415,18 +2382,11 @@ static int lfsck_layout_dump(const struct lu_env *env,
lo->ll_run_time_phase2,
speed1,
speed2);
@@ -235,10 +239,10 @@ index e7c12d2..8b9c43e 100644
static int lfsck_layout_master_double_scan(const struct lu_env *env,
diff --git a/lustre/lfsck/lfsck_lib.c b/lustre/lfsck/lfsck_lib.c
-index ad92e32..747e376 100644
+index 3eb3a02..b949b8d 100644
--- a/lustre/lfsck/lfsck_lib.c
+++ b/lustre/lfsck/lfsck_lib.c
-@@ -424,77 +424,52 @@ static inline int lfsck_instance_add(struct lfsck_instance *lfsck)
+@@ -425,77 +425,52 @@ static inline int lfsck_instance_add(struct lfsck_instance *lfsck)
return 0;
}
@@ -335,7 +339,7 @@ index ad92e32..747e376 100644
}
void lfsck_pos_fill(const struct lu_env *env, struct lfsck_instance *lfsck,
-@@ -1102,7 +1077,7 @@ int lfsck_async_request(const struct lu_env *env, struct obd_export *exp,
+@@ -1104,7 +1079,7 @@ int lfsck_async_request(const struct lu_env *env, struct obd_export *exp,
/* external interfaces */
@@ -344,7 +348,7 @@ index ad92e32..747e376 100644
{
struct lu_env env;
struct lfsck_instance *lfsck;
-@@ -1115,8 +1090,7 @@ int lfsck_get_speed(struct dt_device *key, void *buf, int len)
+@@ -1117,8 +1092,7 @@ int lfsck_get_speed(struct dt_device *key, void *buf, int len)
lfsck = lfsck_instance_find(key, true, false);
if (likely(lfsck != NULL)) {
@@ -354,7 +358,7 @@ index ad92e32..747e376 100644
lfsck_instance_put(&env, lfsck);
} else {
rc = -ENODEV;
-@@ -1156,7 +1130,7 @@ int lfsck_set_speed(struct dt_device *key, int val)
+@@ -1158,7 +1132,7 @@ int lfsck_set_speed(struct dt_device *key, int val)
}
EXPORT_SYMBOL(lfsck_set_speed);
@@ -363,7 +367,7 @@ index ad92e32..747e376 100644
{
struct lu_env env;
struct lfsck_instance *lfsck;
-@@ -1169,8 +1143,7 @@ int lfsck_get_windows(struct dt_device *key, void *buf, int len)
+@@ -1171,8 +1145,7 @@ int lfsck_get_windows(struct dt_device *key, void *buf, int len)
lfsck = lfsck_instance_find(key, true, false);
if (likely(lfsck != NULL)) {
@@ -373,7 +377,7 @@ index ad92e32..747e376 100644
lfsck_instance_put(&env, lfsck);
} else {
rc = -ENODEV;
-@@ -1220,7 +1193,7 @@ int lfsck_set_windows(struct dt_device *key, int val)
+@@ -1222,7 +1195,7 @@ int lfsck_set_windows(struct dt_device *key, int val)
}
EXPORT_SYMBOL(lfsck_set_windows);
@@ -382,7 +386,7 @@ index ad92e32..747e376 100644
{
struct lu_env env;
struct lfsck_instance *lfsck;
-@@ -1236,7 +1209,7 @@ int lfsck_dump(struct dt_device *key, void *buf, int len, enum lfsck_type type)
+@@ -1238,7 +1211,7 @@ int lfsck_dump(struct dt_device *key, void *buf, int len, enum lfsck_type type)
if (likely(lfsck != NULL)) {
com = lfsck_component_find(lfsck, type);
if (likely(com != NULL)) {
@@ -627,7 +631,7 @@ index daa1dcb..5332b2c 100644
int mdd_procfs_fini(struct mdd_device *mdd);
diff --git a/lustre/mdd/mdd_lproc.c b/lustre/mdd/mdd_lproc.c
-index 2573e33..e20324c 100644
+index de379b3..5714ee6 100644
--- a/lustre/mdd/mdd_lproc.c
+++ b/lustre/mdd/mdd_lproc.c
@@ -49,56 +49,14 @@
@@ -635,10 +639,7 @@ index 2573e33..e20324c 100644
#include "mdd_internal.h"
-int mdd_procfs_init(struct mdd_device *mdd, const char *name)
-+static ssize_t
-+mdd_atime_diff_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
+-{
- struct lprocfs_static_vars lvars;
- struct obd_type *type;
- int rc;
@@ -673,7 +674,10 @@ index 2573e33..e20324c 100644
-}
-
-int mdd_procfs_fini(struct mdd_device *mdd)
--{
++static ssize_t
++mdd_atime_diff_seq_write(struct file *file, const char *buffer,
++ size_t count, loff_t *off)
+ {
- if (mdd->mdd_proc_entry) {
- lprocfs_remove(&mdd->mdd_proc_entry);
- mdd->mdd_proc_entry = NULL;
@@ -770,21 +774,21 @@ index 2573e33..e20324c 100644
{
- struct llog_changelog_user_rec *rec;
- struct cucb_data *cucb = (struct cucb_data *)data;
--
-- LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN);
+ struct llog_changelog_user_rec *rec;
+ struct seq_file *m = data;
-- rec = (struct llog_changelog_user_rec *)hdr;
+- LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN);
+ LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN);
+- rec = (struct llog_changelog_user_rec *)hdr;
++ rec = (struct llog_changelog_user_rec *)hdr;
+
- cucb->idx += snprintf(cucb->page + cucb->idx, cucb->count - cucb->idx,
- CHANGELOG_USER_PREFIX"%-3d "LPU64"\n",
- rec->cur_id, rec->cur_endrec);
- if (cucb->idx >= cucb->count)
- return -ENOSPC;
-+ rec = (struct llog_changelog_user_rec *)hdr;
-
+-
- return 0;
+ seq_printf(m, CHANGELOG_USER_PREFIX"%-3d "LPU64"\n",
+ rec->cur_id, rec->cur_endrec);
@@ -860,7 +864,7 @@ index 2573e33..e20324c 100644
int val, rc;
LASSERT(mdd != NULL);
-@@ -264,24 +202,22 @@ static int lprocfs_wr_sync_perm(struct file *file, const char *buffer,
+@@ -264,22 +202,22 @@ static int lprocfs_wr_sync_perm(struct file *file, const char *buffer,
mdd->mdd_sync_permission = !!val;
return count;
}
@@ -871,14 +875,12 @@ index 2573e33..e20324c 100644
+static int mdd_lfsck_speed_limit_seq_show(struct seq_file *m, void *data)
{
- struct mdd_device *mdd = data;
-- int rc;
+ struct mdd_device *mdd = m->private;
LASSERT(mdd != NULL);
- *eof = 1;
-
-- rc = lfsck_get_speed(mdd->mdd_bottom, page, count);
-- return rc != 0 ? rc : count;
+- return lfsck_get_speed(mdd->mdd_bottom, page, count);
+ return lfsck_get_speed(m, mdd->mdd_bottom);
}
@@ -894,7 +896,7 @@ index 2573e33..e20324c 100644
__u32 val;
int rc;
-@@ -293,25 +229,22 @@ static int lprocfs_wr_lfsck_speed_limit(struct file *file, const char *buffer,
+@@ -291,25 +229,22 @@ static int lprocfs_wr_lfsck_speed_limit(struct file *file, const char *buffer,
rc = lfsck_set_speed(mdd->mdd_bottom, val);
return rc != 0 ? rc : count;
}
@@ -929,7 +931,7 @@ index 2573e33..e20324c 100644
__u32 val;
int rc;
-@@ -322,42 +255,76 @@ static int lprocfs_wr_lfsck_async_windows(struct file *file, const char *buffer,
+@@ -320,54 +255,77 @@ static int lprocfs_wr_lfsck_async_windows(struct file *file, const char *buffer,
return rc != 0 ? rc : count;
}
@@ -950,18 +952,11 @@ index 2573e33..e20324c 100644
- return rc;
+ return lfsck_dump(m, mdd->mdd_bottom, LT_NAMESPACE);
}
--
--static struct lprocfs_vars lprocfs_mdd_obd_vars[] = {
-- { "atime_diff", lprocfs_rd_atime_diff, lprocfs_wr_atime_diff, 0 },
-- { "changelog_mask", lprocfs_rd_changelog_mask,
-- lprocfs_wr_changelog_mask, 0 },
-- { "changelog_users", lprocfs_rd_changelog_users, 0, 0},
-- { "sync_permission", lprocfs_rd_sync_perm, lprocfs_wr_sync_perm, 0 },
-- { "lfsck_speed_limit", lprocfs_rd_lfsck_speed_limit,
-- lprocfs_wr_lfsck_speed_limit, 0 },
-- { "lfsck_async_windows", lprocfs_rd_lfsck_async_windows,
-- lprocfs_wr_lfsck_async_windows, 0 },
-- { "lfsck_namespace", lprocfs_rd_lfsck_namespace, 0, 0 },
+
+-static int lprocfs_rd_lfsck_layout(char *page, char **start, off_t off,
+- int count, int *eof, void *data)
+-{
+- struct mdd_device *mdd = data;
+LPROC_SEQ_FOPS_RO(mdd_lfsck_namespace);
+
+static struct lprocfs_seq_vars lprocfs_mdd_obd_vars[] = {
@@ -979,28 +974,38 @@ index 2573e33..e20324c 100644
+ .fops = &mdd_lfsck_async_windows_fops },
+ { .name = "lfsck_namespace",
+ .fops = &mdd_lfsck_namespace_fops },
- { 0 }
- };
++ { 0 }
++};
--static struct lprocfs_vars lprocfs_mdd_module_vars[] = {
-- { "num_refs", lprocfs_rd_numrefs, 0, 0 },
-- { 0 }
--};
--
--void lprocfs_mdd_init_vars(struct lprocfs_static_vars *lvars)
+- LASSERT(mdd != NULL);
+- *eof = 1;
+int mdd_procfs_init(struct mdd_device *mdd, const char *name)
- {
-- lvars->module_vars = lprocfs_mdd_module_vars;
-- lvars->obd_vars = lprocfs_mdd_obd_vars;
++{
+ struct obd_device *obd = class_name2obd(name);
+ struct obd_type *type;
+ int rc;
+ ENTRY;
-+
+
+- return lfsck_dump(mdd->mdd_bottom, page, count, LT_LAYOUT);
+-}
+ /* at the moment there is no linkage between lu_type
+ * and obd_type, so we lookup obd_type this way */
+ type = class_search_type(LUSTRE_MDD_NAME);
-+
+
+-static struct lprocfs_vars lprocfs_mdd_obd_vars[] = {
+- { "atime_diff", lprocfs_rd_atime_diff, lprocfs_wr_atime_diff, 0 },
+- { "changelog_mask", lprocfs_rd_changelog_mask,
+- lprocfs_wr_changelog_mask, 0 },
+- { "changelog_users", lprocfs_rd_changelog_users, 0, 0},
+- { "sync_permission", lprocfs_rd_sync_perm, lprocfs_wr_sync_perm, 0 },
+- { "lfsck_speed_limit", lprocfs_rd_lfsck_speed_limit,
+- lprocfs_wr_lfsck_speed_limit, 0 },
+- { "lfsck_async_windows", lprocfs_rd_lfsck_async_windows,
+- lprocfs_wr_lfsck_async_windows, 0 },
+- { "lfsck_namespace", lprocfs_rd_lfsck_namespace, 0, 0 },
+- { "lfsck_layout", lprocfs_rd_lfsck_layout, 0, 0 },
+- { 0 }
+-};
+ LASSERT(name != NULL);
+ LASSERT(type != NULL);
+ LASSERT(obd != NULL);
@@ -1017,24 +1022,32 @@ index 2573e33..e20324c 100644
+ GOTO(out, rc);
+ }
+ rc = 0;
-+
+
+-static struct lprocfs_vars lprocfs_mdd_module_vars[] = {
+- { "num_refs", lprocfs_rd_numrefs, 0, 0 },
+- { 0 }
+-};
+ EXIT;
+out:
+ if (rc)
+ mdd_procfs_fini(mdd);
+ return rc;
- }
++}
+-void lprocfs_mdd_init_vars(struct lprocfs_static_vars *lvars)
+int mdd_procfs_fini(struct mdd_device *mdd)
-+{
+ {
+- lvars->module_vars = lprocfs_mdd_module_vars;
+- lvars->obd_vars = lprocfs_mdd_obd_vars;
+ if (mdd->mdd_proc_entry) {
+ lprocfs_remove(&mdd->mdd_proc_entry);
+ mdd->mdd_proc_entry = NULL;
+ }
+ RETURN(0);
-+}
+ }
+-
diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c
-index 63d01cc..abe5d71 100644
+index 7cd7870..f9cb944 100644
--- a/lustre/obdclass/lprocfs_status.c
+++ b/lustre/obdclass/lprocfs_status.c
@@ -388,11 +388,10 @@ EXPORT_SYMBOL(lprocfs_evict_client_seq_write);
@@ -1731,7 +1744,7 @@ index e303fd6..1759a7d 100644
{
LASSERT(stats && stats->ls_num >= LPROC_OFD_STATS_LAST);
diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c
-index 3559991..f59f843 100644
+index 6782e5d..1575972 100644
--- a/lustre/ofd/ofd_dev.c
+++ b/lustre/ofd/ofd_dev.c
@@ -240,8 +240,7 @@ static int ofd_process_config(const struct lu_env *env, struct lu_device *d,
@@ -1859,7 +1872,7 @@ index 3559991..f59f843 100644
lprocfs_free_per_client_stats(obd);
lprocfs_obd_cleanup(obd);
lprocfs_free_obd_stats(obd);
-@@ -2363,7 +2358,6 @@ static struct lu_device_type ofd_device_type = {
+@@ -2364,7 +2359,6 @@ static struct lu_device_type ofd_device_type = {
int __init ofd_init(void)
{
@@ -1867,7 +1880,7 @@ index 3559991..f59f843 100644
int rc;
rc = lu_kmem_init(ofd_caches);
-@@ -2376,11 +2370,9 @@ int __init ofd_init(void)
+@@ -2377,11 +2371,9 @@ int __init ofd_init(void)
return(rc);
}
diff --git a/sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch b/sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch
index efaca78f9..febec325b 100644
--- a/sys-cluster/lustre/files/0008-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch
+++ b/sys-cluster/lustre/files/0009-LU-3319-procfs-move-mdt-mds-proc-handling-to-seq_fil.patch
@@ -1,7 +1,7 @@
-From 44996aad332f6a30634b651c6e5fe92c01923090 Mon Sep 17 00:00:00 2001
+From 1013b4b997343de8530c4d4ef5380220d57f155a Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
-Date: Fri, 31 Jan 2014 10:47:37 -0500
-Subject: [PATCH 08/13] LU-3319 procfs: move mdt/mds proc handling to seq_files
+Date: Sun, 9 Feb 2014 11:04:31 -0500
+Subject: [PATCH 09/13] LU-3319 procfs: move mdt/mds proc handling to seq_files
With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the mdt/mds
@@ -461,10 +461,10 @@ index 037bcbd..9bbcbd4 100644
{ 0 }
};
diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c
-index 4c386b1..273cb80 100644
+index 064fef1..c850356 100644
--- a/lustre/mdt/mdt_handler.c
+++ b/lustre/mdt/mdt_handler.c
-@@ -4538,7 +4538,6 @@ static int mdt_process_config(const struct lu_env *env,
+@@ -4539,7 +4539,6 @@ static int mdt_process_config(const struct lu_env *env,
switch (cfg->lcfg_command) {
case LCFG_PARAM: {
@@ -472,7 +472,7 @@ index 4c386b1..273cb80 100644
struct obd_device *obd = d->ld_obd;
/* For interoperability */
-@@ -4573,14 +4572,13 @@ static int mdt_process_config(const struct lu_env *env,
+@@ -4574,14 +4573,13 @@ static int mdt_process_config(const struct lu_env *env,
}
}
@@ -492,7 +492,7 @@ index 4c386b1..273cb80 100644
if (rc > 0 || rc == -ENOSYS)
/* we don't understand; pass it on */
rc = next->ld_ops->ldo_process_config(env, next,
-@@ -5759,7 +5757,6 @@ static struct lu_device_type mdt_device_type = {
+@@ -5762,7 +5760,6 @@ static struct lu_device_type mdt_device_type = {
static int __init mdt_mod_init(void)
{
@@ -500,7 +500,7 @@ index 4c386b1..273cb80 100644
int rc;
CLASSERT(sizeof("0x0123456789ABCDEF:0x01234567:0x01234567") ==
-@@ -5774,10 +5771,9 @@ static int __init mdt_mod_init(void)
+@@ -5777,10 +5774,9 @@ static int __init mdt_mod_init(void)
if (rc)
GOTO(lu_fini, rc);
@@ -557,7 +557,7 @@ index 9a9ce6d..158cced 100644
RETURN(rc);
}
diff --git a/lustre/mdt/mdt_hsm_cdt_requests.c b/lustre/mdt/mdt_hsm_cdt_requests.c
-index 796cbea..7bbc771 100644
+index 1300861..3125dcc 100644
--- a/lustre/mdt/mdt_hsm_cdt_requests.c
+++ b/lustre/mdt/mdt_hsm_cdt_requests.c
@@ -569,15 +569,12 @@ static int lprocfs_open_hsm_active_requests(struct inode *inode,
diff --git a/sys-cluster/lustre/files/0010-LU-3319-procfs-update-ldiskfs-proc-handling-to-seq_f.patch b/sys-cluster/lustre/files/0010-LU-3319-procfs-update-ldiskfs-proc-handling-to-seq_f.patch
index acfa04f0f..0be7f2aaf 100644
--- a/sys-cluster/lustre/files/0010-LU-3319-procfs-update-ldiskfs-proc-handling-to-seq_f.patch
+++ b/sys-cluster/lustre/files/0010-LU-3319-procfs-update-ldiskfs-proc-handling-to-seq_f.patch
@@ -1,11 +1,12 @@
-From 5a0b800373ce5e05f6ac64686e6381f7d2706044 Mon Sep 17 00:00:00 2001
+From adf3be9fe382564c4760b83a5843b7d5502bbe48 Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
-Date: Fri, 31 Jan 2014 10:38:14 -0500
+Date: Sun, 9 Feb 2014 10:45:37 -0500
Subject: [PATCH 10/13] LU-3319 procfs: update ldiskfs proc handling to
seq_files
Migrate all ldiskfs proc handling to using strictly
-seq_files.
+seq_files. Also include a fix with newer gcc complaining
+certain variables are initialized.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia296a4682e2feda02bcfbe0100de8a89404cd731
@@ -13,9 +14,9 @@ Change-Id: Ia296a4682e2feda02bcfbe0100de8a89404cd731
lustre/osd-ldiskfs/osd_compat.c | 6 +-
lustre/osd-ldiskfs/osd_handler.c | 16 +-
lustre/osd-ldiskfs/osd_internal.h | 6 +-
- lustre/osd-ldiskfs/osd_lproc.c | 338 ++++++++++++++++++++------------------
- lustre/osd-ldiskfs/osd_scrub.c | 73 +++-----
- 5 files changed, 222 insertions(+), 217 deletions(-)
+ lustre/osd-ldiskfs/osd_lproc.c | 336 ++++++++++++++++++++------------------
+ lustre/osd-ldiskfs/osd_scrub.c | 73 +++------
+ 5 files changed, 220 insertions(+), 217 deletions(-)
diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c
index b4a018c..6ca1304 100644
@@ -116,7 +117,7 @@ index 8436d1f..c90147f 100644
int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
obd_seq seq, struct lu_seq_range *range);
diff --git a/lustre/osd-ldiskfs/osd_lproc.c b/lustre/osd-ldiskfs/osd_lproc.c
-index b9b4e3d..67f3423 100644
+index b9b4e3d..947a4b9 100644
--- a/lustre/osd-ldiskfs/osd_lproc.c
+++ b/lustre/osd-ldiskfs/osd_lproc.c
@@ -237,92 +237,46 @@ out:
@@ -468,7 +469,7 @@ index b9b4e3d..67f3423 100644
int val;
int rc;
-@@ -544,38 +502,104 @@ static int lprocfs_osd_wr_lma_self_repair(struct file *file, const char *buffer,
+@@ -544,38 +502,102 @@ static int lprocfs_osd_wr_lma_self_repair(struct file *file, const char *buffer,
dev->od_lma_self_repair = !!val;
return count;
}
@@ -595,10 +596,8 @@ index b9b4e3d..67f3423 100644
+ if (osd->od_stats)
+ lprocfs_free_stats(&osd->od_stats);
+
-+ if (osd->od_proc_entry) {
++ if (osd->od_proc_entry)
+ lprocfs_remove(&osd->od_proc_entry);
-+ osd->od_proc_entry = NULL;
-+ }
+ RETURN(0);
+}
#endif
diff --git a/sys-cluster/lustre/files/0002-LU-3319-lprocfs-client-side-cleanups.patch b/sys-cluster/lustre/files/0011-LU-3319-lprocfs-client-side-cleanups.patch
index 5dd4981ab..b3ff994d1 100644
--- a/sys-cluster/lustre/files/0002-LU-3319-lprocfs-client-side-cleanups.patch
+++ b/sys-cluster/lustre/files/0011-LU-3319-lprocfs-client-side-cleanups.patch
@@ -1,7 +1,7 @@
-From cc1b44ff52af1f78705c18169e951b2b626906b4 Mon Sep 17 00:00:00 2001
+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 02/13] LU-3319 lprocfs: client side cleanups
+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
@@ -251,10 +251,10 @@ index 648b6e5..f818def 100644
};
#endif /* LPROCFS */
diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c
-index 7cd7870..63d01cc 100644
+index f9cb944..abe5d71 100644
--- a/lustre/obdclass/lprocfs_status.c
+++ b/lustre/obdclass/lprocfs_status.c
-@@ -2582,7 +2582,6 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats)
+@@ -2581,7 +2581,6 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats)
EXPORT_SYMBOL(lprocfs_init_ldlm_stats);
#ifdef HAVE_SERVER_SUPPORT
diff --git a/sys-cluster/lustre/files/0011-LU-3373-osd-ldiskfs-readdir-replace-by-iterate.patch b/sys-cluster/lustre/files/0011-LU-3373-osd-ldiskfs-readdir-replace-by-iterate.patch
deleted file mode 100644
index 3b1a7e51e..000000000
--- a/sys-cluster/lustre/files/0011-LU-3373-osd-ldiskfs-readdir-replace-by-iterate.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 508cde3f8347e7d6a6d299cbdfce537ebc29650c Mon Sep 17 00:00:00 2001
-From: yangsheng <yang.sheng@intel.com>
-Date: Fri, 8 Nov 2013 22:31:36 +0800
-Subject: [PATCH 11/13] LU-3373 osd-ldiskfs: readdir replace by iterate
-
-Use iterate instead of readdir callback in iop.
-
-Signed-off-by: yang sheng <yang.sheng@intel.com>
-Change-Id: Icb08292009c965ca693814e854ae2e77b3e7a4f0
----
- lustre/osd-ldiskfs/osd_handler.c | 32 +++++++++++++++++++++++++-------
- lustre/osd-ldiskfs/osd_scrub.c | 18 +++++++++++++++++-
- 2 files changed, 42 insertions(+), 8 deletions(-)
-
-diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c
-index dfaa542..f635394 100644
---- a/lustre/osd-ldiskfs/osd_handler.c
-+++ b/lustre/osd-ldiskfs/osd_handler.c
-@@ -4733,6 +4733,12 @@ static void osd_it_ea_put(const struct lu_env *env, struct dt_it *di)
- {
- }
-
-+struct osd_filldir_cbs {
-+#ifdef HAVE_DIR_CONTEXT
-+ struct dir_context ctx;
-+#endif
-+ struct osd_it_ea *it;
-+};
- /**
- * It is called internally by ->readdir(). It fills the
- * iterator's in-memory data structure with required
-@@ -4744,11 +4750,11 @@ static void osd_it_ea_put(const struct lu_env *env, struct dt_it *di)
- * \retval 0 on success
- * \retval 1 on buffer full
- */
--static int osd_ldiskfs_filldir(char *buf, const char *name, int namelen,
-+static int osd_ldiskfs_filldir(void *buf, const char *name, int namelen,
- loff_t offset, __u64 ino,
- unsigned d_type)
- {
-- struct osd_it_ea *it = (struct osd_it_ea *)buf;
-+ struct osd_it_ea *it = ((struct osd_filldir_cbs *)buf)->it;
- struct osd_object *obj = it->oie_obj;
- struct osd_it_ea_dirent *ent = it->oie_dirent;
- struct lu_fid *fid = &ent->oied_fid;
-@@ -4811,7 +4817,14 @@ static int osd_ldiskfs_it_fill(const struct lu_env *env,
- struct osd_object *obj = it->oie_obj;
- struct inode *inode = obj->oo_inode;
- struct htree_lock *hlock = NULL;
-- int result = 0;
-+ struct file *filp = &it->oie_file;
-+ int rc = 0;
-+ struct osd_filldir_cbs buf = {
-+#ifdef HAVE_DIR_CONTEXT
-+ .ctx.actor = osd_ldiskfs_filldir,
-+#endif
-+ .it = it
-+ };
-
- ENTRY;
- it->oie_dirent = it->oie_buf;
-@@ -4825,8 +4838,13 @@ static int osd_ldiskfs_it_fill(const struct lu_env *env,
- down_read(&obj->oo_ext_idx_sem);
- }
-
-- result = inode->i_fop->readdir(&it->oie_file, it,
-- (filldir_t) osd_ldiskfs_filldir);
-+#ifdef HAVE_DIR_CONTEXT
-+ buf.ctx.pos = filp->f_pos;
-+ rc = inode->i_fop->iterate(filp, &buf.ctx);
-+ filp->f_pos = buf.ctx.pos;
-+#else
-+ rc = inode->i_fop->readdir(filp, &buf, osd_ldiskfs_filldir);
-+#endif
-
- if (hlock != NULL)
- ldiskfs_htree_unlock(hlock);
-@@ -4834,13 +4852,13 @@ static int osd_ldiskfs_it_fill(const struct lu_env *env,
- up_read(&obj->oo_ext_idx_sem);
-
- if (it->oie_rd_dirent == 0) {
-- result = -EIO;
-+ rc = -EIO;
- } else {
- it->oie_dirent = it->oie_buf;
- it->oie_it_dirent = 1;
- }
-
-- RETURN(result);
-+ RETURN(rc);
- }
-
- /**
-diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c
-index 1002913..8d19c1e 100644
---- a/lustre/osd-ldiskfs/osd_scrub.c
-+++ b/lustre/osd-ldiskfs/osd_scrub.c
-@@ -1465,6 +1465,10 @@ struct osd_ios_item {
- };
-
- struct osd_ios_filldir_buf {
-+#ifdef HAVE_DIR_CONTEXT
-+ /* please keep it as first member */
-+ struct dir_context ctx;
-+#endif
- struct osd_thread_info *oifb_info;
- struct osd_device *oifb_dev;
- struct dentry *oifb_dentry;
-@@ -1760,7 +1764,13 @@ static int
- osd_ios_general_scan(struct osd_thread_info *info, struct osd_device *dev,
- struct dentry *dentry, filldir_t filldir)
- {
-- struct osd_ios_filldir_buf buf = { info, dev, dentry };
-+ struct osd_ios_filldir_buf buf = {
-+#ifdef HAVE_DIR_CONTEXT
-+ .ctx.actor = filldir,
-+#endif
-+ .oifb_info = info,
-+ .oifb_dev = dev,
-+ .oifb_dentry = dentry };
- struct file *filp = &info->oti_it_ea.oie_file;
- struct inode *inode = dentry->d_inode;
- const struct file_operations *fops = inode->i_fop;
-@@ -1777,7 +1787,13 @@ osd_ios_general_scan(struct osd_thread_info *info, struct osd_device *dev,
- filp->private_data = NULL;
- set_file_inode(filp, inode);
-
-+#ifdef HAVE_DIR_CONTEXT
-+ buf.ctx.pos = filp->f_pos;
-+ rc = fops->iterate(filp, &buf.ctx);
-+ filp->f_pos = buf.ctx.pos;
-+#else
- rc = fops->readdir(filp, &buf, filldir);
-+#endif
- fops->release(inode, filp);
-
- RETURN(rc);
---
-1.8.5.3
-
diff --git a/sys-cluster/lustre/files/0012-LU-3974-llite-use-new-struct-dir_context.patch b/sys-cluster/lustre/files/0012-LU-3974-llite-use-new-struct-dir_context.patch
index 29696dd1c..7a5b843e3 100644
--- a/sys-cluster/lustre/files/0012-LU-3974-llite-use-new-struct-dir_context.patch
+++ b/sys-cluster/lustre/files/0012-LU-3974-llite-use-new-struct-dir_context.patch
@@ -1,4 +1,4 @@
-From a93c1a0d6dfaa1a17e0806c5a3f71996af15fb20 Mon Sep 17 00:00:00 2001
+From da6a877ec27753ce11499d1bde68d392f90179c4 Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Mon, 20 Jan 2014 21:23:00 -0500
Subject: [PATCH 12/13] LU-3974 llite: use new struct dir_context
@@ -9,6 +9,9 @@ kernel a new struct dir_context was introduced to
minimize the impact of future expansion. This patch
addresses this change.
+Conflicts:
+ lustre/llite/dir.c
+
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib42bf8cb06635a2a64e63b294d79e66ac82a1a5b
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
@@ -181,7 +184,7 @@ index dc5d623..5009934 100644
+ .fsync = ll_fsync,
};
diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h
-index 5c22795..251a218 100644
+index 92b278e..c477b4c 100644
--- a/lustre/llite/llite_internal.h
+++ b/lustre/llite/llite_internal.h
@@ -91,9 +91,12 @@ extern struct file_operations ll_pgcache_seq_fops;
@@ -200,7 +203,7 @@ index 5c22795..251a218 100644
};
/* llite setxid/access permission for user on remote client */
-@@ -718,8 +721,13 @@ static void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) {}
+@@ -719,8 +722,13 @@ static void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) {}
/* llite/dir.c */
extern struct file_operations ll_dir_operations;
extern struct inode_operations ll_dir_inode_operations;
diff --git a/sys-cluster/lustre/files/0013-LU-3974-llite-invalidatepage-api-changed.patch b/sys-cluster/lustre/files/0013-LU-3974-llite-invalidatepage-api-changed.patch
index 2886b55de..ccca80629 100644
--- a/sys-cluster/lustre/files/0013-LU-3974-llite-invalidatepage-api-changed.patch
+++ b/sys-cluster/lustre/files/0013-LU-3974-llite-invalidatepage-api-changed.patch
@@ -1,4 +1,4 @@
-From 48a712836dff9f15b8d17b9e34caa6acfebf22ce Mon Sep 17 00:00:00 2001
+From 4e78aa55c404914cdc2d01060fb73fc1b0a6b63e Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Tue, 24 Sep 2013 12:29:47 -0400
Subject: [PATCH 13/13] LU-3974 llite: invalidatepage api changed
@@ -88,7 +88,7 @@ index 747bd4d..5b7bab6 100644
#endif /* !HAVE_TRUNCATE_COMPLETE_PAGE */
diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c
-index 9365c74..bee7996 100644
+index 447dc43..77151de 100644
--- a/lustre/llite/rw26.c
+++ b/lustre/llite/rw26.c
@@ -76,7 +76,13 @@