Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp3055167pxy; Wed, 4 Aug 2021 00:46:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn/fexGZ6v4NPueAKdOMihNNPZ4LVL9WiMDXc6V+cpFJKpD36laqYpG90KQ9R4GK4jH8mK X-Received: by 2002:a17:906:fc0b:: with SMTP id ov11mr20884624ejb.238.1628063202175; Wed, 04 Aug 2021 00:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628063202; cv=none; d=google.com; s=arc-20160816; b=YEKmDcMtqV/SemEnhP8Zi1wFC18dq0jxTxf1c3L4JFRcSk0jrR1rf+X8ggxqJ3RT+J H2RYugrF9BCwwZ12hrX3IiVKLXdoYFUWxTAjlvtNu9r8Ksvw/9cPvhOIv53abYHPfeuo HT6Q9lv7xgG38y8QsdwBWK5Rprx610nAzHPnhkf92MfvCWyCPt6AGtEhKoO8jQq/0XC6 6+2wKcM/V3c5htVDgze9RfAK6UjftzyEzGcHJh/0tfdX19Yu7onkAlIbyDapnMoXyHf1 mE1LBrCXE7smR3ku8LQuRIMUaS64ckpw4S9JHSpjIbzLN1qyVsspPz6/u07I3QuKJ+XA r1qQ== 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=Q4L4oPFEGp0M1e+BQjfwv1/Oh570inQ9g0pLlqjXNpY=; b=PVlVtPF5mAbfzFoSW6lKWCjNJp8w0wLOxyiHI8pEmSYfYANBJM2r4SrVj4rmjPz6RU Gx5/l/0oxZDgrOU/5PEREPbeqz9qSn9cL2fYQBJ7Qtmkc85aD+cQW1HOfyL+GBLYABs2 In8h0tFz9uGN1GkiNaSjUOCToPUeUafRd9TbyH7cGoW6L9LhKhY4MC/wp5XiGTPFH7x2 cFkpneeKUM4gyhzTV2Y8hdl+eK4Hgc0O9qM5ffyWJ42D5cEPkSq1JmMpzUt1dHEKuIMK Y8K9MKyUyxzeofrOfXkzB9OJxgkcfuv/7yl7N8Qx2afiadtfCyqd6qx700oar5E5bIi8 RU5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JL7zGSXg; 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 pj24si1422202ejb.143.2021.08.04.00.46.18; Wed, 04 Aug 2021 00:46:42 -0700 (PDT) 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=JL7zGSXg; 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 S235957AbhHDHlc (ORCPT + 99 others); Wed, 4 Aug 2021 03:41:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:42866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235912AbhHDHlc (ORCPT ); Wed, 4 Aug 2021 03:41:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D80B860BD3; Wed, 4 Aug 2021 07:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628062879; bh=Pm6fYyTmBfc6cqn8GdKXA+qPcfd/g6gN0afm3nZoctg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JL7zGSXgQcWrdXFmQXVBEIe74njilMYnBBrxniUqQurLN/tNbmRd6Zfg9zZ7h+gjy v4jDPZhEIZnY8OzhV6p4GW7Key2mXWJgFXxEv/ExTi0SIaw0ORRc5Zl+5ynfEaJdrY 856n5kfKoTHqS6rh12U18VVa9nmBoBNLTQqJOyLoBLf4KOHXMCjiRqwjKX4hmRpSge KfugJAzjTAydSrtYgS04hn1kc81d26/FgQi/2FWqleVGF2VRqUTUIQ/unDOCIrYX3N i1xKfK8diXXcOQojmOKvvoOAsvJpGYTNiW7ZyOoeG5c3CM8NTcBZ14eQlWUnnluI4f W//MzhI8+G8cQ== Subject: Re: [RFC v2] f2fs: extent cache: support unaligned extent To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu References: <20210803023912.26667-1-chao@kernel.org> From: Chao Yu Message-ID: <2cd44682-4e50-24c0-0f56-5f6aaf827e48@kernel.org> Date: Wed, 4 Aug 2021 15:41:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: 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/8/4 9:53, Jaegeuk Kim wrote: >> +#ifdef CONFIG_F2FS_FS_COMPRESSION > > Can remove this by if (unaligned)? > >> + if (unaligned) >> + en->plen = ((struct extent_info_unaligned *)ei)->plen; struct extent_info_unaligned should be covered by CONFIG_F2FS_FS_COMPRESSION. >> static inline bool __is_extent_mergeable(struct extent_info *back, >> - struct extent_info *front) >> + struct extent_info *front, bool unaligned) >> { >> +#ifdef CONFIG_F2FS_FS_COMPRESSION > > This can be controlled by "bool unaligned"? Ditto, > >> + struct extent_info_unaligned *be = (struct extent_info_unaligned *)back; >> + struct extent_info_unaligned *fe = (struct extent_info_unaligned *)front; >> + >> + if (unaligned && (be->ei.len != be->plen || fe->ei.len != fe->plen)) >> + return false; >> +#endif Thanks,