[PREVIEW] [PATCH v4 2/3] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' and 'erofs_get_meta_page_nofail'. The second one ensures that it should not fail under memory pressure and should make best efforts if IO errors occur. It also adds auxiliary variables in order to fulfill 80

Re: [PREVIEW] [PATCH v3 2/3] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Chao Yu
On 2018/8/11 0:48, Gao Xiang wrote: > This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' > and 'erofs_get_meta_page_nofail'. The second one ensures that it > should not fail under memory pressure and should make best efforts > if IO errors occur. > > It also adds const

[PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch enhances the missing error handling code for xattr submodule, which improves the stability for the rare cases. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/internal.h | 6 +- drivers/staging/erofs/xattr.c|

[PATCH 5/8] staging: erofs: rearrange vle clustertype definitions

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch moves vle clustertype definitions to erofs_fs.h since they are part of on-disk format. It also adds compile time check for Z_EROFS_VLE_DI_CLUSTER_TYPE_BITS Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/erofs_fs.h

[PATCH 4/8] staging: erofs: cleanup z_erofs_vle_work_{lookup, register}

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch introduces 'struct z_erofs_vle_work_finder' to clean up arguments of z_erofs_vle_work_lookup and z_erofs_vle_work_register. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 89

[PATCH 2/8] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' and 'erofs_get_meta_page_nofail'. The second one ensures that it should not fail under memory pressure and should make best efforts if IO errors occur. It also adds auxiliary variables in order to fulfill 80

[PATCH 1/8] staging: erofs: introduce erofs_grab_bio

2018-08-12 Thread Chao Yu
From: Gao Xiang this patch renames prepare_bio to erofs_grab_bio, and adds a nofail option in order to retry in the bio allocator under memory pressure. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/data.c | 12 +--

[PATCH 7/8] staging: erofs: fix integer overflow on 32-bit platform

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch fixes integer overflow on multiplication of 32-bit `lcn' in z_erofs_map_blocks_iter. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 8/8] staging: erofs: fix compression mapping beyond EOF

2018-08-12 Thread Chao Yu
From: Gao Xiang Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 6/8] staging: erofs: fix vle_decompressed_index_clusterofs

2018-08-12 Thread Chao Yu
From: Gao Xiang This patch adds error handing code, and fixes a missing endian conversion in vle_decompressed_index_clusterofs. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- drivers/staging/erofs/unzip_vle.c | 26 +++--- 1 file changed, 15

[PATCH v2 3/8] staging: erofs: add error handling for xattr submodule

2018-08-12 Thread Gao Xiang
This patch enhances the missing error handling code for xattr submodule, which improves the stability for the rare cases. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu --- change log v2: - fix `PTR_ERR applied after initialization to constant' reported by kbuild

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-12 Thread Gao Xiang
Hi Chao, On 2018/8/13 10:00, Chao Yu wrote: > On 2018/8/12 22:01, Chao Yu wrote: >> From: Gao Xiang >> >> This patch enhances the missing error handling code for >> xattr submodule, which improves the stability for the rare cases. >> >> Signed-off-by: Gao Xiang >> Reviewed-by: Chao Yu >>

Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule

2018-08-12 Thread Chao Yu
On 2018/8/12 22:01, Chao Yu wrote: > From: Gao Xiang > > This patch enhances the missing error handling code for > xattr submodule, which improves the stability for the rare cases. > > Signed-off-by: Gao Xiang > Reviewed-by: Chao Yu > Signed-off-by: Chao Yu > --- >

[PATCH 0/8] staging: erofs: fix some issues and clean up codes

2018-08-12 Thread Chao Yu
From: Chao Yu This patchset mainly adds error handing code for erofs xattr subsystem. In addition, some code cleanups are also included in this patchset. P.S. Some other patches are still previewing in the linux-erofs mailing list, which will be posted in the 2nd part later. Gao Xiang (8):

[PREVIEW] [PATCH v4 06/10] staging: erofs: fix compression mapping beyond EOF

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- change log v4: - fix the description `m_la(in) + 1 - inode->i_size' to

[PREVIEW] [PATCH v4 05/10] staging: erofs: fix integer overflow on 32-bit platform

2018-08-12 Thread Gao Xiang via Linux-erofs
From: Gao Xiang This patch fixes integer overflow on multiplication of 32-bit `lcn' in z_erofs_map_blocks_iter. Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Gao Xiang --- change log v4: - fix commit message a bit. change log v3: - spilt into small patches at Chao's

Re: [PREVIEW] [PATCH v3 2/3] staging: erofs: separate erofs_get_meta_page

2018-08-12 Thread Gao Xiang via Linux-erofs
Hi Chao, On 2018/8/12 18:54, Chao Yu wrote: > On 2018/8/11 0:48, Gao Xiang wrote: >> This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' >> and 'erofs_get_meta_page_nofail'. The second one ensures that it >> should not fail under memory pressure and should make best efforts >>