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 27D0FEB64D7 for ; Tue, 20 Jun 2023 06:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbjFTGQb (ORCPT ); Tue, 20 Jun 2023 02:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbjFTGQ3 (ORCPT ); Tue, 20 Jun 2023 02:16:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 160D910D7 for ; Mon, 19 Jun 2023 23:16:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 84EDA60FD7 for ; Tue, 20 Jun 2023 06:16:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5C47C433C8; Tue, 20 Jun 2023 06:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687241781; bh=LMpBGTUUUELkIM6EQvSKyMUkDFcwpA6qZ213us++S/A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=McUN6c30/9B3DyabSlV3RNOLOHpvJxz3x2/QO/PqBi1TJJTBj3ovgS4HP0J/GaEXe KDhYuEFd7/lPv4hkpbvMCsxo5+Me0Ixyf9I/NUQjXVT4G6twavRfo5HcXshpgWFF5G MlrdanTDPkbYMwgsyND8dU3Jw1wKB2kxOVYSO+XXWESEy4pXfYBwZC/nRoON+mTobc QB1yN0kBk/rlxO9no3utaa4R6KHWzbfzdCvjzhtVqwnw3wfTSWsxdG8f9KRmpci8PJ s+viyKm8QgrKQX3aEy6cc0z5btJ0KGd4FDQzZjdwY991SaF5kuwphQq4SgCoJyb9Gz 3EyLjHvJxcB5Q== Date: Mon, 19 Jun 2023 23:16:20 -0700 From: Jaegeuk Kim To: Jens Axboe Cc: Yangtao Li , 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1dc1a0f2-9be4-8ae0-da26-3c00c8a71b41@kernel.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/19, 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? > ... > ->write_end() <- or this one? > ... > balance_dirty_pages_ratelimited() <- this one surely does... > > If you look just one level down the latter to > balance_dirty_pages_ratelimited_flags(), you'll even see the 'flags' > argument documented there. > > This looks pretty haphazard and cannot possibly work as-is, so please > get this reverted until f2fs is converted to iomap, or IOCB_NOWAIT is > handled by generic_perform_write() and below. Thank you for pointing that out. It seems I haven't reviewed it carefully. Hence I removed it from -next, and hope to have some time to convert iomap soon. Thanks, > > -- > Jens Axboe