aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2014-05-25 02:54:14 +0400
committerAlexey Shvetsov <alexxy@gentoo.org>2014-05-25 02:54:14 +0400
commit8a419db4e78dfe0801ecf5f43f5bb29fdcdb59f7 (patch)
treefb2bfcf8e336f2a4118756a7e9b456d3e6efc049 /sys-cluster
parentFix dependency on eselect (diff)
downloadsci-8a419db4e78dfe0801ecf5f43f5bb29fdcdb59f7.tar.gz
sci-8a419db4e78dfe0801ecf5f43f5bb29fdcdb59f7.tar.bz2
sci-8a419db4e78dfe0801ecf5f43f5bb29fdcdb59f7.zip
Update lustre patches
Package-Manager: portage-2.2.10 RepoMan-Options: --force
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/lustre/ChangeLog12
-rw-r--r--sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch123
-rw-r--r--sys-cluster/lustre/files/0001-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch (renamed from sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch)4
-rw-r--r--sys-cluster/lustre/files/0002-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch (renamed from sys-cluster/lustre/files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch)4
-rw-r--r--sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch842
-rw-r--r--sys-cluster/lustre/files/0003-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch (renamed from sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch)4
-rw-r--r--sys-cluster/lustre/lustre-9999.ebuild8
7 files changed, 21 insertions, 976 deletions
diff --git a/sys-cluster/lustre/ChangeLog b/sys-cluster/lustre/ChangeLog
index 257e94a3f..8014a144b 100644
--- a/sys-cluster/lustre/ChangeLog
+++ b/sys-cluster/lustre/ChangeLog
@@ -2,6 +2,18 @@
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 24 May 2014; Alexey Shvetsov <alexxy@gentoo.org>
+ +files/0001-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch,
+ +files/0002-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch,
+ +files/0003-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch,
+ -files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch,
+ -files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch,
+ -files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch,
+ -files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch,
+ -files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch,
+ lustre-9999.ebuild:
+ Update lustre patches
+
20 May 2014; Alexey Shvetsov <alexxy@gentoo.org>
+files/0004-LU-2096-lprocfs-symlinks-for-forward-compatibility.patch,
+files/0005-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch,
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
deleted file mode 100644
index 326e02be9..000000000
--- a/sys-cluster/lustre/files/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From d6775461847a80d82de476b78fc2322702c516af Mon Sep 17 00:00:00 2001
-From: James Simmons <uja.ornl@gmail.com>
-Date: Tue, 25 Feb 2014 12:54:05 -0500
-Subject: [PATCH 1/5] LU-3319 procfs: Move NRS TBF proc handling to seq_files
-
-With newer kernels moving their proc file system handling
-to seq_files this patch migrates the proc handling for NRS
-TBF to this new approach.
-
-Change-Id: I121755b611296bf7b9527de65d0e6cf8c4980151
-Signed-off-by: James Simmons <uja.ornl@gmail.com>
----
- lustre/ptlrpc/nrs_tbf.c | 35 ++++++++++++++---------------------
- 1 file changed, 14 insertions(+), 21 deletions(-)
-
-diff --git a/lustre/ptlrpc/nrs_tbf.c b/lustre/ptlrpc/nrs_tbf.c
-index f0ab74d..046e509 100644
---- a/lustre/ptlrpc/nrs_tbf.c
-+++ b/lustre/ptlrpc/nrs_tbf.c
-@@ -1572,30 +1572,26 @@ static void nrs_tbf_req_stop(struct ptlrpc_nrs_policy *policy,
- */
- #define LPROCFS_NRS_RATE_MAX 65535
-
--static int ptlrpc_lprocfs_rd_nrs_tbf_rule(char *page, char **start,
-- off_t off, int count, int *eof,
-- void *data)
-+static int
-+ptlrpc_lprocfs_nrs_tbf_rule_seq_show(struct seq_file *m, void *data)
- {
-- struct ptlrpc_service *svc = data;
-+ struct ptlrpc_service *svc = m->private;
- int rc;
- int rc2;
- struct nrs_tbf_dump dump;
-
-- rc2 = snprintf(page, count, "regular_requests:\n");
-+ rc2 = seq_printf(m, "regular_requests:\n");
- /**
- * Perform two separate calls to this as only one of the NRS heads'
- * policies may be in the ptlrpc_nrs_pol_state::NRS_POL_STATE_STARTED or
- * ptlrpc_nrs_pol_state::NRS_POL_STATE_STOPPING state.
- */
- dump.td_length = 0;
-- dump.td_buff = page + rc2;
-- dump.td_size = count - rc2;
- rc = ptlrpc_nrs_policy_control(svc, PTLRPC_NRS_QUEUE_REG,
- NRS_POL_NAME_TBF,
- NRS_CTL_TBF_RD_RULE,
- false, &dump);
- if (rc == 0) {
-- *eof = 1;
- rc2 += dump.td_length;
- /**
- * Ignore -ENODEV as the regular NRS head's policy may be in the
-@@ -1608,16 +1604,13 @@ static int ptlrpc_lprocfs_rd_nrs_tbf_rule(char *page, char **start,
- if (!nrs_svc_has_hp(svc))
- goto no_hp;
-
-- rc2 += snprintf(page + rc2, count - rc2, "high_priority_requests:\n");
-+ rc2 += seq_printf(m, "high_priority_requests:\n");
- dump.td_length = 0;
-- dump.td_buff = page + rc2;
-- dump.td_size = count - rc2;
- rc = ptlrpc_nrs_policy_control(svc, PTLRPC_NRS_QUEUE_HP,
- NRS_POL_NAME_TBF,
- NRS_CTL_TBF_RD_RULE,
- false, &dump);
- if (rc == 0) {
-- *eof = 1;
- rc2 += dump.td_length;
- /**
- * Ignore -ENODEV as the high priority NRS head's policy may be
-@@ -1762,11 +1755,12 @@ out:
-
- extern struct nrs_core nrs_core;
- #define LPROCFS_WR_NRS_TBF_MAX_CMD (4096)
--static int ptlrpc_lprocfs_wr_nrs_tbf_rule(struct file *file,
-- const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+ptlrpc_lprocfs_nrs_tbf_rule_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct ptlrpc_service *svc = data;
-+ struct seq_file *m = file->private_data;
-+ struct ptlrpc_service *svc = m->private;
- char *kernbuf;
- char *val;
- int rc;
-@@ -1830,7 +1824,7 @@ out_free_kernbuff:
- out:
- return rc ? rc : count;
- }
--
-+LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs_tbf_rule);
-
- /**
- * Initializes a TBF policy's lprocfs interface for service \a svc
-@@ -1843,10 +1837,9 @@ out:
- int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc)
- {
- int rc;
-- struct lprocfs_vars nrs_tbf_lprocfs_vars[] = {
-+ struct lprocfs_seq_vars nrs_tbf_lprocfs_vars[] = {
- { .name = "nrs_tbf_rule",
-- .read_fptr = ptlrpc_lprocfs_rd_nrs_tbf_rule,
-- .write_fptr = ptlrpc_lprocfs_wr_nrs_tbf_rule,
-+ .fops = &ptlrpc_lprocfs_nrs_tbf_rule_fops,
- .data = svc },
- { NULL }
- };
-@@ -1854,7 +1847,7 @@ int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc)
- if (svc->srv_procroot == NULL)
- return 0;
-
-- rc = lprocfs_add_vars(svc->srv_procroot, nrs_tbf_lprocfs_vars, NULL);
-+ rc = lprocfs_seq_add_vars(svc->srv_procroot, nrs_tbf_lprocfs_vars, NULL);
-
- return rc;
- }
---
-1.9.3
-
diff --git a/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch b/sys-cluster/lustre/files/0001-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
index bcaa4346c..88ac650bb 100644
--- a/sys-cluster/lustre/files/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
+++ b/sys-cluster/lustre/files/0001-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch
@@ -1,7 +1,7 @@
-From c16260bdb1cd63a50d37f2161279fc71b9e03efb Mon Sep 17 00:00:00 2001
+From f7db8753694155124caf9d05137bbad14434c4f0 Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Wed, 23 Apr 2014 09:31:09 -0400
-Subject: [PATCH 2/5] LU-3319 procfs: update zfs proc handling to seq_files
+Subject: [PATCH 1/3] 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-mdd-ofd-proc-handling-to-seq_fil.patch b/sys-cluster/lustre/files/0002-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
index 95b5c9008..b66850f0f 100644
--- a/sys-cluster/lustre/files/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
+++ b/sys-cluster/lustre/files/0002-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch
@@ -1,7 +1,7 @@
-From 46c87e9a30b44d31a2551217da6818ffbb5eed02 Mon Sep 17 00:00:00 2001
+From c988772aa72b546f5b40187e964aac101e764f2e Mon Sep 17 00:00:00 2001
From: James Simmons <uja.ornl@gmail.com>
Date: Mon, 5 May 2014 10:02:21 -0400
-Subject: [PATCH 4/5] LU-3319 procfs: move mdd/ofd proc handling to seq_files
+Subject: [PATCH 2/3] 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
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
deleted file mode 100644
index 969c229a8..000000000
--- a/sys-cluster/lustre/files/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch
+++ /dev/null
@@ -1,842 +0,0 @@
-From 63f3f2e29c2745b3491712a4a3f7a868ec6ece8d Mon Sep 17 00:00:00 2001
-From: James Simmons <uja.ornl@gmail.com>
-Date: Thu, 24 Apr 2014 12:04:57 -0400
-Subject: [PATCH 3/5] LU-3319 procfs: move osp proc handling to seq_files
-
-With 3.10 linux kernel and above proc handling now only
-uses struct seq_files. This patch migrates the osp
-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 | 431 ++++++++++++++++++++++++----------------------
- lustre/osp/lwp_dev.c | 19 +-
- lustre/osp/osp_dev.c | 32 ++--
- lustre/osp/osp_internal.h | 2 -
- 4 files changed, 242 insertions(+), 242 deletions(-)
-
-diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c
-index 118c4df..c23ce18 100644
---- a/lustre/osp/lproc_osp.c
-+++ b/lustre/osp/lproc_osp.c
-@@ -45,24 +45,24 @@
- #include "osp_internal.h"
-
- #ifdef LPROCFS
--static int osp_rd_active(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_active_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- int rc;
-
- LPROCFS_CLIMP_CHECK(dev);
-- rc = snprintf(page, count, "%d\n",
-- !dev->u.cli.cl_import->imp_deactive);
-+ rc = seq_printf(m, "%d\n", !dev->u.cli.cl_import->imp_deactive);
- LPROCFS_CLIMP_EXIT(dev);
- return rc;
- }
-
--static int osp_wr_active(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_active_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *dev = data;
-- int val, rc;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *dev = m->private;
-+ int val, rc;
-
- rc = lprocfs_write_helper(buffer, count, &val);
- if (rc)
-@@ -81,67 +81,61 @@ static int osp_wr_active(struct file *file, const char *buffer,
- LPROCFS_CLIMP_EXIT(dev);
- return count;
- }
-+LPROC_SEQ_FOPS(osp_active);
-
--static int osp_rd_syn_in_flight(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_syn_in_flight_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%u\n", osp->opd_syn_rpc_in_flight);
-- return rc;
-+ return seq_printf(m, "%u\n", osp->opd_syn_rpc_in_flight);
- }
-+LPROC_SEQ_FOPS_RO(osp_syn_in_flight);
-
--static int osp_rd_syn_in_prog(char *page, char **start, off_t off, int count,
-- int *eof, void *data)
-+static int osp_syn_in_prog_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%u\n", osp->opd_syn_rpc_in_progress);
-- return rc;
-+ return seq_printf(m, "%u\n", osp->opd_syn_rpc_in_progress);
- }
-+LPROC_SEQ_FOPS_RO(osp_syn_in_prog);
-
--static int osp_rd_syn_changes(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_syn_changes_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%lu\n", osp->opd_syn_changes);
-- return rc;
-+ return seq_printf(m, "%lu\n", osp->opd_syn_changes);
- }
-+LPROC_SEQ_FOPS_RO(osp_syn_changes);
-
--static int osp_rd_max_rpcs_in_flight(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_max_rpcs_in_flight_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%u\n", osp->opd_syn_max_rpc_in_flight);
-- return rc;
-+ return seq_printf(m, "%u\n", osp->opd_syn_max_rpc_in_flight);
- }
-
--static int osp_wr_max_rpcs_in_flight(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_max_rpcs_in_flight_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *dev = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
- int val, rc;
-
-@@ -158,25 +152,25 @@ static int osp_wr_max_rpcs_in_flight(struct file *file, const char *buffer,
- osp->opd_syn_max_rpc_in_flight = val;
- return count;
- }
-+LPROC_SEQ_FOPS(osp_max_rpcs_in_flight);
-
--static int osp_rd_max_rpcs_in_prog(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_max_rpcs_in_prog_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%u\n", osp->opd_syn_max_rpc_in_progress);
-- return rc;
-+ return seq_printf(m, "%u\n", osp->opd_syn_max_rpc_in_progress);
- }
-
--static int osp_wr_max_rpcs_in_prog(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_max_rpcs_in_prog_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *dev = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
- int val, rc;
-
-@@ -194,23 +188,25 @@ static int osp_wr_max_rpcs_in_prog(struct file *file, const char *buffer,
-
- return count;
- }
-+LPROC_SEQ_FOPS(osp_max_rpcs_in_prog);
-
--static int osp_rd_create_count(char *page, char **start, off_t off, int count,
-- int *eof, void *data)
-+static int osp_create_count_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, "%d\n", osp->opd_pre_grow_count);
-+ return seq_printf(m, "%d\n", osp->opd_pre_grow_count);
- }
-
--static int osp_wr_create_count(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_create_count_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *obd = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- int val, rc, i;
-
-@@ -242,23 +238,25 @@ static int osp_wr_create_count(struct file *file, const char *buffer,
-
- return count;
- }
-+LPROC_SEQ_FOPS(osp_create_count);
-
--static int osp_rd_max_create_count(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_max_create_count_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, "%d\n", osp->opd_pre_max_grow_count);
-+ return seq_printf(m, "%d\n", osp->opd_pre_max_grow_count);
- }
-
--static int osp_wr_max_create_count(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_max_create_count_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *obd = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- int val, rc;
-
-@@ -281,89 +279,86 @@ static int osp_wr_max_create_count(struct file *file, const char *buffer,
-
- return count;
- }
-+LPROC_SEQ_FOPS(osp_max_create_count);
-
--static int osp_rd_prealloc_next_id(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_prealloc_next_id_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, "%u\n",
-- fid_oid(&osp->opd_pre_used_fid) + 1);
-+ return seq_printf(m, "%u\n", fid_oid(&osp->opd_pre_used_fid) + 1);
- }
-+LPROC_SEQ_FOPS_RO(osp_prealloc_next_id);
-
--static int osp_rd_prealloc_last_id(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_prealloc_last_id_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, "%u\n",
-- fid_oid(&osp->opd_pre_last_created_fid));
-+ return seq_printf(m, "%u\n", fid_oid(&osp->opd_pre_last_created_fid));
- }
-+LPROC_SEQ_FOPS_RO(osp_prealloc_last_id);
-
--static int osp_rd_prealloc_next_seq(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_prealloc_next_seq_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, LPX64"\n",
-- fid_seq(&osp->opd_pre_used_fid));
-+ return seq_printf(m, LPX64"\n", fid_seq(&osp->opd_pre_used_fid));
- }
-+LPROC_SEQ_FOPS_RO(osp_prealloc_next_seq);
-
--static int osp_rd_prealloc_last_seq(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_prealloc_last_seq_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, LPX64"\n",
-+ return seq_printf(m, LPX64"\n",
- fid_seq(&osp->opd_pre_last_created_fid));
- }
-+LPROC_SEQ_FOPS_RO(osp_prealloc_last_seq);
-
--static int osp_rd_prealloc_reserved(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_prealloc_reserved_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *obd = data;
-+ struct obd_device *obd = m->private;
- struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
-
- if (osp == NULL || osp->opd_pre == NULL)
- return 0;
-
-- return snprintf(page, count, LPU64"\n", osp->opd_pre_reserved);
-+ return seq_printf(m, LPU64"\n", osp->opd_pre_reserved);
- }
-+LPROC_SEQ_FOPS_RO(osp_prealloc_reserved);
-
--static int osp_rd_maxage(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_maxage_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%u\n", osp->opd_statfs_maxage);
-- return rc;
-+ return seq_printf(m, "%u\n", osp->opd_statfs_maxage);
- }
-
--static int osp_wr_maxage(struct file *file, const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_maxage_seq_write(struct file *file, const char *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *dev = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
- int val, rc;
-
-@@ -381,25 +376,23 @@ static int osp_wr_maxage(struct file *file, const char *buffer,
-
- return count;
- }
-+LPROC_SEQ_FOPS(osp_maxage);
-
--static int osp_rd_pre_status(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_pre_status_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL || osp->opd_pre == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%d\n", osp->opd_pre_status);
-- return rc;
-+ return seq_printf(m, "%d\n", osp->opd_pre_status);
- }
-+LPROC_SEQ_FOPS_RO(osp_pre_status);
-
--static int osp_rd_destroys_in_flight(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_destroys_in_flight_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-
- if (osp == NULL)
-@@ -411,43 +404,40 @@ static int osp_rd_destroys_in_flight(char *page, char **start, off_t off,
- * - sync changes are zero - no llog records
- * - sync in progress are zero - no RPCs in flight
- */
-- return snprintf(page, count, "%lu\n",
-- osp->opd_syn_rpc_in_progress + osp->opd_syn_changes);
-+ return seq_printf(m, "%lu\n",
-+ osp->opd_syn_rpc_in_progress + osp->opd_syn_changes);
- }
-+LPROC_SEQ_FOPS_RO(osp_destroys_in_flight);
-
--static int osp_rd_old_sync_processed(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int osp_old_sync_processed_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
-- int rc;
-
- if (osp == NULL)
- return -EINVAL;
-
-- rc = snprintf(page, count, "%d\n", osp->opd_syn_prev_done);
-- return rc;
-+ return seq_printf(m, "%d\n", osp->opd_syn_prev_done);
- }
-+LPROC_SEQ_FOPS_RO(osp_old_sync_processed);
-
--static int osp_rd_lfsck_max_rpcs_in_flight(char *page, char **start, off_t off,
-- int count, int *eof, void *data)
-+static int
-+osp_lfsck_max_rpcs_in_flight_seq_show(struct seq_file *m, void *data)
- {
-- struct obd_device *dev = data;
-+ struct obd_device *dev = m->private;
- __u32 max;
-- int rc;
-
-- *eof = 1;
- max = obd_get_max_rpcs_in_flight(&dev->u.cli);
-- rc = snprintf(page, count, "%u\n", max);
--
-- return rc;
-+ return seq_printf(m, "%u\n", max);
- }
-
--static int osp_wr_lfsck_max_rpcs_in_flight(struct file *file,
-- const char *buffer,
-- unsigned long count, void *data)
-+static ssize_t
-+osp_lfsck_max_rpcs_in_flight_seq_write(struct file *file,
-+ const char __user *buffer,
-+ size_t count, loff_t *off)
- {
-- struct obd_device *dev = data;
-+ struct seq_file *m = file->private_data;
-+ struct obd_device *dev = m->private;
- int val;
- int rc;
-
-@@ -460,111 +450,148 @@ static int osp_wr_lfsck_max_rpcs_in_flight(struct file *file,
-
- return count;
- }
-+LPROC_SEQ_FOPS(osp_lfsck_max_rpcs_in_flight);
-
--static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
-- { "uuid", lprocfs_rd_uuid, 0, 0 },
-- { "ping", 0, lprocfs_wr_ping, 0, 0, 0222 },
-- { "connect_flags", lprocfs_rd_connect_flags, 0, 0 },
-- { "ost_server_uuid", lprocfs_rd_server_uuid, 0, 0 },
-- { "ost_conn_uuid", lprocfs_rd_conn_uuid, 0, 0 },
-- { "active", osp_rd_active, osp_wr_active, 0 },
-- { "max_rpcs_in_flight", osp_rd_max_rpcs_in_flight,
-- osp_wr_max_rpcs_in_flight, 0 },
-- { "max_rpcs_in_progress", osp_rd_max_rpcs_in_prog,
-- osp_wr_max_rpcs_in_prog, 0 },
-- { "create_count", osp_rd_create_count,
-- osp_wr_create_count, 0 },
-- { "max_create_count", osp_rd_max_create_count,
-- osp_wr_max_create_count, 0 },
-- { "prealloc_next_id", osp_rd_prealloc_next_id, 0, 0 },
-- { "prealloc_next_seq", osp_rd_prealloc_next_seq, 0, 0 },
-- { "prealloc_last_id", osp_rd_prealloc_last_id, 0, 0 },
-- { "prealloc_last_seq", osp_rd_prealloc_last_seq, 0, 0 },
-- { "prealloc_reserved", osp_rd_prealloc_reserved, 0, 0 },
-- { "timeouts", lprocfs_rd_timeouts, 0, 0 },
-- { "import", lprocfs_rd_import, lprocfs_wr_import, 0 },
-- { "state", lprocfs_rd_state, 0, 0 },
-- { "maxage", osp_rd_maxage, osp_wr_maxage, 0 },
-- { "prealloc_status", osp_rd_pre_status, 0, 0 },
-- { "sync_changes", osp_rd_syn_changes, 0, 0 },
-- { "sync_in_flight", osp_rd_syn_in_flight, 0, 0 },
-- { "sync_in_progress", osp_rd_syn_in_prog, 0, 0 },
-- { "old_sync_processed", osp_rd_old_sync_processed, 0, 0 },
-+LPROC_SEQ_FOPS_WO_TYPE(osp, ping);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, uuid);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, connect_flags);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, server_uuid);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, conn_uuid);
-
-- /* for compatibility reasons */
-- { "destroys_in_flight", osp_rd_destroys_in_flight, 0, 0 },
-- { "lfsck_max_rpcs_in_flight", osp_rd_lfsck_max_rpcs_in_flight,
-- osp_wr_lfsck_max_rpcs_in_flight, 0 },
-- { 0 }
--};
-+static int osp_max_pages_per_rpc_seq_show(struct seq_file *m, void *v)
-+{
-+ return lprocfs_obd_max_pages_per_rpc_seq_show(m, m->private);
-+}
-+LPROC_SEQ_FOPS_RO(osp_max_pages_per_rpc);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, timeouts);
-+
-+LPROC_SEQ_FOPS_RW_TYPE(osp, import);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, state);
-+
-+static struct lprocfs_seq_vars lprocfs_osp_obd_vars[] = {
-+ { .name = "uuid",
-+ .fops = &osp_uuid_fops },
-+ { .name = "ping",
-+ .fops = &osp_ping_fops,
-+ .proc_mode = 0222 },
-+ { .name = "connect_flags",
-+ .fops = &osp_connect_flags_fops },
-+ { .name = "ost_server_uuid",
-+ .fops = &osp_server_uuid_fops },
-+ { .name = "ost_conn_uuid",
-+ .fops = &osp_conn_uuid_fops },
-+ { .name = "active",
-+ .fops = &osp_active_fops },
-+ { .name = "max_rpcs_in_flight",
-+ .fops = &osp_max_rpcs_in_flight_fops },
-+ { .name = "max_rpcs_in_progress",
-+ .fops = &osp_max_rpcs_in_prog_fops },
-+ { .name = "create_count",
-+ .fops = &osp_create_count_fops },
-+ { .name = "max_create_count",
-+ .fops = &osp_max_create_count_fops },
-+ { .name = "prealloc_next_id",
-+ .fops = &osp_prealloc_next_id_fops },
-+ { .name = "prealloc_next_seq",
-+ .fops = &osp_prealloc_next_seq_fops },
-+ { .name = "prealloc_last_id",
-+ .fops = &osp_prealloc_last_id_fops },
-+ { .name = "prealloc_last_seq",
-+ .fops = &osp_prealloc_last_seq_fops },
-+ { .name = "prealloc_reserved",
-+ .fops = &osp_prealloc_reserved_fops },
-+ { .name = "timeouts",
-+ .fops = &osp_timeouts_fops },
-+ { .name = "import",
-+ .fops = &osp_import_fops },
-+ { .name = "state",
-+ .fops = &osp_state_fops },
-+ { .name = "maxage",
-+ .fops = &osp_maxage_fops },
-+ { .name = "prealloc_status",
-+ .fops = &osp_pre_status_fops },
-+ { .name = "sync_changes",
-+ .fops = &osp_syn_changes_fops },
-+ { .name = "sync_in_flight",
-+ .fops = &osp_syn_in_flight_fops },
-+ { .name = "sync_in_progress",
-+ .fops = &osp_syn_in_prog_fops },
-+ { .name = "old_sync_processed",
-+ .fops = &osp_old_sync_processed_fops },
-
--static struct lprocfs_vars lprocfs_osp_osd_vars[] = {
-- { "blocksize", lprocfs_dt_rd_blksize, 0, 0 },
-- { "kbytestotal", lprocfs_dt_rd_kbytestotal, 0, 0 },
-- { "kbytesfree", lprocfs_dt_rd_kbytesfree, 0, 0 },
-- { "kbytesavail", lprocfs_dt_rd_kbytesavail, 0, 0 },
-- { "filestotal", lprocfs_dt_rd_filestotal, 0, 0 },
-- { "filesfree", lprocfs_dt_rd_filesfree, 0, 0 },
-+ /* for compatibility reasons */
-+ { .name = "destroys_in_flight",
-+ .fops = &osp_destroys_in_flight_fops },
-+ { .name = "lfsck_max_rpcs_in_flight",
-+ .fops = &osp_lfsck_max_rpcs_in_flight_fops },
- { 0 }
- };
-
--static struct lprocfs_vars lprocfs_osp_module_vars[] = {
-- { "num_refs", lprocfs_rd_numrefs, 0, 0 },
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_blksize);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytestotal);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytesfree);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytesavail);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_filestotal);
-+LPROC_SEQ_FOPS_RO_TYPE(osp, dt_filesfree);
-+
-+static struct lprocfs_seq_vars lprocfs_osp_osd_vars[] = {
-+ { .name = "blocksize",
-+ .fops = &osp_dt_blksize_fops },
-+ { .name = "kbytestotal",
-+ .fops = &osp_dt_kbytestotal_fops },
-+ { .name = "kbytesfree",
-+ .fops = &osp_dt_kbytesfree_fops },
-+ { .name = "kbytesavail",
-+ .fops = &osp_dt_kbytesavail_fops },
-+ { .name = "filestotal",
-+ .fops = &osp_dt_filestotal_fops },
-+ { .name = "filesfree",
-+ .fops = &osp_dt_filesfree_fops },
- { 0 }
- };
-
--void lprocfs_osp_init_vars(struct lprocfs_static_vars *lvars)
--{
-- lvars->module_vars = lprocfs_osp_module_vars;
-- lvars->obd_vars = lprocfs_osp_obd_vars;
--}
--
- void osp_lprocfs_init(struct osp_device *osp)
- {
- struct obd_device *obd = osp->opd_obd;
-- struct proc_dir_entry *osc_proc_dir;
-+ struct proc_dir_entry *osc_proc_dir = NULL;
-+ struct obd_type *type;
- int rc;
-
-- obd->obd_proc_entry = lprocfs_register(obd->obd_name,
-- obd->obd_type->typ_procroot,
-- lprocfs_osp_osd_vars,
-- &osp->opd_dt_dev);
-- if (IS_ERR(obd->obd_proc_entry)) {
-- CERROR("%s: can't register in lprocfs: %ld\n",
-- obd->obd_name, PTR_ERR(obd->obd_proc_entry));
-- obd->obd_proc_entry = NULL;
-+ obd->obd_vars = lprocfs_osp_obd_vars;
-+ if (lprocfs_seq_obd_setup(obd) != 0)
- return;
-- }
-
-- rc = lprocfs_add_vars(obd->obd_proc_entry, lprocfs_osp_obd_vars, obd);
-+ rc = lprocfs_seq_add_vars(obd->obd_proc_entry, lprocfs_osp_osd_vars,
-+ &osp->opd_dt_dev);
- if (rc) {
-- CERROR("%s: can't register in lprocfs: %ld\n",
-- obd->obd_name, PTR_ERR(obd->obd_proc_entry));
-+ CERROR("%s: can't register in lprocfs, rc %d\n",
-+ obd->obd_name, rc);
- return;
- }
-
- ptlrpc_lprocfs_register_obd(obd);
-
-+ if (osp->opd_connect_mdt || !strstr(obd->obd_name, "osc"))
-+ return;
-+
-+ /* If the real OSC is present which is the case for setups
-+ * with both server and clients on the same node then use
-+ * the OSC's proc root */
-+ type = class_search_type(LUSTRE_OSC_NAME);
-+ if (type != NULL && type->typ_procroot != NULL)
-+ osc_proc_dir = type->typ_procroot;
-+ else
-+ osc_proc_dir = obd->obd_type->typ_procsym;
-+
-+ if (osc_proc_dir == NULL)
-+ return;
-+
- /* for compatibility we link old procfs's OSC entries to osp ones */
-- if (!osp->opd_connect_mdt) {
-- osc_proc_dir = lprocfs_srch(proc_lustre_root, "osc");
-- if (osc_proc_dir) {
-- cfs_proc_dir_entry_t *symlink = NULL;
-- char *name;
--
-- OBD_ALLOC(name, strlen(obd->obd_name) + 1);
-- if (name == NULL)
-- return;
--
-- strcpy(name, obd->obd_name);
-- if (strstr(name, "osc"))
-- symlink = lprocfs_add_symlink(name,
-- osc_proc_dir, "../osp/%s",
-- obd->obd_name);
-- OBD_FREE(name, strlen(obd->obd_name) + 1);
-- osp->opd_symlink = symlink;
-- }
-- }
-+ osp->opd_symlink = lprocfs_add_symlink(obd->obd_name, osc_proc_dir,
-+ "../osp/%s", obd->obd_name);
-+ if (osp->opd_symlink == NULL)
-+ CERROR("could not register OSC symlink for "
-+ "/proc/fs/lustre/osp/%s.", obd->obd_name);
- }
-
- #endif /* LPROCFS */
-diff --git a/lustre/osp/lwp_dev.c b/lustre/osp/lwp_dev.c
-index a73973a..c115ee6 100644
---- a/lustre/osp/lwp_dev.c
-+++ b/lustre/osp/lwp_dev.c
-@@ -184,25 +184,9 @@ const struct lu_device_operations lwp_lu_ops = {
- .ldo_process_config = lwp_process_config,
- };
-
--static struct lprocfs_vars lprocfs_lwp_module_vars[] = {
-- { "num_refs", lprocfs_rd_numrefs, 0, 0 },
-- { 0 }
--};
--
--static struct lprocfs_vars lprocfs_lwp_obd_vars[] = {
-- { 0 }
--};
--
--void lprocfs_lwp_init_vars(struct lprocfs_static_vars *lvars)
--{
-- lvars->module_vars = lprocfs_lwp_module_vars;
-- lvars->obd_vars = lprocfs_lwp_obd_vars;
--}
--
- int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
- struct lu_device_type *ldt, struct lustre_cfg *cfg)
- {
-- struct lprocfs_static_vars lvars = { 0 };
- int rc;
- ENTRY;
-
-@@ -231,8 +215,7 @@ int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
- RETURN(rc);
- }
-
-- lprocfs_lwp_init_vars(&lvars);
-- if (lprocfs_obd_setup(lwp->lpd_obd, lvars.obd_vars) == 0)
-+ if (lprocfs_seq_obd_setup(lwp->lpd_obd) == 0)
- ptlrpc_lprocfs_register_obd(lwp->lpd_obd);
-
- RETURN(0);
-diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c
-index 0a1cafa..27e3011 100644
---- a/lustre/osp/osp_dev.c
-+++ b/lustre/osp/osp_dev.c
-@@ -367,7 +367,7 @@ static int osp_process_config(const struct lu_env *env,
- struct lu_device *dev, struct lustre_cfg *lcfg)
- {
- struct osp_device *d = lu2osp_dev(dev);
-- struct lprocfs_static_vars lvars = { 0 };
-+ struct obd_device *obd = d->opd_obd;
- int rc;
-
- ENTRY;
-@@ -381,11 +381,9 @@ static int osp_process_config(const struct lu_env *env,
- rc = osp_shutdown(env, d);
- break;
- case LCFG_PARAM:
-- lprocfs_osp_init_vars(&lvars);
--
-- LASSERT(d->opd_obd);
-- rc = class_process_proc_param(PARAM_OSC, lvars.obd_vars,
-- lcfg, d->opd_obd);
-+ LASSERT(obd);
-+ rc = class_process_proc_seq_param(PARAM_OSC, obd->obd_vars,
-+ lcfg, obd);
- if (rc > 0)
- rc = 0;
- if (rc == -ENOSYS) {
-@@ -1241,33 +1239,27 @@ struct llog_operations osp_mds_ost_orig_logops;
-
- static int __init osp_mod_init(void)
- {
-- struct lprocfs_static_vars lvars;
- struct obd_type *type;
-- int rc;
-+ int rc;
-
- rc = lu_kmem_init(osp_caches);
- if (rc)
- return rc;
-
-- lprocfs_osp_init_vars(&lvars);
-
- rc = class_register_type(&osp_obd_device_ops, NULL, true, NULL,
- #ifndef HAVE_ONLY_PROCFS_SEQ
-- lvars.module_vars,
-+ NULL,
- #endif
- LUSTRE_OSP_NAME, &osp_device_type);
--
-- /* create "osc" entry in procfs for compatibility purposes */
- if (rc != 0) {
- lu_kmem_fini(osp_caches);
- return rc;
- }
-
-- lprocfs_lwp_init_vars(&lvars);
--
- rc = class_register_type(&lwp_obd_device_ops, NULL, true, NULL,
- #ifndef HAVE_ONLY_PROCFS_SEQ
-- lvars.module_vars,
-+ NULL,
- #endif
- LUSTRE_LWP_NAME, &lwp_device_type);
- if (rc != 0) {
-@@ -1287,18 +1279,18 @@ static int __init osp_mod_init(void)
- return rc;
-
- type = class_search_type(LUSTRE_OSP_NAME);
-- type->typ_procsym = lprocfs_register("osc", proc_lustre_root,
-- NULL, NULL);
-- if (IS_ERR(type->typ_procsym))
-+ type->typ_procsym = lprocfs_seq_register("osc", proc_lustre_root,
-+ NULL, NULL);
-+ if (IS_ERR(type->typ_procsym)) {
- CERROR("osp: can't create compat entry \"osc\": %d\n",
- (int) PTR_ERR(type->typ_procsym));
-+ type->typ_procsym = NULL;
-+ }
- return rc;
- }
-
- static void __exit osp_mod_exit(void)
- {
-- lprocfs_try_remove_proc_entry("osc", proc_lustre_root);
--
- class_unregister_type(LUSTRE_LWP_NAME);
- class_unregister_type(LUSTRE_OSP_NAME);
- lu_kmem_fini(osp_caches);
-diff --git a/lustre/osp/osp_internal.h b/lustre/osp/osp_internal.h
-index 3a5d0a6..f183955 100644
---- a/lustre/osp/osp_internal.h
-+++ b/lustre/osp/osp_internal.h
-@@ -586,7 +586,6 @@ int osp_write_last_oid_seq_files(struct lu_env *env, struct osp_device *osp,
- int osp_init_pre_fid(struct osp_device *osp);
-
- /* lproc_osp.c */
--void lprocfs_osp_init_vars(struct lprocfs_static_vars *lvars);
- void osp_lprocfs_init(struct osp_device *osp);
-
- /* osp_sync.c */
-@@ -600,7 +599,6 @@ int osp_sync_fini(struct osp_device *d);
- void __osp_sync_check_for_work(struct osp_device *d);
-
- /* lwp_dev.c */
--void lprocfs_lwp_init_vars(struct lprocfs_static_vars *lvars);
- extern struct obd_ops lwp_obd_device_ops;
- extern struct lu_device_type lwp_device_type;
-
---
-1.9.3
-
diff --git a/sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch b/sys-cluster/lustre/files/0003-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
index 53e36b336..3714c1ed9 100644
--- a/sys-cluster/lustre/files/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
+++ b/sys-cluster/lustre/files/0003-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch
@@ -1,7 +1,7 @@
-From 1d943d37d99ba9503561c341fc9cff5fcaa37441 Mon Sep 17 00:00:00 2001
+From f11e6773afec21cd6976bad86b12b5de791ccda7 Mon Sep 17 00:00:00 2001
From: Yang Sheng <yang.sheng@intel.com>
Date: Thu, 24 Apr 2014 11:43:09 +0800
-Subject: [PATCH 5/5] LU-4416 mm: Backport shrinker changes from upstream
+Subject: [PATCH 3/3] LU-4416 mm: Backport shrinker changes from upstream
Convert shrinker to new count/scan API.
--ptlrpc shrinker
diff --git a/sys-cluster/lustre/lustre-9999.ebuild b/sys-cluster/lustre/lustre-9999.ebuild
index d1fa33422..479836ebb 100644
--- a/sys-cluster/lustre/lustre-9999.ebuild
+++ b/sys-cluster/lustre/lustre-9999.ebuild
@@ -40,11 +40,9 @@ DEPEND="${RDEPEND}
virtual/linux-sources"
PATCHES=(
- "${FILESDIR}/0001-LU-3319-procfs-Move-NRS-TBF-proc-handling-to-seq_fil.patch"
- "${FILESDIR}/0002-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch"
- "${FILESDIR}/0003-LU-3319-procfs-move-osp-proc-handling-to-seq_files.patch"
- "${FILESDIR}/0004-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch"
- "${FILESDIR}/0005-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch"
+ "${FILESDIR}/0001-LU-3319-procfs-update-zfs-proc-handling-to-seq_files.patch"
+ "${FILESDIR}/0002-LU-3319-procfs-move-mdd-ofd-proc-handling-to-seq_fil.patch"
+ "${FILESDIR}/0003-LU-4416-mm-Backport-shrinker-changes-from-upstream.patch"
"${FILESDIR}/lustre-readline6.3_fix.patch"
)