From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4940826CE05 for ; Thu, 6 Aug 2026 03:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785987981; cv=none; b=dqtp0P1Rj9+I9KTFTGmZXVXdepitiwVvYf/UNnlRUJdHyD0Um7Gm/aNS4NFQGfmI8KKh1e0LTOeIupokKnrcneQuRSUHt5GKsC+lzYnj6FK/YbkrRcPaihVezz8WuJjB6EXsYMXm/qSEsttVhGvjHa6+3HSpG0UzjyMJWjj71o0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785987981; c=relaxed/simple; bh=RjhEW0JG+9GDpP21WXG6mJ4BEbu+4Ne2bgc2Ht4P1Jk=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=PjOSIJXouB1UmhaPSNVsWtDwbrpq8HOHOf83EzzvN1P804yyZliJJAEa0C7PNU5InB0EjB6cbI12vKmKMXbd8jak7uQ6K19ijC+I6p+08qSzCN9KNnliA13BCbhZRDTwTp5sVuJoPMGB0feSlw69le0KYkMfm6vrt1JXB9wI1R4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jLSX2he8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jLSX2he8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6CDB1F000E9; Thu, 6 Aug 2026 03:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785987979; bh=tTwTLI+UIrcEevjMkJikN9bmk0Ls6I0nX2D9AGAaDik=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=jLSX2he8i5rDUE2t/O7FwJ5ZfSDgOyDorU9F8GmZe8VNqCDrNtME7/YcLZ7p1c304 boJ27M0y0Ymqy8DcIZUFimjCPnsEq8GwZYFVHiAGNhxt0lWsNyiYwvNDKsoUGp2BM8 ml7tX9mzbp2zXtgAbVmQluMgfA0pRcze0x2BGV+AbX49S8YWB+KQwhUcBWQJ1Bdejh a5M+3OuwoEqLHDVdvgPFh6p9y1TGxj2fsUEWm9KrCUtdZXWjUPsiqIIpMWtE7FnZIW 5TpstDqesaon6txMxGvmhtkpNGjwkQJDHQ5BGCL6hP7wb2oKw85UWGri4tvm9YHueq n9wJA4i8OFeSw== Message-ID: <7320b711-ab5c-4ffe-a6c6-86bfed6938c8@kernel.org> Date: Thu, 6 Aug 2026 11:46:16 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Dongjin Kim , Daejun Park Subject: Re: [PATCH v3] f2fs: issue multi-device flushes in parallel To: yonggil.song@samsung.com, "jaegeuk@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" References: <20260806033918epcms2p7fa34d6df7c1045b19ac026d44b877f2f@epcms2p7> Content-Language: en-US From: Chao Yu In-Reply-To: <20260806033918epcms2p7fa34d6df7c1045b19ac026d44b877f2f@epcms2p7> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/6/26 11:39, Yonggil Song wrote: > On a multi-device setup, submit_flush_wait() walked the dirty devices > in order and aborted the whole loop on the first device whose flush > failed, leaving the remaining dirty devices un-flushed. Each device > still needs its own data made durable, so a failure on one device must > not skip the others. It also waited for one device's flush to complete > before issuing the next, even though the devices have independent > flush queues and could be flushed concurrently. > > Flush every dirty device best-effort and in parallel instead: build > one PREFLUSH bio per dirty device, submit them all, then wait for > every completion, returning the first error seen (0 if all succeed). > This bounds the flush window by the slowest device rather than the sum > of all of them. No caller depends on the previous early-abort > behaviour -- fsync only checks whether the return value is zero > (fs/f2fs/file.c). The checkpoint path (f2fs_flush_device_cache) is > unaffected; this only touches the fsync flush path. > > The per-device bio/completion array is small and bounded (at most > MAX_DEVICES entries), so allocate it with __GFP_NOFAIL rather than > keeping a separate serial fallback path for allocation failure. > > Signed-off-by: Yonggil Song Reviewed-by: Chao Yu Thanks,