From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: dsterba@suse.cz, Stefan Behrens <sbehrens@giantdisaster.de>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue
Date: Fri, 08 Nov 2013 08:32:47 +0800 [thread overview]
Message-ID: <527C312F.5070204@cn.fujitsu.com> (raw)
In-Reply-To: <20131107160529.GI16662@twin.jikos.cz>
On thu, 7 Nov 2013 17:05:29 +0100, David Sterba wrote:
> On Thu, Nov 07, 2013 at 10:33:32AM +0100, Stefan Behrens wrote:
>>> +struct btrfs_work_struct {
>>> + void (*func)(struct btrfs_work_struct *arg);
>>> + void (*ordered_func)(struct btrfs_work_struct *arg);
>>> + void (*ordered_free)(struct btrfs_work_struct *arg);
>>> +
>>> + /* Don't touch things below */
>>> + struct work_struct normal_work;
>>> + struct work_struct ordered_work;
>>> + struct completion normal_completion;
>>> +};
>> If you compare the Btrfs sources before applying your patchset and after
>> applying all 17 patches, one change is this:
>> -struct btrfs_work {
>> +struct btrfs_work_struct {
>>
>> Which causes changes s/struct btrfs_work/struct btrfs_work_struct/ like
>> in patch 16/17:
>> - struct btrfs_work work;
>> + struct btrfs_work_struct
>> + work;
>>
>> -static void scrub_bio_end_io_worker(struct btrfs_work *work);
>> +static void scrub_bio_end_io_worker(struct btrfs_work_struct *work);
>>
>> I just don't see any good reason for renaming 'struct foo' to 'struct
>> foo_struct'.
> It seems to be meaningfull only though out this patchset. The old
> contents of btrfs_work is different from btrfs_work_struct, I agree it's
> right to have the name without _struct suffix. But then the change to
> new worker structs would have to be done in one single patch, while
> there are 10+ patches converting each worker type.
>
> I suggest to add one more patch to the end that removes the _struct
> suffix again, so the series does not have to be redone.
>
> david
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Yes, the "_struct" suffix is mostly used to distinguishfrom the original
btrfs_workers, and also try to use the kernel workqueue naming, which has
the "_struct" suffix.
And itis true that the long struct name makes some original codes ugly.
I'll add a new patchafter all these patches to remove the long suffix.
Thanks
Qu
--
-----------------------------------------------------
Qu Wenruo
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8526
COINS: 7998-8526
FAX: +86+25-83317685
MAIL: quwenruo@cn.fujitsu.com
-----------------------------------------------------
next prev parent reply other threads:[~2013-11-08 0:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 5:51 [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 01/17] btrfs: Cleanup the unused struct async_sched Qu Wenruo
2013-11-07 17:24 ` Josef Bacik
2013-11-07 5:51 ` [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue Qu Wenruo
2013-11-07 9:33 ` Stefan Behrens
2013-11-07 16:05 ` David Sterba
2013-11-08 0:32 ` Qu Wenruo [this message]
2013-11-07 18:08 ` Josef Bacik
2013-11-07 18:09 ` Josef Bacik
2013-11-08 0:58 ` Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 03/17] btrfs: Add high priority workqueue support for btrfs_workqueue_struct Qu Wenruo
2013-11-07 16:41 ` David Sterba
2013-11-08 0:53 ` Qu Wenruo
2013-11-12 16:59 ` David Sterba
2013-11-13 0:53 ` Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 04/17] btrfs: Add threshold workqueue based on kernel workqueue Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 05/17] btrfs: Replace fs_info->workers with btrfs_workqueue Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 06/17] btrfs: Replace fs_info->delalloc_workers " Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 07/17] btrfs: Replace fs_info->submit_workers " Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 08/17] btrfs: Replace fs_info->flush_workers " Qu Wenruo
2013-11-07 5:51 ` [PATCH v3 09/17] btrfs: Replace fs_info->endio_* workqueue " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 10/17] btrfs: Replace fs_info->rmw_workers " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 11/17] btrfs: Replace fs_info->cache_workers " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 12/17] btrfs: Replace fs_info->readahead_workers " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 13/17] btrfs: Replace fs_info->fixup_workers " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 14/17] btrfs: Replace fs_info->delayed_workers " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 15/17] btrfs: Replace fs_info->qgroup_rescan_worker " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 16/17] btrfs: Replace fs_info->scrub_* " Qu Wenruo
2013-11-07 5:52 ` [PATCH v3 17/17] btrfs: Cleanup the old btrfs_worker Qu Wenruo
2013-11-07 17:52 ` [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct David Sterba
2013-11-08 0:55 ` Qu Wenruo
2013-11-07 17:54 ` Chris Mason
2013-11-08 0:56 ` Qu Wenruo
2013-11-26 1:39 ` Qu Wenruo
2013-11-26 7:31 ` Liu Bo
2013-11-26 8:33 ` Qu Wenruo
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=527C312F.5070204@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=sbehrens@giantdisaster.de \
/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.