Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp563379lqb; Wed, 29 May 2024 04:28:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHRRXoJsPsZVDW+ardsh9pDbMdXKI0nh/XrncVxico1zjX0hDzbVA9RLbv9gMp/2hzBpbneoUn6K1aFI1Jm/1ZrldccJilGAVWWaKaLQ== X-Google-Smtp-Source: AGHT+IFd4cx/ew44TDq/XAeMnuA3dQ9VKso05kSl60TULcWs+yg2Il/OmTzEINPoSli+6ZM1XP8h X-Received: by 2002:a05:6a00:1f12:b0:6ed:1c7:8c6b with SMTP id d2e1a72fcca58-6f8f2c56b89mr15118862b3a.1.1716982088586; Wed, 29 May 2024 04:28:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716982088; cv=pass; d=google.com; s=arc-20160816; b=JArBos+ZOQ7+qiIM6h7VpLJXMCUlpQN82kLJGmWHXvQz5APBjtS+V5XeZL2htHd3C1 kYRFPiac6R4i7d+vQt1TosYA57zheUK5yYEBmseSspG/kZPHaqZRUPaxRd5bh6OSS7cZ /+rWmIXcVC1NaebrIBM/iNLkuUYWfhRvRBjMF3KTo3pNM2T80o2HrmwO8V8KzyVwVX6O dmy5b2w6aesxNQQUF+9mRliZJzwgdNZQhXWXcgtjgfHQ1MJjSw9/Da8ie2aR7pWT5ZsM hfKdywz6mh/lwJQs/K+kZH4DzlOyED7ApLd1akGeki3YBK6OcHG4RhUW3IJZVRGOCuZX vU+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=PWV5ADdGn81LhpSzLHudQHa8fvEJvm5AkFMDkZeRRJY=; fh=AQSYRRQRh647EXeSm7Is1+XQKLxl2kAU12F2RTF/Xhw=; b=Y2kvi/3X2TnIvI44RutR4LK8k657oWrNJ6Ug33CPtjYSwP+JWakGnJEAZgVH5f8WFI +w8eo6dJZczzuOkQBkziqD+Dj1Rq1Mp1LoAVBQ8sD91+ML3BmhfP74JwYfOOXZwoEJiJ yfipgOVSb+9zoa+agvNdDnx1eaYT2QFwZb5AE9Jcu8Tr6V2H1cVxLCwCs5oTCK9DvGnb VdnoAfyXr5slR4bLTSRQfpcJ/1g4/Z5vXHb/dBffZMLrJlOVFouYG300icerCxdDw7dJ G4QtPxYoPweGM7bgQWT6dUBk2ZjRA3teE7isG31qoJvcNU5fe3Nd1UaWkKVaCQOQKpgx fxIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qG1vIyCF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194020-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-701d06fc8bdsi3037966b3a.2.2024.05.29.04.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 04:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194020-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qG1vIyCF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194020-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 17A1C28759E for ; Wed, 29 May 2024 11:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF07317B50F; Wed, 29 May 2024 11:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qG1vIyCF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 27009169397 for ; Wed, 29 May 2024 11:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716982083; cv=none; b=RXutO005XLhFnNVJbJLRVZ01O9LzkGWMmLlX5hSMkV9enWYxkTQnS0ix6g55nznk0mcFsC6qRfpthxeCyf9M/HzGbDmcwiisERVy0OMAvFVWiXU9FNN631iGjlMuc1+Fs9uoqnW31Y9E4mlQa+6W90t04S6rvwbcw/dMzGereK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716982083; c=relaxed/simple; bh=imM6wbNNhDFQlLHh0hY4tc0Miuy2SbOfK3Altmz/hTE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gO32Z2Yj6U6MS26W2xfjz5bwWqrIEFxhf0HUYRgrDFT9a6AbNLcBCCEzCJ84CgdlcWn8CDLIk+c9JJVIMISrtXrcfUJtaAYDKalKaqwqF3WNSnmyAkT+DICF7rMot/5p/aSGzOR6Ozfq1rRo3Ia/Zks+XmhfPhl6rXsRFH0Kf90= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qG1vIyCF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB872C2BD10; Wed, 29 May 2024 11:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716982082; bh=imM6wbNNhDFQlLHh0hY4tc0Miuy2SbOfK3Altmz/hTE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qG1vIyCFCXlKWhycFd8PcMeYW3rjgS98w2/IWF+vnLkVlY8w5ToOC7xZNYIUocG2X biGrO0fPEIujMI0xnXPtU+ad4IPnEyXxUPpwfVB8JNlX8nS+JxpsZxl25lvHpl967+ GItEyHPQTJRMRGJAeaWz98N720m4uSoKy42LFE6rAdgfJWU2depscf73CF6a39R2L3 cAKcoM/Q532yHFbXat5NyEQvd9BJ1Nt9RKusRsYZ27GE9YY/8zWpMh90cz/a+jeFoV DI/L5mWhqeWaGTmXjbZ1fs8gxEKhxR464EHcsrCSSZY8Y18ZJSrveYZEc1j8NrOMNM ksoyTLtIi9X+Q== Message-ID: <674665d7-33b5-4c33-afd8-637222ebf04c@kernel.org> Date: Wed, 29 May 2024 19:27:59 +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 Subject: Re: [PATCH] f2fs: avoid resetting non empty zone To: Sheng Yong , jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20240529112411.380453-1-shengyong@oppo.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20240529112411.380453-1-shengyong@oppo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/5/29 19:24, Sheng Yong wrote: > If curseg is not the first segment in its zone, the zone is not empty, > and it should not be reset. This issue could be reproduced by: > > modprobe null_blk nr_devices=1 zoned=1 zone_max_open=6 zone_max_active=6 zone_size=1024 gb=30 > # /dev/vda is 4G > mkfs.f2fs -m -c /dev/nullb0 /dev/vda -f > > while :; do > mount /dev/vda /mnt/ > dd if=/dev/zero of=/mnt/file bs=4K count=11 conv=fsync status=none > if [ $? -ne 0 ]; then > umount /mnt > break > fi > f2fs_io shutdown 1 /mnt/file > umount /mnt > done > > And the error looks like: > [ 123.169852] I/O error, dev nullb0, sector 41951232 op 0x1:(WRITE) flags 0x800 phys_seg 10 prio class 0 > [ 123.173070] F2FS-fs (vda): do_checkpoint failed err:-5, stop checkpoint > dd: error writing '/mnt/testfile': Input/output error > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,