From patchwork Tue May 23 20:48:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Manzanares X-Patchwork-Id: 9743723 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 EBE506037F for ; Tue, 23 May 2017 20:49:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE9D02859E for ; Tue, 23 May 2017 20:49:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D31E128830; Tue, 23 May 2017 20:49:07 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 16A922859E for ; Tue, 23 May 2017 20:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161266AbdEWUsm (ORCPT ); Tue, 23 May 2017 16:48:42 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:47924 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032788AbdEWUse (ORCPT ); Tue, 23 May 2017 16:48:34 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21049498" Received: from mail-co1nam03lp0017.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.17]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 04:48:32 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=H85FCSHCDsnmOHdEMIGedtT0TMoZIhXY1af9TkhsGIc=; b=laNPTK599NDICF0vZeM3OflNhZ1aAkh9wXS+dOIrDMCEuz+5SAoyonGZs9aSRzYiiB60+WKjKDEveD1jTbQ3E9vqSjNgXqzaLhfsgI3x3rKHL1KrLjguwN8Raw/1Gw0TsI34vEkqxGUdDIYSfHX4gUgL8TclQ/BEqKXeRTrGIns= Received: from CO2PR04CA042.namprd04.prod.outlook.com (10.141.240.170) by DM5PR04MB0363.namprd04.prod.outlook.com (10.173.169.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Tue, 23 May 2017 20:48:30 +0000 Received: from BN3NAM04FT019.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::201) by CO2PR04CA042.outlook.office365.com (2a01:111:e400:1428::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 20:48:30 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.225) smtp.mailfrom=wdc.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=wdc.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN3NAM04FT019.mail.protection.outlook.com (10.152.92.173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 20:48:28 +0000 Received: from MILHUBIP03.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 D2.D1.19026.A10A4295; Tue, 23 May 2017 13:48:26 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 13:48:23 -0700 X-AuditID: 0ac94371-41ba798000004a52-82-5924a01aa58b Received: from penguito-adamm.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id DD.A0.18148.410A4295; Tue, 23 May 2017 13:48:23 -0700 (PDT) From: To: , , , , CC: , , , , Adam Manzanares Subject: [RFC PATCH v2] fs: block dev aio request priority support Date: Tue, 23 May 2017 13:48:04 -0700 Message-ID: <1495572484-8780-1-git-send-email-adam.manzanares@wdc.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5ka7UApVIgyVTTC26/m1hsXgxJcri w78/jBZTpjUxWmz+3sFmsWfvSRaLy7vmsFlMeLuOyeL83+OsDpweG6Y2sXls+jSJ3WNt+0tm j82nqz0+b5Lz2PTkLVMAWxSXTUpqTmZZapG+XQJXxpzurcwFrzUq1v6LaWC8pdDFyMkhIWAi cevKROYuRi4OIYGlTBJtM99BOTsYJfpunmWBqTp3ZRE7RGI7o8SPV63MIAk2AXmJtuvHmUBs EYEKiV/b17OBFDELLGOUWD1xNxtIQljASWLj699gNouAqsTV9oPsIDavgJvE/NsHGSE2yEnc PNfJDGHPY5XYcywGokZQ4uTMJ2BXMAtISBx88QKsRkhARWL+h92MExgFZiEpm4WkbAEj0ypG sdzMnOLc9NQCQxO94sS8lMzibL3k/NxNjJBgL9zB+Pq29yFGAQ5GJR7eBAeVSCHWxLLiytxD jBIczEoivEZeQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8WbJTI4QE0hNLUrNTUwtSi2CyTByc Ug2MMrYZpyStT741rHi5t8LBa91lZ9s37xSereL+dGHq1P2Tti1tmCOUndCvpPd2mcuWeuUf ZdIFNlfvHfYzNci1exw247POvfrDnfe49/6oOrTOUCtIKEvz5O2VlyWE7xyoa7Yo7Xuz1Wa3 6DXGPX2/dzx78o9JaLH+kcyOH98DVOMDdi6ca2ziocRSnJFoqMVcVJwIAETv8B5yAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLJMWRmVeSWpSXmKPExsXCtZEjRVd8gUqkwVVPiwMrbjJZdP3bwmLx YkqUxYd/fxgtpkxrYrTY/L2DzWLP3pMsFpd3zWGzmPB2HZPF+b/HWR24PDZMbWLz2PRpErvH 2vaXzB6bT1d7fN4k59F+oJvJY9OTt0wB7FFcNimpOZllqUX6dglcGXO6tzIXvNaoWPsvpoHx lkIXIyeHhICJxLkri9i7GLk4hAS2MkpMm/+AsYuRg4NNQFai64wuSI2IQInExtWvWUBqmAUW MUo8nvGHCSQhLOAksfH1bzYQm0VAVeJq+0F2EJtXwE1i66GfjBAL5CRunutknsDIuYCRYRWj WG5mTnFuemaBoZFecWJeSmZxtl5yfu4mRnCAcEbtYLw+0fwQIxMHp1QD43Km0isVHNt2p76+ PyM9f7sDA0vG386fBpxrT+atCeWsKBDwn/92lWPr7rXXfAQ+lLOu55qs31XNO8/bTeCLSfeZ pdWrRYxbYk6IrnJbtpGXh7WdOcpee95/7wmev7d8Kbl2d0Xs2beRO1zmqKlfnTw56caW7NX3 X1vwcj3RmK24xnZd9ObuaiWW4oxEQy3mouJEAOe3Uq7AAQAA MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39860400002)(39410400002)(39400400002)(39850400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(2876002)(33646002)(106466001)(2201001)(86362001)(38730400002)(105606002)(50986999)(47776003)(50466002)(81166006)(4326008)(8676002)(5660300001)(5003940100001)(356003)(6666003)(77096006)(50226002)(48376002)(8936002)(85426001)(305945005)(53936002)(966005)(72206003)(478600001)(189998001)(2906002)(36756003)(6306002)(54906002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0363; H:milsmgep14.sandisk.com; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT019; 1:6W1b4TWrNXdT+9Vyf0OfsbXQXBRskMyIotppcNfmtbFB7zRFu+AlfX3OWKg9WoYYXXr8sQyKlOsjSyzukvFkrqqkDoGbuORhjDx1DjA2DgI/Y8ymm6d6+vgLwGhTGlSLnvsnyGnu38MmA190ayJyDgrxG2hI1y1VCuq2MwYKtS0zDLdi8NcJ/OHuG+AFAR7cTLZPbM6vcZQy7laZtQ1HL6YFWOfrbvlx2wLTTV+PuSRaLpmKUd5XL+rYUV3MKWbFZubFEvMywgr1DXSNYNiOj0+pKXgGCoBrIiAhidg3GkHKhJgnFIKGO9RvBYQ7zkRVA14Q/glumy50wHpXhKbR8Luo8dM4oRfJyAqGpI7xEl+GFPyGAgUU+mtE9L7hYpY74zA19EUpPhgJNqNWY0xaJZ9HM7IZ9vWnAr8+qu9CGPH2Mzf5baex/u0zBpuipQRbcV5RnwaQwuReORO9uaLI/crPKqv4hCCs9KWWv5fRt/MGZN3mdmF1wVWtyUs8qSikr0J8sDfe8RmJ6gaRqoM1ucJSry/QQ+/+R4GMF8yIb5c= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0363: X-MS-Office365-Filtering-Correlation-Id: 77ac88d5-d5bf-4339-bb85-08d4a21d11b3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0363; X-Microsoft-Exchange-Diagnostics: 1; D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Xzfm03r5GiZ/2c0ojV3a/utgjwI1h2rZR1eTW/IRvw+iBlLjQkjD94RaWtofgZM/cbE6jMRzoDrFP+YpqmaDmCBAF7D9VnyadG3giy07dzBYLjyXNsudmE3UWN3TwNGd+NJ40hOo+T2Mpwh2OBDJeahNDUrozwK+f0QAso4UUGueb29PaMrFp50A8qKo1BetIVvQbGHF3fuqHjyzZcqEopQTQDo6sraivaQKVBHqwOmhA9llseYZXOAw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 20:PSc5oLQ9XbJxiIXcOJSD3KtOdVvxG+Os6sy3UlDV+KJkQyH652OMwWVP/jVuVu2P5b6C+Jq67E4uF2c8DXcm8CfiXdtoEhIVzuGPkDOvCMYDLBLu+0nQlZWUWZr5iwk55fL6eqmcO3hCcIokka26vKtoZK6EA+DFDhACcUExdVJytdfDwy95JJ0YI+tTjo35HVtupIeDCYVdMWcIWgT9QQ1n808iPRnI86MBBTM/8B4UKnZlbDBp00MTNvC7jlmTdiTZX8RvQuwvY9x2LY3SXcSlbi3JlXOUBgCwNf4PFwE2Rb2VNV6xZKJdT4SvkzCDbNTE/39Z2WCw013AtW1gYKuQLxqmvrhHHaOZwNs8Q3gzDwwG4htQe6Wlmiys3VCvvOoXJ3amHeZYCCG3v9qa98pc+WNlXQQrt0D0v09O/T3kbQMrxDDtnVU7iE0dnRLNHNIjtb/UYIp8EfXw8lBKY/jiKU7wae/WIpDZB3me/jvM0oPmqOjyNM1ppjKXFZ3y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13018025)(5005006)(13016025)(10201501046)(93006095)(93003095)(3002001)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:DM5PR04MB0363; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0363; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 4:767ywDcFP90MFFB+tZwVBNgZ3ZjccrFTw5ug5ejkoZ/0FYx9y0THyl0d4vfQGwdMvgw92iVdKoLxR2JDhUShfOvR/9avmiNDGta2RMEmbtYIruT72P44rk5+sm1A0Uo7bbAp7WgWogotEZIudDXy+J6KSfNEaLUnKCNvPot+DAtcsRU5FdnHys9EIfpldgTa7MaPjz8x/zSfImLCxAPB2SUh6syI5x4YKXmXFcSmzZGLD+8S6CVz04vpGg5xYOTHRIzmdWsnw2qnjG6d2E7na1Z29LlWirOljekIu2zkbFbPvHzrJM2m4Yf0a0DZq/wghf3dKOoCeYcS+N3mbvkH9tlbcfUHiZJJnd0He+BMCpB1vYiA9WGDLwDcplfNhtiuNcGhE+EwHwCem3PGxu0McgMBWiFvW+GCMY0u8xr0aS5lCSuzH+IgCRhceIH2RsfRyerHz6CMYKxmGewakY9pEKBnPqmwGGvy9A+3o7n646Y80+bwA5JBqkO+fMZNAtALCd98msGRXXyjyuYZy2hDThDL8rF8pwt4wUXvYMDljBhxQUCWU7DJOm5Pig6VjZVKc/tT8S4U1UqfLDkvlh36w4dgA1M6LFiyNQUtJEEVzHYNGUgcb5sjzBlmSuSK2EuD5E2oHXHV5GT+KM+ZxyFP7+TU/5/GrmEyIXwWlIrC2DYmGW5T9RcjLoWjird+Q+fYOw5EaEeRxsnksyc3ZSQKQ6SdIwRpJUajPxiZvsVTuzBzqZHotDkOw8/Kg85Vg2NvFNDzgb94C+zExSpHEpvFOSAsyvc0uNGbyaJSpa2EjRExapiCsW4YGY9WsizMP0t749eq5D88yd4exU2pXm393RoWWGYn4mPzxu34Wj6oqMuhxgJvqdnGL3twwL/k+Ip+ X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0363; 23:6HcWSxwwIKHOXmS5nNQOK7/Ub0UfOqmC0fIRffUNg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9Z8Y5nwej354dJ67pKu0WLu1ew0tCqKIO8aPAqEXeOVeqJE9wj8t/cnltJPVI4Hs2jilc3+luNSaho8/oJva5xlow1oef5oU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 7:9310oTIvU5qp3VjswdI86tlCo+FGJKtAqyGQMrXjJ6QE9h65KbX5TQKpFoCS+R1ayyzh2qwDfYEucJN9fIxy6B7IdcTaZhIR2Krze/shunOFfMhMEEZp+dX8lj+6x575RsBHAVA2P64oG3XEjALJblZW7hrR6t95pDgPY/G+mOD+Ys03axgdhqaL+CoOnAii4NImdH1XZJ7mWIoZmNLGe0xOBuGi6gXuIUqBJJnrWoqOXKbnvjLpSyt028NxFxZxJRjiXhC/bsGdK5RQ1QdP3M/233WeUzpPEbIdk58j8CajqWrAgdUUG4drK+zPHpd2xX0+LEMxN5Gf7aHOqGB9Fg==; 20:VWp8LMNTJFfn6h6n51HWYTgpv1wcGrisetbTX1AkNgKC/2w6RyeiLlyBMtv0qsPbbcF7BwwDBe7ImHizzG+JypH9xffUCmLhZ1sJfQHGnDv9XLv6Dyw1abol7BKimVNnpeuvkWBYFc4qYUktbBrbcHsfoOSbWAHAvaAzoluQBFk= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 20:48:28.7075 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0363 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adam Manzanares Map the aio_reqprio to the bio priority field at the point the bio is created from the aio iocb. The aio_reqprio field of iocb is used as a kernel IO class and priority iff the RWF_IOPRI flag is set on the iocb. Late last year device IO priority support was introduced to reduce application tail latency when iopriority information was set on the process [1]. This patch mapped iopriority information to block io requests. This information could be leveraged by device drivers to build device specific prioritized commands. The iopriority is set on the iocontext which is a structure associated with a process. There exists a system call to set this iopriority information on a process, but I believe it would be useful to also have a mechanism to set priority on a per io command basis. The aio iocb has a field for the request priority which is currently not used within the kernel. This patch leverages this field to pass a per command iopriority value to devices. This work leverages the work in the previously referenced patch [1]. When the bio is generated from the iocb we copy the iocb iopriority information into the bio, which is eventually turned into a request which also gets a copy of the iopriority information. To demonstrate how to use this feature I modified fio to use the new aio feature. The modification to fio can be found at [2] and the new options are cmndprioclass and cmndprio. This update is based on the work of Goldwyn [3]. Signed-off-by: Adam Manzanares v2: - use aio_rw_flags to indicate aio_reqprio should be interpreted as an ioprio value. - update reference [2] - add reference [3] [1] https://lkml.org/lkml/2016/12/6/495 [2] https://github.com/nmtadam/fio/tree/cmnd-prio.v3 [3] https://patchwork.kernel.org/patch/9722789/ --- fs/aio.c | 8 ++++++++ fs/block_dev.c | 1 + include/linux/fs.h | 7 ++++++- include/uapi/linux/fs.h | 4 ++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 9616dc7..7043711 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1605,6 +1605,14 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, } } + /* If the IOCB IOPRI is set then the aio_reqprio is interpreted + * as a IO scheduling class and priority value. This is then + * set on the bio that is created from this request, which + * enables the priority to be passed to device drivers + */ + if (req->common.ki_flags & IOCB_IOPRI) + req->common.ki_ioprio = iocb->aio_reqprio; + ret = put_user(KIOCB_KEY, &user_iocb->aio_key); if (unlikely(ret)) { pr_debug("EFAULT: aio_key\n"); diff --git a/fs/block_dev.c b/fs/block_dev.c index 519599d..d3cd6e4 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -360,6 +360,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) bio->bi_iter.bi_sector = pos >> 9; bio->bi_private = dio; bio->bi_end_io = blkdev_bio_end_io; + bio->bi_ioprio = iocb->ki_ioprio; ret = bio_iov_iter_get_pages(bio, iter); if (unlikely(ret)) { diff --git a/include/linux/fs.h b/include/linux/fs.h index 2a7d14a..ac4bc7f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -269,6 +269,7 @@ struct writeback_control; #define IOCB_SYNC (1 << 5) #define IOCB_WRITE (1 << 6) #define IOCB_NOWAIT (1 << 7) +#define IOCB_IOPRI (1 << 8) struct kiocb { struct file *ki_filp; @@ -276,6 +277,7 @@ struct kiocb { void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); void *private; int ki_flags; + u16 ki_ioprio; /* See linux/ioprio.h */ }; static inline bool is_sync_kiocb(struct kiocb *kiocb) @@ -3061,7 +3063,8 @@ static inline int iocb_flags(struct file *file) static inline int kiocb_set_rw_flags(struct kiocb *ki, int flags) { - if (unlikely(flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT))) + if (unlikely(flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | + RWF_NOWAIT | RWF_IOPRI))) return -EOPNOTSUPP; if (flags & RWF_HIPRI) @@ -3072,6 +3075,8 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, int flags) ki->ki_flags |= (IOCB_DSYNC | IOCB_SYNC); if (flags & RWF_NOWAIT) ki->ki_flags |= IOCB_NOWAIT; + if (flags & RWF_IOPRI) + ki->ki_flags |= IOCB_IOPRI; return 0; } diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 29969fb..ede8c9d 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -356,10 +356,10 @@ struct fscrypt_key { #define SYNC_FILE_RANGE_WRITE 2 #define SYNC_FILE_RANGE_WAIT_AFTER 4 -/* flags for preadv2/pwritev2: */ +/* flags for aio & preadv2/pwritev2: */ #define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */ #define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC */ #define RWF_SYNC 0x00000004 /* per-IO O_SYNC */ #define RWF_NOWAIT 0x00000008 /* per-IO, return -EAGAIN if operation would block */ - +#define RWF_IOPRI 0x00000010 /* per-IO, interpret aio iocb reqprio as ioprio */ #endif /* _UAPI_LINUX_FS_H */