* [PATCH v1 1/2] Remove hardcoded block size shifts
@ 2023-05-30 20:24 Kelvin Zhang via Linux-erofs
2023-05-30 20:24 ` [PATCH v1 2/2] Allow developer to manually set a max block size Kelvin Zhang via Linux-erofs
2023-05-30 23:51 ` [PATCH v1 1/2] Remove hardcoded block size shifts Gao Xiang
0 siblings, 2 replies; 4+ messages in thread
From: Kelvin Zhang via Linux-erofs @ 2023-05-30 20:24 UTC (permalink / raw)
To: linux-erofs mailing list, Miao Xie, Fang Wei; +Cc: Kelvin Zhang
This improves support for non 4K block sizes
Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
---
lib/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/compress.c b/lib/compress.c
index 06bacdb..ae0838c 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -766,7 +766,7 @@ static void z_erofs_write_mapheader(struct erofs_inode *inode,
.h_algorithmtype = inode->z_algorithmtype[1] << 4 |
inode->z_algorithmtype[0],
/* lclustersize */
- .h_clusterbits = inode->z_logical_clusterbits - 12,
+ .h_clusterbits = inode->z_logical_clusterbits - sbi.blkszbits,
};
if (inode->z_advise & Z_EROFS_ADVISE_FRAGMENT_PCLUSTER)
--
2.41.0.rc0.172.g3f132b7071-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] Allow developer to manually set a max block size
2023-05-30 20:24 [PATCH v1 1/2] Remove hardcoded block size shifts Kelvin Zhang via Linux-erofs
@ 2023-05-30 20:24 ` Kelvin Zhang via Linux-erofs
2023-05-30 23:51 ` Gao Xiang
2023-05-30 23:51 ` [PATCH v1 1/2] Remove hardcoded block size shifts Gao Xiang
1 sibling, 1 reply; 4+ messages in thread
From: Kelvin Zhang via Linux-erofs @ 2023-05-30 20:24 UTC (permalink / raw)
To: linux-erofs mailing list, Miao Xie, Fang Wei; +Cc: Kelvin Zhang
Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
---
include/erofs/internal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/erofs/internal.h b/include/erofs/internal.h
index b3d04be..6eba35d 100644
--- a/include/erofs/internal.h
+++ b/include/erofs/internal.h
@@ -35,7 +35,9 @@ typedef unsigned short umode_t;
#define PAGE_SIZE (1U << PAGE_SHIFT)
#endif
+#ifndef EROFS_MAX_BLOCK_SIZE
#define EROFS_MAX_BLOCK_SIZE PAGE_SIZE
+#endif
#define EROFS_ISLOTBITS 5
#define EROFS_SLOTSIZE (1U << EROFS_ISLOTBITS)
--
2.41.0.rc0.172.g3f132b7071-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 2/2] Allow developer to manually set a max block size
2023-05-30 20:24 ` [PATCH v1 2/2] Allow developer to manually set a max block size Kelvin Zhang via Linux-erofs
@ 2023-05-30 23:51 ` Gao Xiang
0 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2023-05-30 23:51 UTC (permalink / raw)
To: Kelvin Zhang, linux-erofs mailing list, Miao Xie, Fang Wei
On 2023/5/31 04:24, Kelvin Zhang wrote:
> Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
> ---
> include/erofs/internal.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/erofs/internal.h b/include/erofs/internal.h
> index b3d04be..6eba35d 100644
> --- a/include/erofs/internal.h
> +++ b/include/erofs/internal.h
> @@ -35,7 +35,9 @@ typedef unsigned short umode_t;
> #define PAGE_SIZE (1U << PAGE_SHIFT)
> #endif
>
> +#ifndef EROFS_MAX_BLOCK_SIZE
> #define EROFS_MAX_BLOCK_SIZE PAGE_SIZE
> +#endif
I have to make a configure.ac for this stuff...
Thanks,
Gao Xiang
>
> #define EROFS_ISLOTBITS 5
> #define EROFS_SLOTSIZE (1U << EROFS_ISLOTBITS)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] Remove hardcoded block size shifts
2023-05-30 20:24 [PATCH v1 1/2] Remove hardcoded block size shifts Kelvin Zhang via Linux-erofs
2023-05-30 20:24 ` [PATCH v1 2/2] Allow developer to manually set a max block size Kelvin Zhang via Linux-erofs
@ 2023-05-30 23:51 ` Gao Xiang
1 sibling, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2023-05-30 23:51 UTC (permalink / raw)
To: Kelvin Zhang, linux-erofs mailing list, Miao Xie, Fang Wei
On 2023/5/31 04:24, Kelvin Zhang wrote:
> This improves support for non 4K block sizes
>
> Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
> ---
> lib/compress.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/compress.c b/lib/compress.c
> index 06bacdb..ae0838c 100644
> --- a/lib/compress.c
> +++ b/lib/compress.c
> @@ -766,7 +766,7 @@ static void z_erofs_write_mapheader(struct erofs_inode *inode,
> .h_algorithmtype = inode->z_algorithmtype[1] << 4 |
> inode->z_algorithmtype[0],
> /* lclustersize */
> - .h_clusterbits = inode->z_logical_clusterbits - 12,
> + .h_clusterbits = inode->z_logical_clusterbits - sbi.blkszbits,
> };
>
> if (inode->z_advise & Z_EROFS_ADVISE_FRAGMENT_PCLUSTER)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-30 23:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 20:24 [PATCH v1 1/2] Remove hardcoded block size shifts Kelvin Zhang via Linux-erofs
2023-05-30 20:24 ` [PATCH v1 2/2] Allow developer to manually set a max block size Kelvin Zhang via Linux-erofs
2023-05-30 23:51 ` Gao Xiang
2023-05-30 23:51 ` [PATCH v1 1/2] Remove hardcoded block size shifts 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).