Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22534428rwd; Fri, 30 Jun 2023 09:09:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GDM5wVsdxdNroQkfh0UzbwK8+DNvWhorHWCp+ctpFnZTvNekqCwEsMpLff4bUEI9BPUJ6 X-Received: by 2002:a05:6a20:6a0c:b0:127:6bda:a2ae with SMTP id p12-20020a056a206a0c00b001276bdaa2aemr3655570pzk.10.1688141373910; Fri, 30 Jun 2023 09:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688141373; cv=none; d=google.com; s=arc-20160816; b=bNzHaj3TMrreTGUGs2uL/uh1Vfpus5noe+Kv0/CGDyEilhEV25UHcmo+CYSiZ9BK43 jCtgLspxpPMxeTb0iYaefjzugXYSpp5mvUq3FJPKoChpDkzbC60Aqrk56lYUg0vJA+a6 17h9u67TNaFoAjWv1GaFSEZ3slzqJrQvkIv9I1Hp9KFBEF1BWJJP5ErxqKjIqJav9wCT 1JV2bW14/lapvHixJWpVqx4YBFfYbtP4nol/fwhmvSomujh1c25ApWDlm9lvCNqSmva2 xx2CVHSiPTeko1pZOKlaim53nqaHwQ4/RB1eRAoQ759BsSfefM9NyVVSrlhSBB6lETpW 8VVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=bGGz8DiANSWoI5a6kGLb5e94iILUQVr5jzEPV3uc4I0=; fh=88xztwvQK9gPiibJKA0w60EmXzLJx73R6o7rbom+RVk=; b=phqioSwjoNfuyw9mOYdzHm1sYMktKluPMyXaRoKcvxIGsayMKv/EI3FuRoxmiX+6HW g2TFAunbORHfCIiPCUMyD/rp38bymffgOVPOvd7ZcQSoHRw4sQPYC/zrdL2Bp7C2p+5Y 6IsIkI9Q+Dw+DoGx0H/kt3CSPUmFDeTxypJo9Cn1lRLmFaJsagQfp7pCU2GQFe30Pe0U cR1zsa79rh1LpDJqWUcNniOisKnmVR7L4tpCjhUafcxUrtTDrNPoB96My1XxtAtwb1yW RlUs3wyD/9DMSgrDkXVHI7haAXGCfR0BLvWJpSW3ahrr0JT42bIeEvMtUHkejWzywnDy mDlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L9tAb+6Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u42-20020a056a0009aa00b0066886c86747si10076902pfg.310.2023.06.30.09.09.19; Fri, 30 Jun 2023 09:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L9tAb+6Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232729AbjF3QBY (ORCPT + 99 others); Fri, 30 Jun 2023 12:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232036AbjF3QBU (ORCPT ); Fri, 30 Jun 2023 12:01:20 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 316813C0B for ; Fri, 30 Jun 2023 09:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688140829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bGGz8DiANSWoI5a6kGLb5e94iILUQVr5jzEPV3uc4I0=; b=L9tAb+6Y6YS+YY+TV2FRhwDuJL8KHCXYykNHMBLOqRt8gGy9VWG6YzxAX8YsxGLSCuUXF0 AwsJMja4ehXiYE5mKveqF+lRAPgRz4itqmkysAugj4KntFcMYeYttzd+ADkSPaAhTix56v 8QNbAz61nqgv31GHkJ0sGEceihh19SM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-6IJV-npHPyCrw__XkncbgA-1; Fri, 30 Jun 2023 12:00:23 -0400 X-MC-Unique: 6IJV-npHPyCrw__XkncbgA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8911138035A6; Fri, 30 Jun 2023 16:00:21 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A5BE2166B2D; Fri, 30 Jun 2023 16:00:19 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <36eda01e-502e-b93d-9098-77ed5a16f33c@kernel.dk> References: <36eda01e-502e-b93d-9098-77ed5a16f33c@kernel.dk> <20230630152524.661208-1-dhowells@redhat.com> <20230630152524.661208-4-dhowells@redhat.com> To: Jens Axboe Cc: dhowells@redhat.com, Al Viro , Christoph Hellwig , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Christian Brauner Subject: Re: [RFC PATCH 03/11] vfs: Use init_kiocb() to initialise new IOCBs MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <662383.1688140818.1@warthog.procyon.org.uk> Date: Fri, 30 Jun 2023 17:00:18 +0100 Message-ID: <662384.1688140818@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens Axboe wrote: > One concern here is that we're using IOCB_WRITE here to tell if > sb_start_write() has been done or not, and hence whether > kiocb_end_write() needs to be called. You know set it earlier, which > means if we get a failure if we need to setup async data, then we know > have IOCB_WRITE set at that point even though we did not call > sb_start_write(). Hmmm... It's set earlier in a number of places anyway - __cachefiles_write() for example. Btw, can you please put some comments on the IOCB_* constants? I have to guess at what they mean and how they're meant to be used. Or better still, get Christoph to write Documentation/core-api/iocb.rst describing the API? ;-) David