Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp779428imm; Thu, 31 May 2018 09:14:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKc9WfW7D9GiZfZddHRoo9GfIgoSJeW9FfMfbAiX66YX93auwOsdo/Uq/p9O8GDNCfb7mlx X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr7689768pli.53.1527783285578; Thu, 31 May 2018 09:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527783285; cv=none; d=google.com; s=arc-20160816; b=uqHqUUeq+jcORMsi8tILm4vIAmjEG00HLp8vwIRSXH7vcN/YPWTgOZbc5+iIqWRMQ7 ahwncvO9TSrbXPqgj6lxIoPGMP5OCwnYXZnENE2E3hcyFyQB73HfH2gFWODucvJvnImo +W0OpZahY5K8gqOen5YtOeNFUvTtevEYY2/IuEhk5JzLVCDZpRN68JI2bl4ZozVD/9nw PAs7+mJlTxWyjXOV1sooMMyqxhNaRg0z1EVULz7q4e+QFmAc9D7a4qdhJwc0usHQxXom wKwzE1E6QquNndC1D2Q2qqFEetp0rbtClbE7+AycPjP3/iVOZNyvt0W2p7VVAnov0UjS m4vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=BLPRBGUr9Yk9SfMztdX3ujcN4DzhSDptpjdr7bTMuQo=; b=BuM29/SF1HdM1zdpUITdkjdhBc4zUame3B870ZJFDSLKIvaGGgROBqR5W4h5N/BDwJ BpshCvRUcTU7RY/QD/U4WxfdK4YWhCgQOjMPSmMzZGfb+6dji/lk68F7gDV531NGYuvv UUYrjQChN8k5GjBeUkvQKyn0gSWwWKOSZ18zL3thWyqpPan11yeb7lZui11Hl1fXRf49 gWhroXVuNutp+waXkLee/vJ2vWRyL5ZBAFtKjb0JGjUPAVwv3rBg99M4sGF8C98UW1AL mfRtS0M9cGlVLQXTFoHvzgi9/mms2uXrhJlyDdSfctbiTM9XArNp22xhXAQhkyezR+r1 xmQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=E67S8cWA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12-v6si20692600pgu.358.2018.05.31.09.14.31; Thu, 31 May 2018 09:14:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=E67S8cWA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755629AbeEaQOE (ORCPT + 99 others); Thu, 31 May 2018 12:14:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55868 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755598AbeEaQOB (ORCPT ); Thu, 31 May 2018 12:14:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BLPRBGUr9Yk9SfMztdX3ujcN4DzhSDptpjdr7bTMuQo=; b=E67S8cWAoenGjtDAhFzHsQ+ap s8PpFPanwGUeOlzw2kMm4chSaZuSes1nhJ/eFWu/pFh5q9mE7sOqFQl9DW7dVROv2Lj3MwtqZVj9l AnOnFfm4OhWrZCEZ04wiB+Y7E8UrbPqZ+vdRnxyz+ftMwKq96l/r7DWlcrsG42WaQiEWDoYOWTD+w lyw+E+tyO370QoBBpl+PfnUwBe+yySl/TcpH1eUiRFHlaGt62oIAJdrB9uc7vEtQ7YJxDgO6TVFSC IIy1gphmgxM32rl0xRs11dw1QUgvMYVi/ocKn5JoABoWIeh2dyXWEWmWfj6Nr8jDpuDReIPoVGodh R7ME+oh+Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOQDA-0003K8-Ne; Thu, 31 May 2018 16:14:00 +0000 Date: Thu, 31 May 2018 09:14:00 -0700 From: Christoph Hellwig To: Martin Schwidefsky Cc: Christoph Hellwig , Linus Torvalds , linux-kernel , linux-s390 , Heiko Carstens Subject: Re: [GIT PULL] two more s390 bug fixes for 4.17 Message-ID: <20180531161400.GB10203@infradead.org> References: <20180530075920.1f73275a@mschwideX1> <20180530074130.GA6927@infradead.org> <20180530111140.40c791bd@mschwideX1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180530111140.40c791bd@mschwideX1> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 11:11:40AM +0200, Martin Schwidefsky wrote: > On Wed, 30 May 2018 00:41:30 -0700 > Christoph Hellwig 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. We'll we try really hard to have a structure that we can use container_of on. At least a minimal container with just the pointer for a quick fix, but in general it seems like you should be able to allocate the whole dasd_ccw_req with the request and just initialize it later.