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
---
change log v2:
- fix as pointed out by Dan Carpenter :
1) drop all
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
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
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 ++--
On Sun, Aug 12, 2018 at 10:01:44PM +0800, Chao Yu wrote:
> --- a/drivers/staging/erofs/data.c
> +++ b/drivers/staging/erofs/data.c
> @@ -39,31 +39,44 @@ static inline void read_endio(struct bio *bio)
> }
>
> /* prio -- true is used for dir */
> -struct page *erofs_get_meta_page(struct
Hi Xiang,
On 2018/8/13 10:36, Gao Xiang wrote:
> 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.
>>>
> -static inline unsigned
> -vle_compressed_index_clusterofs(unsigned clustersize,
> - struct z_erofs_vle_decompressed_index *di)
> +static inline int
> +vle_decompressed_index_clusterofs(unsigned int *clusterofs,
Not related to your patch, but don't make functions inline. Leave it to
the
On 2018/8/13 20:17, Gao Xiang wrote:
>> Generally the rule on likely/unlikely is that they hurt readability so
>> we should only add them if it makes a difference in benchmarking.
>>
>
> In my opinion, return values other than 0 and ENOATTR(ENODATA) rarely happens,
> it should be in the slow
Hi Dan,
On 2018/8/13 20:40, Dan Carpenter wrote:
> On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
@@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode,
struct getxattr_iter *it)
ret = xattr_foreach(>it, _xattr_handlers, );
if
Hi Dan,
On 2018/8/13 20:03, Dan Carpenter wrote:
>> -static inline unsigned
>> -vle_compressed_index_clusterofs(unsigned clustersize,
>> -struct z_erofs_vle_decompressed_index *di)
>> +static inline int
>> +vle_decompressed_index_clusterofs(unsigned int *clusterofs,
>
> Not related to your
On Sun, Aug 12, 2018 at 10:01:46PM +0800, Chao Yu wrote:
> 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
On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
> > /* we assume that ofs is aligned with 4 bytes */
> > it->ofs = EROFS_XATTR_ALIGN(it->ofs);
> > return err;
> >
This might be cleaner if we wrote:
return (err < 0) ? error : 0;
The callers all treate zero and one
Hi Leon,
On 2018/8/13 20:09, Leon Imhof wrote:
> Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'"
> detected by checkpatch.pl
>
> Signed-off-by: Leon Imhof
Looks fine,
Reviewed-by: Gao Xiang
(BTW, could you fix the title of this commit? Thanks.)
> ---
>
Hi Dan,
On 2018/8/13 21:05, Dan Carpenter wrote:
> Yeah. You'd have to remove the const.
>
> Anyway, on looking at it more, I guess this patch is fine for now. We
> will probably end up changing z_erofs_vle_work_lookup() and
> z_erofs_vle_work_register() some more in the future.
>
Thanks for
Hi Dan,
On 2018/8/13 19:04, Dan Carpenter wrote:
> On Sun, Aug 12, 2018 at 10:01:44PM +0800, Chao Yu wrote:
>> --- a/drivers/staging/erofs/data.c
>> +++ b/drivers/staging/erofs/data.c
>> @@ -39,31 +39,44 @@ static inline void read_endio(struct bio *bio)
>> }
>>
>> /* prio -- true is used for
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'"
detected by checkpatch.pl
Signed-off-by: Leon Imhof
---
drivers/staging/erofs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c
index
On 2018/8/13 19:04, Dan Carpenter wrote:
> On Sun, Aug 12, 2018 at 10:01:44PM +0800, Chao Yu wrote:
>> --- a/drivers/staging/erofs/data.c
>> +++ b/drivers/staging/erofs/data.c
>> @@ -39,31 +39,44 @@ static inline void read_endio(struct bio *bio)
>> }
>>
>> /* prio -- true is used for dir */
>>
On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
> >> @@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode,
> >> struct getxattr_iter *it)
> >>ret = xattr_foreach(>it, _xattr_handlers, );
> >>if (ret >= 0)
> >>break;
> >> +
> >>
Yeah. You'd have to remove the const.
Anyway, on looking at it more, I guess this patch is fine for now. We
will probably end up changing z_erofs_vle_work_lookup() and
z_erofs_vle_work_register() some more in the future.
regards,
dan carpenter
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'"
detected by checkpatch.pl
Signed-off-by: Leon Imhof
---
drivers/staging/erofs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c
index
Hi Dan,
On 2018/8/13 20:25, Dan Carpenter wrote:
> On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
>>> /* we assume that ofs is aligned with 4 bytes */
>>> it->ofs = EROFS_XATTR_ALIGN(it->ofs);
>>> return err;
>>>
> This might be cleaner if we wrote:
>
> return (err
> But it is better to fix them in an independent patch. :)
Yah. Of course. This was completely unrelated.
regards,
dan carpenter
22 matches
Mail list logo