Merge branch 'master' of ssh://pkgs.fedoraproject.org/kernel
This commit is contained in:
commit
b79611b13a
89
iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch
Normal file
89
iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
From 9c8108a4d3a837c51a29f28229a06d97654eaeb6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Leech <cleech@redhat.com>
|
||||||
|
Date: Tue, 16 Jun 2015 16:07:13 -0700
|
||||||
|
Subject: iSCSI: let session recovery_tmo sysfs writes persist across recovery
|
||||||
|
|
||||||
|
The iSCSI session recovery_tmo setting is writeable in sysfs, but it's
|
||||||
|
also set every time a connection is established when parameters are set
|
||||||
|
from iscsid over netlink. That results in the timeout being reset to
|
||||||
|
the default value after every recovery.
|
||||||
|
|
||||||
|
The DM multipath tools want to use the sysfs interface to lower the
|
||||||
|
default timeout when there are multiple paths to fail over. It has
|
||||||
|
caused confusion that we have a writeable sysfs value that seem to keep
|
||||||
|
resetting itself.
|
||||||
|
|
||||||
|
This patch adds an in-kernel flag that gets set once a sysfs write
|
||||||
|
occurs, and then ignores netlink parameter setting once it's been
|
||||||
|
modified via the sysfs interface. My thinking here is that the sysfs
|
||||||
|
interface is much simpler for external tools to influence the session
|
||||||
|
timeout, but if we're going to allow it to be modified directly we
|
||||||
|
should ensure that setting is maintained.
|
||||||
|
|
||||||
|
Signed-off-by: Chris Leech <cleech@redhat.com>
|
||||||
|
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
|
||||||
|
Signed-off-by: James Bottomley <JBottomley@Odin.com>
|
||||||
|
|
||||||
|
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
|
||||||
|
index 55647aa..4c25539 100644
|
||||||
|
--- a/drivers/scsi/scsi_transport_iscsi.c
|
||||||
|
+++ b/drivers/scsi/scsi_transport_iscsi.c
|
||||||
|
@@ -2042,6 +2042,7 @@ iscsi_alloc_session(struct Scsi_Host *shost, struct iscsi_transport *transport,
|
||||||
|
session->transport = transport;
|
||||||
|
session->creator = -1;
|
||||||
|
session->recovery_tmo = 120;
|
||||||
|
+ session->recovery_tmo_sysfs_override = false;
|
||||||
|
session->state = ISCSI_SESSION_FREE;
|
||||||
|
INIT_DELAYED_WORK(&session->recovery_work, session_recovery_timedout);
|
||||||
|
INIT_LIST_HEAD(&session->sess_list);
|
||||||
|
@@ -2786,7 +2787,8 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
|
||||||
|
switch (ev->u.set_param.param) {
|
||||||
|
case ISCSI_PARAM_SESS_RECOVERY_TMO:
|
||||||
|
sscanf(data, "%d", &value);
|
||||||
|
- session->recovery_tmo = value;
|
||||||
|
+ if (!session->recovery_tmo_sysfs_override)
|
||||||
|
+ session->recovery_tmo = value;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
err = transport->set_param(conn, ev->u.set_param.param,
|
||||||
|
@@ -4049,13 +4051,15 @@ store_priv_session_##field(struct device *dev, \
|
||||||
|
if ((session->state == ISCSI_SESSION_FREE) || \
|
||||||
|
(session->state == ISCSI_SESSION_FAILED)) \
|
||||||
|
return -EBUSY; \
|
||||||
|
- if (strncmp(buf, "off", 3) == 0) \
|
||||||
|
+ if (strncmp(buf, "off", 3) == 0) { \
|
||||||
|
session->field = -1; \
|
||||||
|
- else { \
|
||||||
|
+ session->field##_sysfs_override = true; \
|
||||||
|
+ } else { \
|
||||||
|
val = simple_strtoul(buf, &cp, 0); \
|
||||||
|
if (*cp != '\0' && *cp != '\n') \
|
||||||
|
return -EINVAL; \
|
||||||
|
session->field = val; \
|
||||||
|
+ session->field##_sysfs_override = true; \
|
||||||
|
} \
|
||||||
|
return count; \
|
||||||
|
}
|
||||||
|
@@ -4066,6 +4070,7 @@ store_priv_session_##field(struct device *dev, \
|
||||||
|
static ISCSI_CLASS_ATTR(priv_sess, field, S_IRUGO | S_IWUSR, \
|
||||||
|
show_priv_session_##field, \
|
||||||
|
store_priv_session_##field)
|
||||||
|
+
|
||||||
|
iscsi_priv_session_rw_attr(recovery_tmo, "%d");
|
||||||
|
|
||||||
|
static struct attribute *iscsi_session_attrs[] = {
|
||||||
|
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
|
||||||
|
index 2555ee5..6183d20 100644
|
||||||
|
--- a/include/scsi/scsi_transport_iscsi.h
|
||||||
|
+++ b/include/scsi/scsi_transport_iscsi.h
|
||||||
|
@@ -241,6 +241,7 @@ struct iscsi_cls_session {
|
||||||
|
|
||||||
|
/* recovery fields */
|
||||||
|
int recovery_tmo;
|
||||||
|
+ bool recovery_tmo_sysfs_override;
|
||||||
|
struct delayed_work recovery_work;
|
||||||
|
|
||||||
|
unsigned int target_id;
|
||||||
|
--
|
||||||
|
cgit v0.10.2
|
||||||
|
|
63
kdbus.patch
63
kdbus.patch
@ -51834,3 +51834,66 @@ index 9217465f3ff1..e400dc86a2f5 100644
|
|||||||
--
|
--
|
||||||
2.4.3
|
2.4.3
|
||||||
|
|
||||||
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Date: 2015-08-14 13:21:43
|
||||||
|
Subject: kdbus: create /sys/fs/kdbus with sysfs_create_mount_point()
|
||||||
|
|
||||||
|
Since 0cbee99269 user-namespace pull, if a kdbusfs is mounted on a
|
||||||
|
location that's not created with sysfs_create_mount_point the user
|
||||||
|
namespaces are not allowed to mount their sysfs instances.
|
||||||
|
|
||||||
|
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
---
|
||||||
|
Applies on top of char-misc/kdbus a36324913.
|
||||||
|
|
||||||
|
ipc/kdbus/main.c | 13 +++++--------
|
||||||
|
1 file changed, 5 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ipc/kdbus/main.c b/ipc/kdbus/main.c
|
||||||
|
index 1ad4dc8..c2117ea 100644
|
||||||
|
--- a/ipc/kdbus/main.c
|
||||||
|
+++ b/ipc/kdbus/main.c
|
||||||
|
@@ -75,16 +75,13 @@
|
||||||
|
* '» struct kdbus_ep *ep (owned)
|
||||||
|
*/
|
||||||
|
|
||||||
|
-/* kdbus mount-point /sys/fs/kdbus */
|
||||||
|
-static struct kobject *kdbus_dir;
|
||||||
|
-
|
||||||
|
static int __init kdbus_init(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- kdbus_dir = kobject_create_and_add(KBUILD_MODNAME, fs_kobj);
|
||||||
|
- if (!kdbus_dir)
|
||||||
|
- return -ENOMEM;
|
||||||
|
+ ret = sysfs_create_mount_point(fs_kobj, KBUILD_MODNAME);
|
||||||
|
+ if (ret)
|
||||||
|
+ return ret;
|
||||||
|
|
||||||
|
ret = kdbus_fs_init();
|
||||||
|
if (ret < 0) {
|
||||||
|
@@ -96,14 +93,14 @@ static int __init kdbus_init(void)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
exit_dir:
|
||||||
|
- kobject_put(kdbus_dir);
|
||||||
|
+ sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit kdbus_exit(void)
|
||||||
|
{
|
||||||
|
kdbus_fs_exit();
|
||||||
|
- kobject_put(kdbus_dir);
|
||||||
|
+ sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
|
||||||
|
ida_destroy(&kdbus_node_ida);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.4.3
|
||||||
|
|
||||||
|
--
|
||||||
|
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
|
||||||
|
the body of a message to majordomo@vger.kernel.org
|
||||||
|
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||||
|
14
kernel.spec
14
kernel.spec
@ -67,7 +67,7 @@ Summary: The Linux kernel
|
|||||||
# The rc snapshot level
|
# The rc snapshot level
|
||||||
%define rcrev 7
|
%define rcrev 7
|
||||||
# The git snapshot level
|
# The git snapshot level
|
||||||
%define gitrev 0
|
%define gitrev 2
|
||||||
# Set rpm version accordingly
|
# Set rpm version accordingly
|
||||||
%define rpmversion 4.%{upstream_sublevel}.0
|
%define rpmversion 4.%{upstream_sublevel}.0
|
||||||
%endif
|
%endif
|
||||||
@ -590,6 +590,9 @@ Patch508: kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
|
|||||||
#rhbz 1239050
|
#rhbz 1239050
|
||||||
Patch509: ideapad-laptop-Add-Lenovo-Yoga-3-14-to-no_hw_rfkill-.patch
|
Patch509: ideapad-laptop-Add-Lenovo-Yoga-3-14-to-no_hw_rfkill-.patch
|
||||||
|
|
||||||
|
#rhbz 1253789
|
||||||
|
Patch510: iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch
|
||||||
|
|
||||||
Patch904: kdbus.patch
|
Patch904: kdbus.patch
|
||||||
|
|
||||||
# END OF PATCH DEFINITIONS
|
# END OF PATCH DEFINITIONS
|
||||||
@ -2027,6 +2030,15 @@ fi
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 19 2015 Josh Boyer <jwboyer@fedoraproject.org> - 4.2.0-0.rc7.git2.1
|
||||||
|
- Linux v4.2-rc7-24-g1b647a166f07
|
||||||
|
|
||||||
|
* Tue Aug 18 2015 Josh Boyer <jwboyer@fedoraproject.org> - 4.2.0-0.rc7.git1.1
|
||||||
|
- Linux v4.2-rc7-15-gbf6740281ed5
|
||||||
|
|
||||||
|
* Mon Aug 17 2015 Josh Boyer <jwboyer@fedoraproject.org>
|
||||||
|
- Fix iscsi issue (rhbz 1253789)
|
||||||
|
|
||||||
* Mon Aug 17 2015 Josh Boyer <jwboyer@fedoraproject.org> - 4.2.0-0.rc7.git0.1
|
* Mon Aug 17 2015 Josh Boyer <jwboyer@fedoraproject.org> - 4.2.0-0.rc7.git0.1
|
||||||
- Linux v4.2-rc7
|
- Linux v4.2-rc7
|
||||||
|
|
||||||
|
1
sources
1
sources
@ -1,3 +1,4 @@
|
|||||||
fe9dc0f6729f36400ea81aa41d614c37 linux-4.1.tar.xz
|
fe9dc0f6729f36400ea81aa41d614c37 linux-4.1.tar.xz
|
||||||
84e34c2f58901edcc5c840fe9893c02e perf-man-4.1.tar.gz
|
84e34c2f58901edcc5c840fe9893c02e perf-man-4.1.tar.gz
|
||||||
487c2146c2ed114354dded0fba9ed310 patch-4.2-rc7.xz
|
487c2146c2ed114354dded0fba9ed310 patch-4.2-rc7.xz
|
||||||
|
d32e106f413518d316460ba637d6b52b patch-4.2-rc7-git2.xz
|
||||||
|
Loading…
Reference in New Issue
Block a user