** Changed in: linux (Ubuntu Jammy)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1976533
Title:
[UBUNTU 20.04] s390/DASD: Fix data corruption for ESE devices
Status in Ubuntu on IBM z Systems:
Fix Committed
Status in linux package in Ubuntu:
Fix Released
Status in linux source package in Focal:
Fix Committed
Status in linux source package in Jammy:
Fix Released
Status in linux source package in Kinetic:
Fix Released
Bug description:
Description: s390/dasd: Fix data corruption for ESE devices
Symptom: Filesystem errors and data inconsistency.
Problem: Wrong tracks are formatted or the same track is formatted
twice.
1. For ESE devices we get an error when accessing an
unformatted
track. The handling of this error will return zero data for
read
requests and format the track on demand before writing to it.
To
do this the code needs to distinguish between read and write
requests. This is done with data from the blocklayer request. A
pointer to the blocklayer request is stored in the CQR.
If there is an error on the device an ERP request is built to
do
error recovery. While the ERP request is mostly a copy of the
original CQR the pointer to the blocklayer request is not
copied
to not accidentally pass it back to the blocklayer without
cleanup.
This leads to the error that during ESE handling after an ERP
request was built it is not possible to determine the IO
direction. This leads to the formatting of a track for read
requests which might in turn lead to data corruption.
2. When using alias devices a track might be accessed by
multiple requests simultaneously and there is a race window
that
a track gets formatted twice resulting in data loss.
Solution: 1. Return the callback data of the original request in case
there are ERP requests build on top of it and thus determine
the
correct IO direction.
2. Prevent the double format by remembering the amount of
formatted tracks when starting a request and comparing this
number before actually formatting a track on the fly. If the
number has changed there is a chance that the current track was
finally formatted in between. As a result do not format the
track and restart the current IO to check.
Reproduction: Prepare an ESE DASD device using dasdfmt and fdasd. Install any
filesystem on the prepared partitions and issue regular I/O
using dd or any other tool while Alias DASD devices are set
online as well.
Upstream-ID: 5b53a405e4658580e1faf7c217db3f55a21ba849
71f3871657370dbbaf942a1c758f64e49a36c70f
Problem-ID: 198418
Preventive: yes
Date: 2022-06-01
Author: [email protected]
Component: kernel
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1976533/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp