Linux-EROFS Archive mirror
 help / color / mirror / Atom feed
From: Noboru Asai <asai@sijam.com>
To: hsiangkao@linux.alibaba.com
Cc: linux-erofs@lists.ozlabs.org
Subject: [PATCH] erofs-utils: add missing block counting
Date: Wed, 24 Apr 2024 13:34:13 +0900	[thread overview]
Message-ID: <20240424043413.90179-1-asai@sijam.com> (raw)

Add missing block counting when the data to be inlined is not inlined.

Signed-off-by: Noboru Asai <asai@sijam.com>
---
 lib/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/inode.c b/lib/inode.c
index cf22bbe..727dcee 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -840,6 +840,7 @@ static int erofs_write_tail_end(struct erofs_inode *inode)
 		inode->idata_size = 0;
 		free(inode->idata);
 		inode->idata = NULL;
+		inode->u.i_blocks += 1;
 
 		erofs_droid_blocklist_write_tail_end(inode, erofs_blknr(sbi, pos));
 	}
-- 
2.44.0


             reply	other threads:[~2024-04-24  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  4:34 Noboru Asai [this message]
2024-04-24  4:54 ` [PATCH] erofs-utils: add missing block counting Gao Xiang
2024-04-24  5:33   ` Noboru Asai
2024-04-24  5:43     ` Gao Xiang

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=20240424043413.90179-1-asai@sijam.com \
    --to=asai@sijam.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).