lkml.org 
[lkml]   [2018]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] two more s390 bug fixes for 4.17
On Wed, 30 May 2018 00:41:30 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> > - req->completion_data = cqr;
> > + *((struct dasd_ccw_req **) blk_mq_rq_to_pdu(req)) = cqr;
> > +
>
> Please don't play such tricks. In general your driver structure
> should have struct request embedded. If for some reason
> struct dasd_ccw_req has a different life time please create a new
> structure instead of these hacks.

Why do you consider this to be a 'trick'? The blk_mq_rq_to_pdu is
meant to be used to access a block of data that is is associated
with a request, no? With the change we store a single value, the
pointer to a struct dasd_ccw_req. The struct request comes first,
later do_dasd_request creates the struct dasd_ccw_req with the
CCW chain for the request. And for the blk timeout handler we need
a way to find the dasd_ccw_req again.

> In either way this really doesn't look like a post-rc7 change.

You think so? It fixes a crash for s390 with a minimal number of
changed lines:

drivers/s390/block/dasd.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

\
 
 \ /
  Last update: 2018-05-30 11:12    [W:0.137 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site