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 X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFCDFC433E0 for ; Wed, 29 Jul 2020 12:42:53 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFC0E2083B; Wed, 29 Jul 2020 12:42:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="J0M4RLb0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="jh8IXlC2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="si9k9B1A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFC0E2083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k0lQ3-00053x-1q; Wed, 29 Jul 2020 12:42:51 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0lQ2-00053j-80 for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Jul 2020 12:42:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wW1jC8hGuaTyKQN+P0l+pQbgm9XBFi+QHPJPhflJGo4=; b=J0M4RLb0+9+ZUGSWZBiL/Jd+SD XTZV9Sv0otngFTw907PGomFnTzWSQIPdxlj5J8ntPeYiilQ7FBTi6l1u097fr7amJxkyfJYpfbmU3 LXSQpLVw69+lQPQdNwylYUTF5qfmsn9jwrZ5Q6h6Mk5xTY7J+d0e+YXxMYhjq00EVySI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:Cc:References:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=wW1jC8hGuaTyKQN+P0l+pQbgm9XBFi+QHPJPhflJGo4=; b=jh8IXlC2isb7L4S8jskEWBbsEk en8rkwelyg/kkbcPk9yOzyRVaPi1V4iE1Ls/I3tVcfo4sHTlryMsuxoeg37SkroAtaJXk4pksh9GV 1LZfFAgImeYGghhjKennPmgNuEJ7CAmzWFmH8kDa0MkA9TMhrqGjzoWj37uxQIXlVOZ4=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k0lQ0-003DA1-Ta for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Jul 2020 12:42:50 +0000 Received: from [192.168.0.108] (unknown [49.65.247.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D2142083B; Wed, 29 Jul 2020 12:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596026551; bh=mlZ/EsaMb/ND17rYj369D7zDyCStn7kc/8QnXsr1+ks=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=si9k9B1A5fSTY0airfSOHiXA74mNbarCYSzoFBGKhbT3Zt1iYPV0PvKsIYd6nfZja xxoDG+wWK/5289wsgOpBuhPGjKRMeLE95J80+c0eZnBZiRBLB1KqwawcAV+sLtRxb0 9gNR61RG39J1bpB63DDA7lPsipwIkQX7qEGXXoAw= To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com References: <20200729070244.584518-1-jaegeuk@kernel.org> From: Chao Yu Message-ID: <054f161c-05db-73b7-3d83-be7addcd6015@kernel.org> Date: Wed, 29 Jul 2020 20:42:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20200729070244.584518-1-jaegeuk@kernel.org> X-Headers-End: 1k0lQ0-003DA1-Ta Subject: Re: [f2fs-dev] [PATCH] f2fs: fix deadlock between quota writes and checkpoint X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daeho Jeong Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2020-7-29 15:02, Jaegeuk Kim wrote: > f2fs_write_data_pages(quota_mapping) > __f2fs_write_data_pages f2fs_write_checkpoint > * blk_start_plug(&plug); > * add bio in write_io[DATA] > - block_operations > - skip syncing quota by > >DEFAULT_RETRY_QUOTA_FLUSH_COUNT > - down_write(&sbi->node_write); > - f2fs_write_single_data_page After commit 79963d967b49 ("f2fs: shrink node_write lock coverage"), node_write lock was moved to f2fs_write_single_data_page() and f2fs_write_compressed_pages(). So it needs to update the callstack. - down_write(node_write) Otherwise it looks good to me. Reviewed-by: Chao Yu Thanks, > - f2fs_do_write_data_page > - f2fs_outplace_write_data > - do_write_page > - f2fs_allocate_data_block > - down_write(node_write) > - f2fs_wait_on_all_pages(F2FS_WB_CP_DATA); > > Signed-off-by: Daeho Jeong > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/checkpoint.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c > index 8c782d3f324f0..99c8061da55b9 100644 > --- a/fs/f2fs/checkpoint.c > +++ b/fs/f2fs/checkpoint.c > @@ -1269,6 +1269,8 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type) > if (type == F2FS_DIRTY_META) > f2fs_sync_meta_pages(sbi, META, LONG_MAX, > FS_CP_META_IO); > + else if (type == F2FS_WB_CP_DATA) > + f2fs_submit_merged_write(sbi, DATA); > io_schedule_timeout(DEFAULT_IO_TIMEOUT); > } > finish_wait(&sbi->cp_wait, &wait); > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel