Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp74776pxb; Tue, 2 Mar 2021 19:43:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhtSRTJu1HkkcKXOyJuD/VNhUjB+mE75BPAuXbTyOB5Tkuq54OY3zeEEtIqiQQwfVUXV3S X-Received: by 2002:a17:906:71d3:: with SMTP id i19mr3487421ejk.347.1614743000211; Tue, 02 Mar 2021 19:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614743000; cv=none; d=google.com; s=arc-20160816; b=rtxPHXafjqRzw8B1F9cbam2acXsvzQOzHAIQ1EdHOWPG5pCox5Vfd4uv/buOGqQcvW JNIk2BqoKJHQOBKJqPmpOOC16/dZgCEC/mVBP6MEOjLXVpnUNuEvK+WD6zHg7igWzw+N CQDizrXJ+57OIUZ43oCWFqRO7uI+M7sI+VDVbiKgHHvhPmej/CIdXUg8y6GgBi22Y61U ts8Vs543HE/rdpBofOA+HjA0uxFpGegkx9sDAToK4gJ4USKsVPJwPpgbxF0Dr81P49ZG b0W3SKXiSCWJPWN7SS7h0kZ2cdsMFl3DDbryS1pizhm87w5WBWVSZnm+uvqwI6G8HNzI Aytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=E04k4E5RYfSl8gKJ7I9Vzvg34SKuGc7vYQrJk0/qDKw=; b=wlzaRNKaqL+A6rh0kMn5/2qGZbAVLLuk5RFmJDkzsodSXGfzdyjNAyhKnN7bK3VpDD vPvou6qbxGYOD6LUjnWKVvv21K1YI/2m0ZLOb5vU1yNefXCu6+HcqJj0cbqDo3HCM3q6 ZSGMZ56lIgrCGeF6F+wfDelzU0YDVuLGPDW8eGe1cotUjg4o7hi5xiCtKKhV2KTqigi7 UBB1LFgpIQleJFecVDW3WC+laA124NblWENyY9fjM2z/Ui6PqZvnUfHLaVOx4XeUo0sz pFH5S6YpkttrWlo7CDq862NXBi+41+LRITmghGBumkj9AyRjMMfgSI5NJgTd0wWXlUcC yDPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=awBNsXMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si2607675ejv.550.2021.03.02.19.42.58; Tue, 02 Mar 2021 19:43:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=awBNsXMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236241AbhCAOQz (ORCPT + 99 others); Mon, 1 Mar 2021 09:16:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:51216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235686AbhCAOQs (ORCPT ); Mon, 1 Mar 2021 09:16:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 975ED64DFB; Mon, 1 Mar 2021 14:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614608167; bh=3Rhut/BhHs+UNJ1y8XYOOu+7cTQI+a+CansNeF7J0Fw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=awBNsXMyC45D5DQr5/foB+lSLWtBeyBqIf+5spcD+lIcyhJzRIQ37NBsec/sRtJ4G jD7cMbejGSj8CjyTQ7XrXopPmAr6eKSsExgKXRgOdmz5G6on9h9j7wEwC0xCxJY6GL bIBJUTXng7LO3tWiQSpjJSdNK+Q8ONJlGQWd/tA8ciymUyVYV8egTyX4++85gLVzQm VAMz6zuthpvKIUgTGUS94t0s77zXFDqNG9rCdW9kE/GzddJGmACzGe61IhKCxFoA53 Q1QA2Lc/9IlNKqDNZl82rwFl5VRUPN4R3VfjIzah+SH2A7ukDX8zmO5Lu8ENQUyZvO eMyZzRuh9lgOw== Subject: Re: [f2fs-dev] [PATCH v2 3/3] f2fs: check if swapfile is section-alligned To: Huang Jianan , linux-f2fs-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, zhangshiming@oppo.com References: <20210301045844.154809-1-huangjianan@oppo.com> From: Chao Yu Message-ID: <57c26fef-5566-cf91-3768-206ed7f09c7e@kernel.org> Date: Mon, 1 Mar 2021 22:15:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210301045844.154809-1-huangjianan@oppo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/1 12:58, Huang Jianan via Linux-f2fs-devel wrote: > If the swapfile isn't created by pin and fallocate, it can't be > guaranteed section-aligned, so it may be selected by f2fs gc. When > gc_pin_file_threshold is reached, the address of swapfile may change, > but won't be synchronized to swap_extent, so swap will write to wrong > address, which will cause data corruption. > > Signed-off-by: Huang Jianan > Signed-off-by: Guo Weichao Reviewed-by: Chao Yu Thanks,