Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030755AbbKDQtL (ORCPT ); Wed, 4 Nov 2015 11:49:11 -0500 Received: from mail-bn1on0083.outbound.protection.outlook.com ([157.56.110.83]:26149 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030498AbbKDQtG (ORCPT ); Wed, 4 Nov 2015 11:49:06 -0500 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; X-AuditID: ac160a69-f79f76d000007db2-bc-563a36fd8a46 Subject: Re: [dm-devel] [RFC PATCH 00/32] separate operations from flags in the bio/request structs To: device-mapper development , , , , , References: <1446654807-6935-1-git-send-email-mchristi@redhat.com> From: Bart Van Assche Message-ID: <563A36FC.6010001@sandisk.com> Date: Wed, 4 Nov 2015 08:49:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446654807-6935-1-git-send-email-mchristi@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrALMWRmVeSWpSXmKPExsWyRoxnke5fM6swg7YtkhZ7381mtXh4dQWL xZ69J1ksLu+aw2bRPn8Xo0X39R1sDmweLQ/a2Dze77vK5vF5k1wAcxSXTUpqTmZZapG+XQJX xuO/6gUHBCtezlrF2sC4kq+LkZNDQsBE4kLDZSYIW0ziwr31bF2MXBxCAicYJfrnn2KFcLYz SpzfeokNpuP/qZ/sEIlNjBIvt5xgBkkIC6RKnHn4ihXEFhG4zCixeJs6iC0k4CSxZdlysDib gJHEt/czWUBsXgEtiYczb4DZLAIqEjt3P2AEsUUFIiQmTmhghagRlDg58wlYDaeAs8TyqauB ajg4mAXsJR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X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD031;1:MiRvQpNhfKVK/2qKHrLRda52ywfwm1eKMfdeUlXkzFAZQHoLNyQTLX4Xz042WhAhgA1V03o14t6VWfZ9s3FrN007I6ufNDMDuoqrYG1Y2Z6G93+lfZ7lzgK9ynypwSH8QfKwtCWgabpVZ+7tQWi2NSnaPK61qIqkrudI5TcNxMz5HH+0EhyMDFNFmLl5xnUx1j5DIsEdt/61ZQlbBxVqFEvWvDx807fMWl497jjrIZZ6Fe2ZfU+GHJDc+gLOIz60u28tsPuBw9YJgv3KkI/HojN3U2pN18gBuS9iqVnGVqapqTGdCOoSJb0po/YIYUZAGSaD1C+BTquZmJsvH1+VmQ== X-Forefront-Antispam-Report: CIP:63.163.107.173;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(377454003)(24454002)(479174004)(189002)(199003)(87936001)(47776003)(77096005)(5001960100002)(50466002)(11100500001)(83506001)(59896002)(189998001)(81156007)(97736004)(65806001)(15975445007)(5001770100001)(7520500002)(92566002)(80316001)(5007970100001)(36756003)(107886002)(50986999)(64126003)(2201001)(5008740100001)(4001350100001)(23746002)(19580395003)(106466001)(69596002)(54356999)(87266999)(33656002)(76176999)(65956001)(86362001)(230700001)(19580405001)(65816999)(2950100001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR02MB1382;H:milsmgep12.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR02MB1382;2:CLODhw1ajGij/sBMaVmfH84aIHI9ILnVqHdmmEybSREKrdIG0fs8jriMZtNrj0G8+Z8YNxg2IIzz6UJ1muvxtEMCwZdsZtBdL+jlnQp6LqM7mKceSItU9b6dn/tvz4nHwsjdTp+1g1A3Arg+9TeT4Wz+iGdi0wzOjZlj/HhId+Y=;3:RgQjyRa7+ZzCIs+8H+3c9fXiyfimDZPKRxsxeoHmTNJyvQl/bQ/YNhqzqHrMN7N36ooTmVvfMIJvYzjqSZe40Ti0HdukLe8uNklRvyguRuYTZlHhsGQvzFi0M67ZU22Gx/du5m+EXGGwRvuTaXzNjLszrdMiABhQX3Vh8Asbg1UniFbNXE+3vFA5CdvL5+6jcajLSUIsRFT8ruygh21dH3NffNPDCrp5btu5MuyLvtCEGEBFTI2dhgoyWmyRC19XJOfP2zCET2+v9cCcsOsCYQ==;25:nsa9eNjI/oH9NY3Xqm0esIRoefzuyR6zcrFoiBO6TfIvcujKXeBavHvF6eKcQL9mnoGFyz6j5x+G8l6T7P7/AJLQTTkmB4oexkizkaBty+AvxodMYIoniF+PJX0FVjqmENTL3p2LuE67eiG1ISW5dwwxu0t5wRZryxV72/J/4fWgcjHd7x55Tsj+Fve3xhhKljK7m7xdidvWsIDU7S4EjGwMFqEDO2wgt6hCJV0Bd7dNeYIxiy3mvKl65I1vFQ+1pergvohi4aung+bldtYYug== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501001);SRVR:CY1PR02MB1382; X-Microsoft-Exchange-Diagnostics: 1;CY1PR02MB1382;20:GESGoKd3ilwT5BcgyAV/7yjD6Zij+eE4uTAwN6i1v4wK93HqP55yicdeCguEQceElOaAWr9Ev1U8XkSG/o617D5IxOnJhzBMvQhB35wN5iaAvfJyfX4LtPV4i47SU4D0nkHWsABALS9fZFAVGYFKTqDC2IQssGwvmzkMK/1c1DGSz4XxTaaYTg659duWo4h09QpE1c8aLfbt+++Zv4yf5K+3KnD++BavdyghSwVGt0etjAkj1rl57yQvZ5V73j8dr6L/wruV0kwdd/wRAkxXCKBu4G9X30XOY19INwpPJjz3X766VYb24Uzyda9UKMdC1RUsFMQWCF1gKWQuq/VueREoGr4hLM83tkDSfb64wHZeflWYtsDuOeNlDH+oE00JK02G/qkGUBpzn/nFMvKz5gvkjBzh6v6fg1MCCDVwup4TghsYm2FhCtU8Ydv92fNquy3upouqMMzQVDihcCTXdR0iJ+xt1ihjrQPtzCJv62WCay2GE7iBklFiD5Ho/0cN;4:qkx2NqPbdWVgRO9xKxEkwZ1bH2YlGdQkHc96AdWj7MIShTxtCSQ/isW7X1pT4l9MtZzfMosltPCl8PjkMg5erhM7sm7rw0NY/SIunU6m5e/lVToENbUcb/QT8F4H8QBlbenUmuCTRnNs1AbqsDB57XKJS1ghlKV6/YGOlUlz81KTPAgwscUzUd1M6WNbCgqtsLutSQDce1ZjW4cPJ1fmm+aRCZwtXNfkFO7FUfGvVkLTGUyA/fWDv/Ro4gCkTt74wCG+PazAkWJL+1CrHYARQzEoU6ubsDo01c41OHj+4Fw8ZycG8J+42TWyPJp+62ukEQq8c6yIy0R7wXAk5N8UbSPlFBmyeOR8D58lLAn/p0A86pGxJQ5ZlElMNzGnblvN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:CY1PR02MB1382;BCL:0;PCL:0;RULEID:;SRVR:CY1PR02MB1382; X-Forefront-PRVS: 0750463DC9 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY1PR02MB1382;23:eH5K8kKDdJCFaVzHTihQvaZ7SXkYZI4Piul1M?= =?Windows-1252?Q?NkfxIeIUdDw4CFgp9MfK5vsoA9obPkTYYzorrxH7kpPK9yFLConPwHtM?= =?Windows-1252?Q?hC5kS29fLdlH4zxHbBElBkpra6Y8c3CbBvpoiBQYcR9o3BN0sUJZyewv?= =?Windows-1252?Q?dn3zIWm9XMStfRTSA6lpFefZ3sRLvqhB0VYK2dk/CffbCzyriIRjSTjD?= =?Windows-1252?Q?T+bnH9jY32xW82emjWH2QJgwG1Uehgbo4qexAApmrfdIU7EojZuPldhQ?= =?Windows-1252?Q?vnrLY2/cvfrtbRIEHqaFs7bdDsz3sk7GXlkq7YJQez9DDjMIs/xj6tvj?= =?Windows-1252?Q?S23vDDqTIdaZeD6fict10me0u7pvD/9yHcYtP/NZix1R6Q5jqGJMNDFZ?= =?Windows-1252?Q?zUzs+70ScCMi921qjqT2BMmoQBkJSSb8xDE2lAWCLmp7LuoqvOrgQY37?= =?Windows-1252?Q?ghAx82T2DQKzmqqBIIR1wi59tRt8tJF1PGu2D5vvWjYh7ufwn5arqF8g?= =?Windows-1252?Q?LIb4pE7p1xnYWX7TM+xsETzCYbXsk5gNSPs4JmxPZ/85gwj/2N8MtW5/?= =?Windows-1252?Q?PNklg82XI1Ovsr7jCwalQHurbih31aMXYprRtN4s3VBQXUS3d1oczvlQ?= =?Windows-1252?Q?Ht66y8JzPZGXaz2XCNfG9oFHYjzYEMm4s8ydcLYEn5yHFetsdXijF/Ks?= =?Windows-1252?Q?eIUmv7ppPDXSSR/vVtXhcxqH5O0/orxWPoNuvzSi4WaxiOBBHU7cE2Pk?= =?Windows-1252?Q?Mejmy+X7Jz0BvewpQlntI7xKhB1dl4e3wP7xBOrnv3llpyEyycjXZCH2?= =?Windows-1252?Q?7GBvEaOu7MlZZaurqCxpa99zdy07oxVtNniAvXcJlprFJnyA02HHKeP1?= =?Windows-1252?Q?RW28okvYXb9xeZK+vsrVZDT7jbJqqi6bOSgACs3f+HY4CRhWqgiJX23k?= =?Windows-1252?Q?2icgR0VkNSpzVR7sT1xa7fnjHAyWhHMIKv0OtfGuOJdV48xLDAnTdkZe?= =?Windows-1252?Q?vtsmugfEibzxzyW4qI7htyauyFk9XUEk1h3SDXbQgj5lv078zgv99/bj?= =?Windows-1252?Q?twkPMXGIsrxTIBslw5B5GT+16Q9CucbwKm8E1M6QUbn1PfXTCOe/CxI4?= =?Windows-1252?Q?XL1iYIxppA7db6lDK8bn4LsQHpPAmOLgzkveeGNVJq9QJ0VPlxqbz1MG?= =?Windows-1252?Q?1jHh84hOCOhwCY1h2ZyXu74+mR0q9NyRB7tSs2zrWfSnBlTuV3XMZGOR?= =?Windows-1252?Q?y/rvUa2vQzoWaya/t1Rnux83YOvVe1cj1q5kmu43qGuDuYfxKtvOB04t?= =?Windows-1252?Q?n2W2rxCXfsoaQmDL1X6r/sdsJDRbV10l4UQh4K6nCpIqYTiXHaLdAzwV?= =?Windows-1252?Q?MsNI/miyD/c?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR02MB1382;5:+W1VWO8fgrG02KmTHdA4GKvTwR7F7YIalzOhRacObwM19Ns1XFV5ZHtqgtYITli63HpqhZxJO1d4TfG2c9Ff5qWbXFF2v0x9MU18DlYfp4ly3gGws63ilW5wvR9h2FBVYcNan1fbMwIr8byukgh5Qw==;24:kryROkWJJ+jr7pOaRZIr+oI1d1+2hjA9m/DHLsdkSMB9UJ16yCxwfuR17SSjqLbvPocCYLASqJqxqHVpTw9MAnmIg4TY+JkJCyFT0QEc0w0=;20:2mZLIwf/5sFlHZ1Qrmzub7XdlDMXj6y5bEFd6H+5/5Y2cGKo0i9JxMPgWq8VxcZIPpbJYGEhkaX3+G5bui5VvYcrL8l6ApTTrzbWHfJ6ZFI7PeAmppYfHZmgvYZt7xrmS0yEwd9ceJSFJPrPzQLBs6AID46O/NyjKsJ2AeNHiP5SJrCtyDRm3mzE++ZXmmE6pySRf8ejHNVHWxH73Z5zAS2cEIIrWFbl4mPlYSzrxq68xWQO/w1z77JPKMzAlFU7 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2015 16:49:01.5399 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.173];Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR02MB1382 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2435 Lines: 55 On 11/04/2015 08:32 AM, mchristi@redhat.com wrote: > There are a couple new block layer commands we are trying to add support > for in the near term: > > compare and write > http://www.spinics.net/lists/target-devel/msg07826.html > > copy offload/extended copy/xcopy > https://www.redhat.com/archives/dm-devel/2014-July/msg00070.html > > The problem is if we contine to add more commands we will have to one day > extend the cmd_flags/bi_rw fields again. To prevent that, this patchset > separates the operation (REQ_WRITE, REQ_DISCARD, REQ_WRITE_SAME, etc) from > the flags (REQ_SYNC, REQ_QUIET, etc) in the bio and request structs. In the > end of this set, we will have two fields bio->bi_op/request->op and > bio->bi_rw/request->cmd_flags. > > The patches were made against Jens's linux-block tree's for-linus branch: > https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git/log/?h=for-linus > (last commit a22c4d7e34402ccdf3414f64c50365436eba7b93). > > I have done some basic testing for a lot of the drivers and filesystems, > but I wanted to get comments before trying to track down more hardware/ > systems for testing. > > > Known issues: > - REQ_FLUSH is still a flag, but should probably be a operation. > For lower level drivers like SCSI where we only get a flush, it makes > more sense to be a operation. However, upper layers like filesystems > can send down flushes with writes, so it is more of a flag for them. > I am still working on this. > > - There is a regression with the dm flakey target. It currently > cannot corrupt the operation values. > > - The patchset is a little awkward. It touches so much code, > but I wanted to maintain git bisectibility, so there is lots of compat code > left around until the last patches where everyting is cleaned up. Hello Mike, If you have to touch submit_bio() and submit_bio_wait(), how about requiring the callers of these functions to set the cmd and flags arguments in the bio structure and to leave out the cmd and flags arguments from the submit_bio() and submit_bio_wait() functions ? A (compile tested only) patch that implements this idea is available at https://lkml.org/lkml/2014/6/2/173. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/