public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/2] f2fs: immutable file can have null address in compressed chunk
Date: Fri, 21 May 2021 12:02:16 -0700	[thread overview]
Message-ID: <20210521190217.2484099-1-jaegeuk@kernel.org> (raw)

If we released compressed blocks having an immutable bit, we can see less
number of compressed block addresses. Let's fix wrong BUG_ON.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/compress.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index d4f7371fb0d8..1189740aa141 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -927,7 +927,8 @@ static int __f2fs_cluster_blocks(struct inode *inode,
 			}
 		}
 
-		f2fs_bug_on(F2FS_I_SB(inode), !compr && ret != cluster_size);
+		f2fs_bug_on(F2FS_I_SB(inode),
+			!compr && ret != cluster_size && !IS_IMMUTABLE(inode));
 	}
 fail:
 	f2fs_put_dnode(&dn);
-- 
2.31.1.818.g46aad6cb9e-goog


             reply	other threads:[~2021-05-21 19:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 19:02 Jaegeuk Kim [this message]
2021-05-21 19:02 ` [PATCH 2/2] f2fs: support RO feature Jaegeuk Kim
2021-05-24 11:53   ` [f2fs-dev] " Chao Yu
2021-05-24 17:07     ` Jaegeuk Kim
2021-05-25  1:15       ` Chao Yu
2021-05-25  1:45         ` Jaegeuk Kim
2021-05-26  9:42   ` Chao Yu
2021-05-26 13:58     ` Jaegeuk Kim
2021-05-26 15:06       ` Chao Yu
2021-05-26 15:45         ` Jaegeuk Kim
2021-05-26 13:59   ` [PATCH 2/2 v2] " Jaegeuk Kim
2021-05-26 14:06     ` [f2fs-dev] " Jaegeuk Kim
2021-05-26 14:43     ` [f2fs-dev] [PATCH 2/2 v3] " Jaegeuk Kim
2021-05-27  1:19       ` Chao Yu
2021-05-27  1:36         ` Jaegeuk Kim
2021-05-28  2:07           ` Chao Yu
2021-06-02 15:16       ` Chao Yu
2021-06-02 19:02       ` [f2fs-dev] [PATCH 2/2 v4] " Jaegeuk Kim
2021-06-03 15:52         ` Chao Yu
2021-06-03 16:08         ` [f2fs-dev] [PATCH 2/2 v5] " Jaegeuk Kim
2021-06-04 23:47           ` Chao Yu
2021-05-26  9:08 ` [f2fs-dev] [PATCH 1/2] f2fs: immutable file can have null address in compressed chunk Chao Yu
2021-05-26 14:02   ` Jaegeuk Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210521190217.2484099-1-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox