* [PATCH v2] erofs-utils: add missing block counting
@ 2024-04-24 5:59 Noboru Asai
2024-04-24 6:15 ` Gao Xiang
0 siblings, 1 reply; 5+ messages in thread
From: Noboru Asai @ 2024-04-24 5:59 UTC (permalink / raw)
To: hsiangkao; +Cc: linux-erofs
Add missing block counting when the data to be inlined is not inlined.
---
v2:
- move from erofs_write_tail_end() to erofs_prepare_tail_block()
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..9aba69d 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -670,6 +670,7 @@ static int erofs_prepare_tail_block(struct erofs_inode *inode)
} else {
inode->lazy_tailblock = true;
}
+ inode->u.i_blocks += 1;
return 0;
}
--
2.44.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] erofs-utils: add missing block counting
2024-04-24 5:59 [PATCH v2] erofs-utils: add missing block counting Noboru Asai
@ 2024-04-24 6:15 ` Gao Xiang
2024-04-24 10:37 ` Gao Xiang
0 siblings, 1 reply; 5+ messages in thread
From: Gao Xiang @ 2024-04-24 6:15 UTC (permalink / raw)
To: Noboru Asai; +Cc: linux-erofs
On 2024/4/24 13:59, Noboru Asai wrote:
> Add missing block counting when the data to be inlined is not inlined.
>
> ---
> v2:
> - move from erofs_write_tail_end() to erofs_prepare_tail_block()
>
> Signed-off-by: Noboru Asai <asai@sijam.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] erofs-utils: add missing block counting
2024-04-24 6:15 ` Gao Xiang
@ 2024-04-24 10:37 ` Gao Xiang
2024-04-25 2:48 ` Noboru Asai
0 siblings, 1 reply; 5+ messages in thread
From: Gao Xiang @ 2024-04-24 10:37 UTC (permalink / raw)
To: Noboru Asai, linux-erofs
On Wed, Apr 24, 2024 at 02:15:58PM +0800, Gao Xiang wrote:
>
>
> On 2024/4/24 13:59, Noboru Asai wrote:
> > Add missing block counting when the data to be inlined is not inlined.
> >
> > ---
> > v2:
> > - move from erofs_write_tail_end() to erofs_prepare_tail_block()
> >
> > Signed-off-by: Noboru Asai <asai@sijam.com>
>
> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
>
> Thanks,
> Gao Xiang
I applied the following version since v2 caused CI failure:
https://github.com/erofs/erofsnightly/actions/runs/8812585654
From 89e76dda5fd4956709bbb88b76063ef165fa3882 Mon Sep 17 00:00:00 2001
From: Noboru Asai <asai@sijam.com>
Date: Wed, 24 Apr 2024 14:59:23 +0900
Subject: [PATCH] erofs-utils: add missing block counting
Add missing block counting when the data to be inlined is not inlined.
Signed-off-by: Noboru Asai <asai@sijam.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
lib/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/inode.c b/lib/inode.c
index 7508c74..896a257 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -664,6 +664,8 @@ static int erofs_prepare_tail_block(struct erofs_inode *inode)
} else {
inode->lazy_tailblock = true;
}
+ if (is_inode_layout_compression(inode))
+ inode->u.i_blocks += 1;
return 0;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] erofs-utils: add missing block counting
2024-04-24 10:37 ` Gao Xiang
@ 2024-04-25 2:48 ` Noboru Asai
2024-04-25 7:36 ` Gao Xiang
0 siblings, 1 reply; 5+ messages in thread
From: Noboru Asai @ 2024-04-25 2:48 UTC (permalink / raw)
To: Noboru Asai, linux-erofs
Hi Gao,
Oh, sorry.
I knew to access i_blkaddr on uncompressed file, but it didn't occur
on the file system for testing, so I overlooked it.
I needed to be careful.
2024年4月24日(水) 19:38 Gao Xiang <xiang@kernel.org>:
>
> On Wed, Apr 24, 2024 at 02:15:58PM +0800, Gao Xiang wrote:
> >
> >
> > On 2024/4/24 13:59, Noboru Asai wrote:
> > > Add missing block counting when the data to be inlined is not inlined.
> > >
> > > ---
> > > v2:
> > > - move from erofs_write_tail_end() to erofs_prepare_tail_block()
> > >
> > > Signed-off-by: Noboru Asai <asai@sijam.com>
> >
> > Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> >
> > Thanks,
> > Gao Xiang
>
> I applied the following version since v2 caused CI failure:
> https://github.com/erofs/erofsnightly/actions/runs/8812585654
>
>
> From 89e76dda5fd4956709bbb88b76063ef165fa3882 Mon Sep 17 00:00:00 2001
> From: Noboru Asai <asai@sijam.com>
> Date: Wed, 24 Apr 2024 14:59:23 +0900
> Subject: [PATCH] erofs-utils: add missing block counting
>
> Add missing block counting when the data to be inlined is not inlined.
>
> Signed-off-by: Noboru Asai <asai@sijam.com>
> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> ---
> lib/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/inode.c b/lib/inode.c
> index 7508c74..896a257 100644
> --- a/lib/inode.c
> +++ b/lib/inode.c
> @@ -664,6 +664,8 @@ static int erofs_prepare_tail_block(struct erofs_inode *inode)
> } else {
> inode->lazy_tailblock = true;
> }
> + if (is_inode_layout_compression(inode))
> + inode->u.i_blocks += 1;
> return 0;
> }
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] erofs-utils: add missing block counting
2024-04-25 2:48 ` Noboru Asai
@ 2024-04-25 7:36 ` Gao Xiang
0 siblings, 0 replies; 5+ messages in thread
From: Gao Xiang @ 2024-04-25 7:36 UTC (permalink / raw)
To: Noboru Asai, linux-erofs
On 2024/4/25 10:48, Noboru Asai wrote:
> Hi Gao,
>
> Oh, sorry.
> I knew to access i_blkaddr on uncompressed file, but it didn't occur
> on the file system for testing, so I overlooked it.
> I needed to be careful.
np, I've fixed it :)
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-25 7:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 5:59 [PATCH v2] erofs-utils: add missing block counting Noboru Asai
2024-04-24 6:15 ` Gao Xiang
2024-04-24 10:37 ` Gao Xiang
2024-04-25 2:48 ` Noboru Asai
2024-04-25 7:36 ` Gao Xiang
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 NNTP newsgroup(s).