All of lore.kernel.org
 help / color / mirror / Atom feed
From: cgxu519@gmx.com (cgxu519)
Subject: [PATCH 3/7] staging: erofs: introduce a new helper __erofs_build_fault_attr()
Date: Wed, 12 Sep 2018 23:01:48 +0800	[thread overview]
Message-ID: <e1cbd3dd-65dc-5399-483b-7d76970d3b8e@gmx.com> (raw)
In-Reply-To: <c9a7a3d6-3c66-316e-cc5b-903e15286a0d@aol.com>

On 09/12/2018 10:50 PM, Gao Xiang wrote:
>
> On 2018/9/12 22:23, cgxu519 wrote:
>> On 09/12/2018 07:22 PM, Gao Xiang wrote:
>>> Hi Chengguang,
>>>
>>> On 2018/9/12 13:10, Chengguang Xu wrote:
>>>> Introduce a new helper __erofs_build_fault_attr() to handle set/clear
>>>> erofs_fault_info, we need this funciton for internal use case.
>>>> for example, reset fault_injection option in remount.
>>>>
>>>> Signed-off-by: Chengguang Xu <cgxu519 at gmx.com>
>>>> ---
>>>>  ? drivers/staging/erofs/super.c | 26 ++++++++++++++++++--------
>>>>  ? 1 file changed, 18 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
>>>> index 14dbb6517b8d..d2dbc1fd3abb 100644
>>>> --- a/drivers/staging/erofs/super.c
>>>> +++ b/drivers/staging/erofs/super.c
>>>> @@ -144,15 +144,9 @@ char *erofs_fault_name[FAULT_MAX] = {
>>>>  ????? [FAULT_KMALLOC]??????? = "kmalloc",
>>>>  ? };
>>>>  ? -static int erofs_build_fault_attr(struct erofs_sb_info *sbi,
>>>> -??????????????????? substring_t *args)
>>>> +static void __erofs_build_fault_attr(struct erofs_sb_info *sbi,
>>>> +??????????????????? unsigned int rate)
>>>>  ? {
>>>> -??? struct erofs_fault_info *ffi = &sbi->fault_info;
>>>> -??? int rate = 0;
>>>> -
>>>> -??? if (args->from && match_int(args, &rate))
>>>> -??????? return -EINVAL;
>>>> -
>>>>  ????? if (rate) {
>>> I get some compile error of this patch...
>>> drivers/staging/erofs/super.c: In function ?__erofs_build_fault_attr?:
>>> drivers/staging/erofs/super.c:156:15: error: ?ffi? undeclared (first use in this function)
>>>  ??? atomic_set(&ffi->inject_ops, 0);
>>>  ??????????????? ^
>>> drivers/staging/erofs/super.c:156:15: note: each undeclared identifier is reported only once for each function it appears in
>>> drivers/staging/erofs/super.c: In function ?erofs_build_fault_attr?:
>>> drivers/staging/erofs/super.c:169:27: warning: unused variable ?ffi? [-Wunused-variable]
>>>  ?? struct erofs_fault_info *ffi = &sbi->fault_info;
>> Sorry for that, I'll fix it in rebased version.
>>
>>> p.s. could you please rebase your patch on Thomas's [PATCH v4] staging: erofs: use explicit unsigned int type ?
>>> since I'm rebasing the rest PREVIEW patches on this commit now.
>> I noticed Thomas' patch had already committed to erofs-master branch in Chao's linux git repo, also my
>> previous patch but not in erofs-dev branch. So should I rebase on erofs-master?
>> Could you give me a little more guide for it?
> Hi Chengguang,
>
> Recently many cleanup patches submitted to Greg's staging tree and I need to
> rebase the rest erofs preview patches for linux-4.20 on these accepted
> cleanup patches.
>
> I think you could make your patch based on Thomas's patch (erofs-master
> branch in Chao's linux git repo), you could also tell Chao drop your
> previous patch.

Hi Xiang,

Thanks for explanation, that will be fine.

Hi Chao,

What do you think for these patches? If you think they are worth to do 
then please
revert my previous patch and I'll resend rebased version.

Thanks,
Chengguang

  reply	other threads:[~2018-09-12 15:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  5:10 [PATCH 0/7] staging: erofs: option validation for remount and some code cleanups Chengguang Xu
2018-09-12  5:10 ` [PATCH 1/7] staging: erofs: code cleanup for erofs_kmalloc() Chengguang Xu
2018-09-13  2:04   ` Chao Yu
2018-09-13  5:37     ` cgxu519
2018-09-12  5:10 ` [PATCH 2/7] staging: erofs: code cleanup for option parsing of fault_injection Chengguang Xu
2018-09-13  2:15   ` Chao Yu
2018-09-13  5:46     ` cgxu519
2018-09-14 15:22       ` Chao Yu
2018-09-17 13:52         ` cgxu519
2018-09-17 14:28           ` Chao Yu
2018-09-12  5:10 ` [PATCH 3/7] staging: erofs: introduce a new helper __erofs_build_fault_attr() Chengguang Xu
2018-09-12 11:22   ` Gao Xiang
2018-09-12 14:23     ` cgxu519
2018-09-12 14:50       ` Gao Xiang
2018-09-12 15:01         ` cgxu519 [this message]
2018-09-12  5:10 ` [PATCH 4/7] staging: erofs: return -EINVAL when specifying fault rate to 0 Chengguang Xu
2018-09-12  9:16   ` Dan Carpenter
2018-09-12 14:05     ` cgxu519
2018-09-12 14:25       ` Dan Carpenter
2018-09-12 14:41         ` cgxu519
2018-09-12  5:10 ` [PATCH 5/7] staging: erofs: introduce a new helper erofs_get_fault_rate() Chengguang Xu
2018-09-12  5:10 ` [PATCH 6/7] staging: erofs: code cleanup for erofs_show_options() Chengguang Xu
2018-09-12  5:10 ` [PATCH 7/7] staging: erofs: option validation in remount Chengguang Xu

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=e1cbd3dd-65dc-5399-483b-7d76970d3b8e@gmx.com \
    --to=cgxu519@gmx.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.