From patchwork Wed Sep 14 08:45:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9330931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D2BF6077F for ; Wed, 14 Sep 2016 08:45:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CA5629B8A for ; Wed, 14 Sep 2016 08:45:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3146429B8C; Wed, 14 Sep 2016 08:45:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58F7529B8B for ; Wed, 14 Sep 2016 08:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756719AbcINIp4 (ORCPT ); Wed, 14 Sep 2016 04:45:56 -0400 Received: from mail-co1nam03on0043.outbound.protection.outlook.com ([104.47.40.43]:37408 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751621AbcINIpt (ORCPT ); Wed, 14 Sep 2016 04:45:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=J7WYqYxaHiJwH+bTJPcEDlMcXwSvJbIjxKf+mhH9mtg=; b=snxeV8e/gYJE8gO4JQl4QwzlzfOdobXFiYVjlEJ+J3mGCpfjczMfR1PLMTGeJWFy7ozas6/11DevpFbIMFaJ1Eh1lshD5mDKVtH0PHFRf+Q+RR66lwuFhgq/TshXEzlR36LSiY1qdei57GyTxxclb3wOyzRC45l+2HgW8oUklHs= Received: from BLUPR0201CA0034.namprd02.prod.outlook.com (10.163.116.44) by SN1PR02MB2142.namprd02.prod.outlook.com (10.166.68.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.609.9; Wed, 14 Sep 2016 08:45:47 +0000 Received: from BY2FFO11OLC011.protection.gbl (2a01:111:f400:7c0c::155) by BLUPR0201CA0034.outlook.office365.com (2a01:111:e400:52e7::44) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.629.8 via Frontend Transport; Wed, 14 Sep 2016 08:45:47 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; sharedspace.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; sharedspace.mail.onmicrosoft.com; dmarc=bestguesspass action=none header.from=sandisk.com; sharedspace.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11OLC011.mail.protection.outlook.com (10.1.15.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.619.6 via Frontend Transport; Wed, 14 Sep 2016 08:45:46 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 2B.62.26959.30C09D75; Wed, 14 Sep 2016 01:36:22 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.301.0; Wed, 14 Sep 2016 01:45:43 -0700 X-AuditID: 0ac94369-babff7000001694f-6f-57d90c03184b Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id C0.BF.03606.13E09D75; Wed, 14 Sep 2016 01:45:43 -0700 (PDT) Subject: [PATCH 2/3] block, dm-crypt, btrfs: Introduce bio_flags() To: Jens Axboe References: <35e3cdd6-8983-6c84-cb4c-9a7be15aea55@sandisk.com> CC: Mike Christie , Chris Mason , Josef Bacik , Mike Snitzer , Christoph Hellwig , Hannes Reinecke , Damien Le Moal , "linux-block@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , device-mapper development From: Bart Van Assche Message-ID: <144083a3-2d0a-00ff-add2-a2f6f3690528@sandisk.com> Date: Wed, 14 Sep 2016 10:45:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <35e3cdd6-8983-6c84-cb4c-9a7be15aea55@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsXCddJ5kS4bz81wg8aV0hb/9xxjs5jUP4Pd 4ueVWWwWe9/NZrXYs2gSk8XK1UeZLP7uXMhisfeWtsWlxyvYLdYf2cBo0bbxK6MDt8fE5nfs HrtvNrB5vN93lc3j0tl2Fo/Np6s9Pm+SC2CL4rJJSc3JLEst0rdL4MrYeaOfpWC5WMW5k33s DYxnhLoYOTkkBEwkdp/+wdLFyMUhJLCUSWLWth/MEM4ORonPB5awwFQt3bsbKrGUUeLS7Rts IAlhASeJpZf+gRWJCMhKfN/9GiwuJGAncf/YCUaQBmaBhcwSzbN/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ehoxFnPvco2X6S lrGxmiq3uCFh2/KsSudlmZr62prnk8SMa0XMnTjmPn30xfzm2QV1t084r3koOdOTpbwqamNS 5uMFquc3KLEUZyQaajEXFScCAAnoRbAhAgAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(69596002)(86362001)(19580405001)(68736007)(230700001)(106466001)(189998001)(19580395003)(5660300001)(87936001)(65826007)(2270400002)(4001350100001)(76176999)(97736004)(77096005)(11100500001)(626004)(110136003)(50986999)(54356999)(83506001)(229853001)(33646002)(36756003)(31686004)(305945005)(8936002)(2906002)(7846002)(47776003)(356003)(586003)(65806001)(65956001)(64126003)(53416004)(2950100001)(81156014)(50466002)(81166006)(4326007)(31696002)(23676002)(7416002)(8676002)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR02MB2142; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC011; 1:xyYJ2sUEL3Bz/z5c6/ERoee9bnPxnjNfw+HdlOUW3tgrMlBjPyb8Qrl9sQDUTm6nE0/Qln/5JQkSWJu7NnIXYHn9LY6jBHTrF4hoXPWBl9nKHMDyX1n/qb9gpFVtqfaFD8CGXxcM5ao0OMwau88lAU2ggHugP7FiC9D3yllauw/BonyybhmNMXJHAn7USBeJh8TLDQsABMRdV678FQ3S0d73hR29i9q66SdnTimGzyBd+rM1MhO6uoT2WgizthYp5JvsPKhNHljRZBqLnI+CKvgENem+xdtcXSOSvWXBS1TQtZDCf8F2VKalwo026A7FIjfOmrcjOWXcDb68YMs+G1p61g46w5mNFF2r6556znRyW7Imw5NmnGsQS93i9WA+MSSHiBdaUDi/NgrNvE9+s49hTsHOCHTsdqhBxfaM0A3bwox6KdC9igEOhjIsvxOUCgDOwTIPU02q7EaZXlIoEylyvAI7Rd/7pGEKCxtTw1M35EuFBO1lYnDtRR+OKGCm5KG70PbvoWW3uC3FYoZQfw== X-MS-Office365-Filtering-Correlation-Id: 126816df-04ee-423f-99da-08d3dc7b85a7 X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB2142; 2:Qb6iDS51+T0QfSxfFcWheJGsjPO8I8X45zlY4UhFUZ04qMGpmrme0+duMfITUAGDmvzYlgVwjyU3rwnybGOXoiyWzjw98RO25QVIFHaGERqtE+POogx5uz/rWQyyU1prPXjXRI7Rkr+nv22u+axYWsz3esE4vufKP1nNSjTo5i8pvR84V5P9GlsPoAIEC5Gf; 3:hBAetVaMyBa2TXYHY6XUEU+ruaNBb8UZpHF2umgSMDFFGtHbfSOm6+74SZPpwk0uIZPP+FUAfqlAm9He0bkCHxpkT0Fj2cVKPPHkttpWHkfO9TGzsHR0bjcmn1IMP48psYBsehAhhjJ0AzJuDF3Lqx3zOjP4XgcBNKkjYhE29pUYUgduOdILG5aBbCuD/Q253zLhdFPMm2EXtuiBPfQhVIIjYf4pWdzSIuZa0V7D06bPrZhLKv0WPE6EHFFFo+d72YRWPY+eTBcdOv7OdWrgPg== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:SN1PR02MB2142; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB2142; 25:UlTSW6CqG/StXL495+vUGDCN/fjWlo7JUrgjrd39DDquUV1Sxibx7rl/xLuWidEPeed9sfl/cw7Ha2cXRIUqtdTYFLEldKjXQYov46xwg1aJo8Pi9n15X7Rk/gV0slLBrJ4fh828L6GaJGrmtodLX0rJBNAvQqgSkORX0wM38wtKnjCIWhRzA9xsu0/38l9m9xWiEUEoZCwIvMw1aqmDk8i9AZlTPlAd0Fodp9ncELt/CPyI8exWhYjiBz7xlEUzD3QtCbuJCGDUxPFatEmMTr/vQ5g6/MBUYHolCDN/FAq5sCtczDkv/8gH8SwHL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TH375F2kCdwrUv9YIE8F4kTIrifZY26aaHROIi8xNvo12UoeIsQIc0WwYfoN/RHwLFM7jYfoJEBXOJqeD25jl4Mc+qVXXeakyraimk6NhlSqHFQfFFTqdeWQoyBrf8Z1QS4K2dn0tVlkBmnJuwcuZB82MVLKkc2fBoM6n0AIIeW6zvW8PmCN6GhHi5QKXPEHTCFhLy4MZ+5ONgYNr7drWZH9PDgZfIxuX4uu/vml X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(79135771888625)(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13016025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR02MB2142; BCL:0; PCL:0; RULEID:; SRVR:SN1PR02MB2142; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB2142; 4:jZt/BTbb0S2kw9C5kg3dxlHkdgwiN2377Mozi57M46PM1qGNR+8rHSqAGcU6z5bC6qOAQqY/ve+iDm05/ZJqEer8p27IHId9aIFWJKftGmCPQwBrFx4kOnNRz8x8zSBQSUFz9rI6yoRBL/Jo81SBf4vqVSYWOS2nJGKbODRw37Ogr/8hEeyQSOvDgkcJRlcxDrdI+Cg3HtHQ1BRsu/6dp5TW43rvL1yfheW5+qAlgFKARYcNNRPnmSf8BSEbcqp4kxk+9AA5xhY50shbtXQgoEbF91L5dhwBU2YxZmpNt72qLZ19s1ltu0w9iJkRQ7r30/4rIIK8GqzGzf8HqeIhQoswWTlFxBBw3JcBglPUUD0/0288vU0wWc3fUeEPz841Y7qMpaA7f0c3eU3TzNqkzNPAWBlIgZm5pbINiDD48siid3ZWVl/xSecApFSLfwQNXwVBfeC6wStPVYOCLMKN852/337gOnbD6P5HjB4BtafPNSJY4NStQcReFSYOlj1eUh+BaP1eX4Wo+DBzunr74346qXOBHVgCNsP5y6EZ1zE= X-Forefront-PRVS: 006546F32A X-Microsoft-Exchange-Diagnostics: =?ut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VmcB7OGdr43RamYlR/48Bt2BQ3OFUrVT5Zf3LMyEqBrq+E4GC4zYFRc8H2JXK+O66NAmUhvSeUVjxlkeU5cJq/raatdYSyC1JsrUq5ifFiMp X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2016 08:45:46.9877 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR02MB2142 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Introduce the bio_flags() macro. Ensure that the second argument of bio_set_op_attrs() only contains flags and no operation. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Chris Mason (maintainer:BTRFS FILE SYSTEM) Cc: Josef Bacik (maintainer:BTRFS FILE SYSTEM) Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig --- drivers/md/dm-crypt.c | 2 +- fs/btrfs/inode.c | 5 +++-- include/linux/blk_types.h | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 8742957..0448e7e 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1136,7 +1136,7 @@ static void clone_init(struct dm_crypt_io *io, struct bio *clone) clone->bi_private = io; clone->bi_end_io = crypt_endio; clone->bi_bdev = cc->dev->bdev; - bio_set_op_attrs(clone, bio_op(io->base_bio), io->base_bio->bi_opf); + bio_set_op_attrs(clone, bio_op(io->base_bio), bio_flags(io->base_bio)); } static int kcryptd_io_read(struct dm_crypt_io *io, gfp_t gfp) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e6811c4..ca01106 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8412,7 +8412,7 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip, if (!bio) return -ENOMEM; - bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_opf); + bio_set_op_attrs(bio, bio_op(orig_bio), bio_flags(orig_bio)); bio->bi_private = dip; bio->bi_end_io = btrfs_end_dio_bio; btrfs_io_bio(bio)->logical = file_offset; @@ -8450,7 +8450,8 @@ next_block: start_sector, GFP_NOFS); if (!bio) goto out_err; - bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_opf); + bio_set_op_attrs(bio, bio_op(orig_bio), + bio_flags(orig_bio)); bio->bi_private = dip; bio->bi_end_io = btrfs_end_dio_bio; btrfs_io_bio(bio)->logical = file_offset; diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 1e1ef21..311fa2f 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -90,11 +90,12 @@ struct bio { }; #define BIO_OP_SHIFT (8 * FIELD_SIZEOF(struct bio, bi_opf) - REQ_OP_BITS) +#define bio_flags(bio) ((bio)->bi_opf & ((1 << BIO_OP_SHIFT) - 1)) #define bio_op(bio) ((bio)->bi_opf >> BIO_OP_SHIFT) #define bio_set_op_attrs(bio, op, op_flags) do { \ WARN_ON(op >= (1 << REQ_OP_BITS)); \ - (bio)->bi_opf &= ((1 << BIO_OP_SHIFT) - 1); \ + (bio)->bi_opf = bio_flags(bio); \ (bio)->bi_opf |= ((unsigned int) (op) << BIO_OP_SHIFT); \ (bio)->bi_opf |= op_flags; \ } while (0)