Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16084772rwd; Mon, 26 Jun 2023 05:40:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V8HhSChff3ghQhGwjSHuULlwZmJp6iaBgoDT4lACgl8iL/5tu64T3PapQMm1V+zIM8TIf X-Received: by 2002:a50:fa90:0:b0:51d:a10f:4af3 with SMTP id w16-20020a50fa90000000b0051da10f4af3mr923125edr.11.1687783254350; Mon, 26 Jun 2023 05:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687783254; cv=none; d=google.com; s=arc-20160816; b=MwXFs9D+8EaBy2Itr6iz9/IzYFxsNcpgHYyxbWlkXqDeK83TykZoKiMUCdQM5Zovfh L3KTX9rbXAnD3CrbqB0ZMSY3lo1SmVELlS/xNPkguTs2bbVKGQP2n2iL9q1iBnNi6i+c EVM8PwEqlecCu4fpvQDf6fUqVdEVYHu8YRpnpxlmcWnIT/RBxVJeJq8Yaad9agCti/EY OFSY0WFSVXFou47R0fw/EqSVI2ogJZmvoWMUGlo4mFhZ2JAMez4FkfbqvQFrzgS65+ai TxabsTkjkbpJBGyL/mnD628u07CxMUkUGkWkcxcoQ636e+pM3XF7VBrxUAullFgNqFrz qurQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=R4tjfUZZ3ZzgCOG/Djcs2zoeSaqHM5jLeuwOhbQ5exw=; fh=fuuRfZX42YTe2Hz+A51fj+TVVYi45KuCK41CS2slSKs=; b=nC99c4V9xsFGjGC+8AxL+eVCqWrCoxF8ZUbdbBZBMd3w7o7WeWA+wBjXxQG/2ZzVoa yxK0v9uu9TAhMXAKNsIIYUFuCNTH1KHVunarFSRUf3evrsndyQG9C1A9/7pUs5x/Wl9m TbHV89uqflnYkkeGGLeGhfqVmCKICtruUNl4i34SpjOaH3qi+Zcf9WZW2+O8qXuEifXB kA/EiuiQqA8yTYiv0M9DsKpyRToikhkrL2OBEajJqp55AFuwSmdmFolbkZtNm9Ez5AEQ tSYgtNq1M8S6Mlr5ZagobqZ90yR8AFtptc38ywHlQ5/Vghy7fFx8AacJgLmPtFxqXRJT UFHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vERxQwvE; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020aa7d7cc000000b0051d890b2406si2319933eds.611.2023.06.26.05.40.27; Mon, 26 Jun 2023 05:40:54 -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=@infradead.org header.s=casper.20170209 header.b=vERxQwvE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbjFZMRW (ORCPT + 99 others); Mon, 26 Jun 2023 08:17:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjFZMRV (ORCPT ); Mon, 26 Jun 2023 08:17:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EDD7E56 for ; Mon, 26 Jun 2023 05:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=R4tjfUZZ3ZzgCOG/Djcs2zoeSaqHM5jLeuwOhbQ5exw=; b=vERxQwvE3o7wKKT+TE3cMyGukY 0Wen//vsB9rcCl+/Nvx5OmSyJl4WYQYH/izrhNOBzMD91XX+3zp1tW4vucFWCLuSNA6k1f9zqMtBV BPLJ3yMw9Xbx8hndsmi7UvlvC3SrfZAxVrw4yctl+TuFSTecnSGaVqevmGzqb3aA0Gu8xoZDXiSnY 1LKj0AVEOyrgX7f6Rq2G2mJGMB1k9R/RXIegO4M5YO3cf+wqT3I58ZFsg10Xj+HI+6kQvyEo/zIcM GoMhnVcIGmdNgYHMijFLSpt/ccA1Cmvav9XnUqMWVcSbl1CEENBfd3SNi9amTlV6Iw33gP1aaBxgC cAG6aWAg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qDl8s-001hPT-Ki; Mon, 26 Jun 2023 12:16:26 +0000 Date: Mon, 26 Jun 2023 13:16:26 +0100 From: Matthew Wilcox To: Yangtao Li Cc: Jens Axboe , Jaegeuk Kim , Lu Hongfei , linux-f2fs-devel@lists.sourceforge.net, LKML Subject: Re: f2fs async buffered write patch Message-ID: References: <1dc1a0f2-9be4-8ae0-da26-3c00c8a71b41@kernel.dk> <953510c3-4bcd-1426-3527-09d5cbdcf8cc@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <953510c3-4bcd-1426-3527-09d5cbdcf8cc@vivo.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Mon, Jun 26, 2023 at 03:31:57PM +0800, Yangtao Li wrote: > +cc willy@infradead.org > > > On 2023/6/20 4:43, Jens Axboe wrote: > > > Hi, > > > > I came across this patch in a news posting: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=d618126911829523e35a61f4a5a4ad159b1b2c8d > > > > which has me a bit worried. As far as I can tell, all that patch does is > > set FMODE_BUF_WASYNC, and then just hope that the lower layers handle > > the rest? > > > > What happens if iocb->ki_flags & IOCB_NOWAIT is true, and now we do: > > > > generic_perform_write(iocb, from) > > ... > > ->write_begin() <- does this block? > > Most file systems have not been changed to the iomap method, That's what needs to be fixed. > and the generic_perform_write method is still used. So it seems > > ?reasonable to make IOCB_NOWAIT be handled correctly by the > > ?generic_perform_write function. This means that we need to modify No. Use the modern infrastructure. > ?several places mentioned by Jens in the generic_perform_write function, > > ?and need to pass AOP_FLAG_xxx or iocb into write_begin. Definitely not. > > I noticed that Matthew Wilcox removed the flags parameter in write_begin > > in a previous commit, maybe we can add it back? No.