<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/s390/block/dasd_devmap.c, branch v4.14.151</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.151</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.151'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-09-08T13:31:08Z</updated>
<entry>
<title>s390/dasd: blk-mq conversion</title>
<updated>2017-09-08T13:31:08Z</updated>
<author>
<name>Stefan Haberland</name>
<email>sth@linux.vnet.ibm.com</email>
</author>
<published>2017-05-22T08:59:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e443343e509aac82e7281020f25bf8fa0dd46ab7'/>
<id>urn:sha1:e443343e509aac82e7281020f25bf8fa0dd46ab7</id>
<content type='text'>
Use new blk-mq interfaces. Use multiple queues and also use the block
layer complete helper that finish the IO on the CPU that initiated it.

Reviewed-by: Jan Hoeppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Add discard support for FBA devices</title>
<updated>2017-08-29T14:31:26Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.vnet.ibm.com</email>
</author>
<published>2016-06-30T11:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=28b841b3a7cb07a4bfd436a15b31bc88509dcf9a'/>
<id>urn:sha1:28b841b3a7cb07a4bfd436a15b31bc88509dcf9a</id>
<content type='text'>
The z/VM hypervisor provides virtual disks (VDISK) which are backed by
main memory of the hypervisor. Those devices are seen as DASD FBA disks
within the Linux guest.

Whenever data is written to such a device, memory is allocated
on-the-fly by z/VM accordingly. This memory, however, is not being freed
if data on the device is deleted by the guest OS.

In order to make memory usable after deletion again, add discard support
to the FBA discipline.

While at it, update comments regarding the DASD_FEATURE_* flags.

Reviewed-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: constify attribute_group structures.</title>
<updated>2017-07-26T06:25:17Z</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-07-19T07:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=131716776b778b4a2053759547eddc7674be1e29'/>
<id>urn:sha1:131716776b778b4a2053759547eddc7674be1e29</id>
<content type='text'>
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by &lt;linux/sysfs.h&gt; work
with const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: remove unneeded code</title>
<updated>2017-07-05T05:35:29Z</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2017-06-26T17:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4bca698ffe7e511e79b3f2cc5e7293c046549154'/>
<id>urn:sha1:4bca698ffe7e511e79b3f2cc5e7293c046549154</id>
<content type='text'>
Fix these set but not used warnings:

drivers/s390/block/dasd.c:3933:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
drivers/s390/block/dasd_alias.c:757:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]

In addition to that remove the test if an unsigned is &lt; 0:

drivers/s390/block/dasd_devmap.c:153:11: warning: comparison of unsigned expression &lt; 0 is always false [-Wtype-limits]

Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Fix faulty ENODEV for RO sysfs attribute</title>
<updated>2017-06-28T05:32:15Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.vnet.ibm.com</email>
</author>
<published>2017-06-22T15:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=795c9a5106119f45d2501c4fb01051178904753f'/>
<id>urn:sha1:795c9a5106119f45d2501c4fb01051178904753f</id>
<content type='text'>
If a device is offline it can still be set to read-only via the bus id
through sysfs. Only the read-only feature flag for the ccw_device is
then set. If the device is online the corresponding block device needs
to be set to read-only as well (via set_disk_ro()).
The check whether there is a device to do so, however, happens after the
feature flag was set. This leads to an unnecessary "no such device"
error in the offline case.

This bug was introduced by commit 7571cb1c8e3cc ("s390/dasd: Make use of
dasd_set_feature() more often"). Fix this by simply returning count if
no device is available.

Fixes: 7571cb1c8e3cc ("s390/dasd: Make use of dasd_set_feature() more often")
Reviewed-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: fix unusable device after safe offline processing</title>
<updated>2017-06-12T14:26:01Z</updated>
<author>
<name>Stefan Haberland</name>
<email>sth@linux.vnet.ibm.com</email>
</author>
<published>2017-05-16T08:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2757fe1d8ebd0e6ab1dbf1105978b8c8369dcc49'/>
<id>urn:sha1:2757fe1d8ebd0e6ab1dbf1105978b8c8369dcc49</id>
<content type='text'>
The safe offline processing needs, as well as the normal offline
processing, to be locked against multiple parallel executions. But it
should be able to be overtaken by a normal offline processing to make sure
that the device does not wait forever for outstanding I/O if the user
wants to.

Unfortunately the parallel processing of safe offline and normal offline
might lead to a race situation where both threads report successful
execution to the CIO layer which in turn tries to deregister the kobject
of the device twice. This leads to a

refcount_t: underflow; use-after-free.

error and the device is not able to be set online again afterwards without
a reboot.

Correct the locking of the safe offline processing by doing the following:
	- Use the cdev lock to secure all set and test operations to the
	  device flags.
	- Two safe offline processes are locked against each other using
	  the DASD_FLAG_SAFE_OFFLINE and DASD_FLAG_SAFE_OFFLINE_RUNNING
	  device flags.
	  The differentiation between offline triggered and offline running
	  is needed since the normal offline attribute is owned by CIO and
	  we have to pass over control in between.
	- The dasd_generic_set_offline process handles the offline
	  processing. It is locked against parallel execution using the
	  DASD_FLAG_OFFLINE.
	- Only a running safe offline should be able to be overtaken by a
	  single normal offline. This is ensured by clearing the
	  DASD_FLAG_SAFE_OFFLINE_RUNNING flag when a normal offline
	  overtakes. So this can only happen ones.
	- The safe offline just aborts in this case doing nothing and
	  the normal offline processing finishes as usual.

Signed-off-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Display read-only attribute correctly</title>
<updated>2017-06-12T14:26:00Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.vnet.ibm.com</email>
</author>
<published>2017-05-23T14:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b487a914f853545842a0899329b6b72fe56c4081'/>
<id>urn:sha1:b487a914f853545842a0899329b6b72fe56c4081</id>
<content type='text'>
We have two flags, DASD_FLAG_DEVICE_RO and DASD_FEATURE_READONLY, that
tell us whether a device is read-only. DASD_FLAG_DEVICE_RO is set when a
device is attached as read-only to z/VM and DASD_FEATURE_READONLY is set
when either the corresponding kernel parameter is configured, or the
read-only state is changed via sysfs.
This is valuable information in any case. However, only the feature flag
is being checked at the moment when we display the current state.

Fix this by checking both flags.

Reviewed-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Remove variable sized array</title>
<updated>2017-06-12T14:25:56Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.vnet.ibm.com</email>
</author>
<published>2017-05-09T12:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3050c20821d7e9f15566d105da9a0913de61e85c'/>
<id>urn:sha1:3050c20821d7e9f15566d105da9a0913de61e85c</id>
<content type='text'>
Dynamic stack allocations are considered bad. Get rid of this one
occurrence and use kstrdup() instead.

Also, set the return codes so that we have only one exit where we can
call kfree().

Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: allow 0 for path_threshold attribute</title>
<updated>2017-01-31T09:47:08Z</updated>
<author>
<name>Stefan Haberland</name>
<email>sth@linux.vnet.ibm.com</email>
</author>
<published>2017-01-25T13:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=defc2a9b9899511445cfbaa2c3a6509964b71207'/>
<id>urn:sha1:defc2a9b9899511445cfbaa2c3a6509964b71207</id>
<content type='text'>
Allow 0 as valid input for the path_threshold attribute to deactivate
the IFCC/CCC error handling.

Signed-off-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Improve parameter list parsing</title>
<updated>2017-01-31T09:46:32Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.vnet.ibm.com</email>
</author>
<published>2016-11-22T17:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b1bea012710c1a299573c7a6a0584d623e6cbcf'/>
<id>urn:sha1:3b1bea012710c1a299573c7a6a0584d623e6cbcf</id>
<content type='text'>
The function dasd_busid() still uses simple_strtoul() to convert a
string to an integer value. This function is obsolete for quite some
time already and should be replaced.

The whole parameter parsing semantic still relies somewhat on the fact,
that simple_strtoul() parses a string containing literals without
complains and just returns the parsed integer value plus the residual
string. kstrtoint(), however, would return -EINVAL in such a case.
Since we want to get rid of simple_strtoul() and now have a nice dasd[]
containing only single elements, we can clean up and simplify a few
things.

Replace simple_strtoul() with kstrtouint(), improve and simplify the
overall parameter parsing by the following:
- instead of residual strings return proper error codes
- remove dasd_parse_next_element() and decide directly what sort of
  element is being parsed
- if we parse a device or a range of devices, split that element into
  separate bits with a new function
- remove warning about invalid ending as it doesn't apply anymore
- annotate all parsing functions and data that can be freed after
  initialisation with __init and __initdata respectively
- clean up bits and pieces while at it

Reviewed-by: Stefan Haberland &lt;sth@linux.vnet.ibm.com&gt;
Reviewed-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
