From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF42FC433FE for ; Wed, 18 May 2022 23:20:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231129AbiERXUb (ORCPT ); Wed, 18 May 2022 19:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230058AbiERXUb (ORCPT ); Wed, 18 May 2022 19:20:31 -0400 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1713FA477; Wed, 18 May 2022 16:20:30 -0700 (PDT) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.17.1.5/8.17.1.5) with ESMTP id 24IN6CGe020560; Wed, 18 May 2022 16:20:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=jSDaLL7PpMNCK6/3LG8vj7vIlytoC6N7QYHc/SSClJA=; b=HacxJ0R25SawGi5wH1mybqqUbjHjMkins204Wpt8iBp8jkw1bGvuM2r4uacSZhYEw48N 3pFL5PeIthbgA+H8Mhu1QojbsHPx9ZcV39qkV08SP0qDzT8LMhb7UQMc2y5VPACR2CZp sV056o8zmlTGyCEvGoN6ECuDNWlbkXw6ru8= Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by m0001303.ppops.net (PPS) with ESMTPS id 3g4myhr4q1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 May 2022 16:20:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O73YVtUySXb2ehyx+A3S3Wj0WTlV6sQkR8RHGetFofvvyoiEaEtkvlBwbd9krgrjWIm/lLroxSMoRCBhyd6n/1DHhmSf9y38Ce3qnX4+Dhuo6VE+pmgM7NR1qPlQ+TjfzZ0E5toxk2UA57o0tEupR+n1S6vCaGNVJK/9SIWRN7l99HS3lJ91Hkn7q8MEPx0HwqOSeOYGl42mshXyXOSEwox+l1BT5RH94mLmvG5l/oh+WAp1RdpfT3dnhnVop5o9GaQScH8SSfQiqZqj86hE9v+uv+1lYM9PQx0bXppfTK8TPmaPGTy7IvPtgG75KkIucM/od5Vc98iCnt/tZJe4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jSDaLL7PpMNCK6/3LG8vj7vIlytoC6N7QYHc/SSClJA=; b=jJfgFFhoVpPmRs6BuilQ59mqD65qvANNJKOLWp9A6Dhn8WekGIRNLpOocRj5JAiwJCD56xZ8um61S/xSLqmjeP7OrpbMhmxxtofm9SX0C78R58ZgnS5QQSQolDUcIyIhUTrEmb93Zt78hOxhNTSZjxBXOW5OzJFAEkE792pCKZ3b7o9aox8qC0AqYPa16MMj0dpmU3H7fwA1wdluy1JRKuKFnEByDeeeyA+YpeE16yW0dMkHJakPLFFLom/0O+3Ul8QDiZcj8kZQrvCACFQFM+v/q4lrvE6QPHl88WfwZtrR2QSXCwkkIZbfG6bEg1YOmSymC9enkqJ0pfpn1ImVgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from PH0SPR01MB0020.namprd15.prod.outlook.com (2603:10b6:510:76::6) by BYAPR15MB2773.namprd15.prod.outlook.com (2603:10b6:a03:150::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13; Wed, 18 May 2022 23:20:07 +0000 Received: from PH0SPR01MB0020.namprd15.prod.outlook.com ([fe80::ad90:787e:697e:3ed1]) by PH0SPR01MB0020.namprd15.prod.outlook.com ([fe80::ad90:787e:697e:3ed1%2]) with mapi id 15.20.5273.015; Wed, 18 May 2022 23:20:07 +0000 Message-ID: <6d052a01-64cf-749e-df2d-1919317a2e03@fb.com> Date: Wed, 18 May 2022 16:20:05 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [RFC PATCH v2 01/16] block: add check for async buffered writes to generic_write_checks Content-Language: en-US To: Matthew Wilcox Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz References: <20220516164718.2419891-1-shr@fb.com> <20220516164718.2419891-2-shr@fb.com> From: Stefan Roesch In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR03CA0017.namprd03.prod.outlook.com (2603:10b6:a02:a8::30) To PH0SPR01MB0020.namprd15.prod.outlook.com (2603:10b6:510:76::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 183039c7-d1eb-4c40-2977-08da3924f241 X-MS-TrafficTypeDiagnostic: BYAPR15MB2773:EE_ X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ov475/ErDehsN83mW4QkMJ5UjNE56BgWvIn7touVBjEOlBfUX0u2wt6YgoQnPlu9EzJ7gYlpNzd73oey1ru+16B2El3HyV5xSo0TBKBXhfXoQy2jRqH27vPDCSj0wOfUg/mf5q8GsHLeKAKnHWTkN178bIRLj2ti5x3g+mrOsllXCOuJUwvxIQi40xjeyFbfnUaf2wRF6VBcJJpiNYxSgwNIbcuIJVVQWyCmOxH8gVd7QyCj5hqwY+KQJqtNIQKKbpV0i4VvFR/TbrTJYAWvzPDHCrGhQXzZZgDfaVtyfkgyZzuL4diariinVA2OaN2nUEkRqQ1rgvUGE0FzLPjZwQrpLmctIsqZzaud75fv3tPxXhAA172wfwISxm7MeM6hIz1417+XsMaYJ01zpKkakgGQoZj12/NV+Pax9mM9eW5BUTfi1/zUYXi3DBMvubxvGIzVcWd8nPETiVRCrm6d8bo0m67hJiRYqp8U/86IOVHfrSWBBZnZGKKXoISiItGUJ3R1Z6W1HZ7yw7cOzl8mLUn3Q7wjwz69OH0uF2Tv+EWEuh2CJDKoMh0KYzWTv8oORpV78tANbtuTZOXWS315c/qqdaL9yx0kuKVm8+vH+rgKFw4x0/+qjLGK/aoTDoor6tq7BFfXvDyy0b1Q4zpJNDy7gUrTol7tBkMZ2xb3x1kEgAb9vkZzSqqnZMpPd8umxWd/0Ml64xaR6FAEwpreK8wsuqooFpH9+2tdv3fV3ROJPtx0t8p37o457g90Tcz1G9dY/CNlUbE/IWQTFwmPMg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0SPR01MB0020.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(53546011)(31696002)(86362001)(6506007)(186003)(2616005)(83380400001)(38100700002)(2906002)(8936002)(4744005)(6512007)(66556008)(8676002)(66946007)(4326008)(66476007)(5660300002)(31686004)(6486002)(6916009)(508600001)(316002)(36756003)(41533002)(43740500002)(45980500001);DIR:OUT;S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zUEF6b2w1Z016aCsv?= =?utf-8?B?S1crWjZXMElEUXl3ZDNqMHpSZDhTSlMwTC8zTzNHWW8wdUFudmJVYkgwSzRY?= =?utf-8?B?VnJ0WjVDcDMwTE5LOGVtOTcyWHFXam1yaXZ0VExEa1BXam9MQ0p6RTVqN0RM?= =?utf-8?B?MFlqZi9FTW5LV1V6UnY2bUZaaHhFWHgvZGEvb2dsQkdjVUhMQWMzaGdObGhC?= =?utf-8?B?N0JJZHNpcm5yVi9palFhb2pHc1ZKbFpocmRHK2VHZ0xGWWtoQkNxQ0RZZHEx?= =?utf-8?B?RVQ3djByYjJMWnNMSGpwZlUxZlJmenR3WFFvSDZXMzQ0K2xPL3ZKU3pDc1Ru?= =?utf-8?B?ek1ZTXRRZlV2czNqT0F5WjBBUEdYdUJteFNiMzY1TGxqWmoyMUIyVUcxVlJ5?= =?utf-8?B?M2FPdDRRbUZXQUxoTXo3dzhwNk5hbTFGOUtscFB0Nm83MDEvVGRleE9IbkRq?= =?utf-8?B?Z2RHejA4c3VZYzE1RXdPQ05IclZSZ3ArQ2phLzF3NS82Z1JuS3FpemhJOUxE?= =?utf-8?B?bVA3UTdKbi9vNGdRUVFtMCtBSjVCVGQ0OWxxdmNSUmtnenYwelpWTkVwTmYx?= =?utf-8?B?dU12S0wzNFErMkNLcXlnanlxQ0dBQ2NOcC9IMjFyYXQ2RkxJcUtJYngwZktO?= =?utf-8?Q?w7V5GUxifycP6o/A=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: 183039c7-d1eb-4c40-2977-08da3924f241 X-MS-Exchange-CrossTenant-AuthSource: PH0SPR01MB0020.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2022 23:20:07.3559 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ffu+pOHVK/ONom0YwnES2/BWsCyn/xSOowkmi1FWVPs+na8vnZUxkiRyScQ3G2/J X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2773 X-Proofpoint-ORIG-GUID: SrJ8uWlNhNy_jNl_kaHUjQEAvkn_LRvn X-Proofpoint-GUID: SrJ8uWlNhNy_jNl_kaHUjQEAvkn_LRvn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-18_06,2022-05-17_02,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 5/16/22 4:43 PM, Matthew Wilcox wrote: > On Mon, May 16, 2022 at 09:47:03AM -0700, Stefan Roesch wrote: >> - if ((iocb->ki_flags & IOCB_NOWAIT) && !(iocb->ki_flags & IOCB_DIRECT)) >> + if ((iocb->ki_flags & IOCB_NOWAIT) && >> + !((iocb->ki_flags & IOCB_DIRECT) || (file->f_mode & FMODE_BUF_WASYNC))) > > Please reduce your window width to 80 columns. It's exhausting trying to > read all this with the odd wrapping. I'll reformat it in the next version of the patch series.