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@xxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxx ----------------------------------------------------- -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
