From patchwork Mon Sep 23 07:17:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: li rongqing X-Patchwork-Id: 2926281 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC437BFF05 for ; Mon, 23 Sep 2013 07:17:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4A3820495 for ; Mon, 23 Sep 2013 07:17:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5099C20439 for ; Mon, 23 Sep 2013 07:17:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453Ab3IWHRb (ORCPT ); Mon, 23 Sep 2013 03:17:31 -0400 Received: from mail1.windriver.com ([147.11.146.13]:62838 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751944Ab3IWHRa (ORCPT ); Mon, 23 Sep 2013 03:17:30 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.14.5/8.14.3) with ESMTP id r8N7H9TI014887 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 23 Sep 2013 00:17:09 -0700 (PDT) Received: from [128.224.162.168] (128.224.162.168) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.2.347.0; Mon, 23 Sep 2013 00:17:08 -0700 Message-ID: <523FEAF3.1090607@windriver.com> Date: Mon, 23 Sep 2013 15:17:07 +0800 From: Rongqing Li User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eric Sandeen CC: Subject: Re: [PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue References: <1379466661-27973-1-git-send-email-rongqing.li@windriver.com> <52390704.3010902@redhat.com> In-Reply-To: <52390704.3010902@redhat.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 09/18/2013 09:51 AM, Eric Sandeen wrote: > On 9/17/13 8:11 PM, rongqing.li@windriver.com wrote: >> From: Roy Li >> >> The dependencies of "all: version.h" or other similar ones can not >> fix the parallel build failure, only reduce the times; In fact, >> many *.o files require version.h file. >> >> #grep '#include "version.h"' ./ -r >> ./btrfs-corrupt-block.c:#include "version.h" >> ./btrfs.c:#include "version.h" >> ./btrfs-image.c:#include "version.h" >> ./cmds-filesystem.c:#include "version.h" >> ./btrfs-show-super.c:#include "version.h" >> ./btrfs-select-super.c:#include "version.h" >> ./cmds-restore.c:#include "version.h" >> ./btrfs-find-root.c:#include "version.h" >> ./mkfs.c:#include "version.h" >> ./btrfs-zero-log.c:#include "version.h" >> ./btrfs-defrag.c:#include "version.h" >> ./cmds-chunk.c:#include "version.h" >> ./btrfstune.c:#include "version.h" >> ./btrfs-calc-size.c:#include "version.h" >> ./btrfs-map-logical.c:#include "version.h" >> ./cmds-check.c:#include "version.h" >> ./btrfs-debug-tree.c:#include "version.h" >> >> Signed-off-by: Roy Li >> --- >> Sorry, The patch [btrfs-progs: fix parallel build] sent by me on Sep 3 >> can not fix the build failure, when build enough times on a 16 core cpu, >> the build failure happens again, so I refix it again. >> >> >> Makefile | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/Makefile b/Makefile >> index c43cb68..a7c259c 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -81,6 +81,12 @@ endif >> @echo " [CC] $@" >> $(Q)$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $< >> >> +btrfs-corrupt-block.o btrfs.o btrfs-image.o cmds-filesystem.o:version.h >> +btrfs-show-super.o btrfs-select-super.o cmds-restore.o:version.h >> +btrfs-find-root.o mkfs.o btrfs-zero-log.o btrfs-defrag.o cmds-chunk.o:version.h >> +btrfstune.o btrfs-calc-size.o btrfs-map-logical.o cmds-check.o:version.h >> +btrfs-debug-tree.o:version.h >> + >> %.static.o: %.c >> @echo " [CC] $@" >> $(Q)$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(STATIC_CFLAGS) -c $< -o $@ >> > > I think this can be done more cleanly, I'll send a patch. > > -Eric > > If this one is not cleanly, how is the below one From a56ac083a789605904507b602d9ebf196ae6746d Mon Sep 17 00:00:00 2001 From: Roy Li Date: Mon, 23 Sep 2013 09:53:30 +0800 Subject: [PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue The dependencies of "all: version.h" or other similar ones can not fix the parallel build failure, only reduce the times; In fact, many *.o files require version.h file. #grep '#include "version.h"' ./ -r ./btrfs-corrupt-block.c:#include "version.h" ./btrfs.c:#include "version.h" ./btrfs-image.c:#include "version.h" ./cmds-filesystem.c:#include "version.h" ./btrfs-show-super.c:#include "version.h" ./btrfs-select-super.c:#include "version.h" ./cmds-restore.c:#include "version.h" ./btrfs-find-root.c:#include "version.h" ./mkfs.c:#include "version.h" ./btrfs-zero-log.c:#include "version.h" ./btrfs-defrag.c:#include "version.h" ./cmds-chunk.c:#include "version.h" ./btrfstune.c:#include "version.h" ./btrfs-calc-size.c:#include "version.h" ./btrfs-map-logical.c:#include "version.h" ./cmds-check.c:#include "version.h" ./btrfs-debug-tree.c:#include "version.h" Signed-off-by: Roy Li --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index c43cb68..901ffa2 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,8 @@ endif @echo " [CC] $@" $(Q)$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $< +%.o: version.h + %.static.o: %.c @echo " [CC] $@" $(Q)$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(STATIC_CFLAGS) -c $< -o $@