From: Jason Plum <jplum@devonit.com>
To: Saul Wold <sgw@linux.intel.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v3] meta/oe/lib/path.py - check mount points, not device
Date: Wed, 29 Jan 2014 09:54:49 -0500 [thread overview]
Message-ID: <52E91639.6010606@devonit.com> (raw)
In-Reply-To: <52E7FB3B.8000000@linux.intel.com>
On 01/28/14 13:47, Saul Wold wrote:
> On 01/20/2014 11:22 AM, Jason Plum wrote:
>> Signed-off-by: Jason Plum <jplum@devonit.com>
>> ---
>> meta/lib/oe/path.py | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
> This patch is still not applying cleanly to master, I am also still a
> little concerned if this will affect performance since it's used often
> in sstate code.
>
> Have you compared build times with and without this patch?
>
> Sau!
Saul,
I pulled a fresh copy of master when I made this particular send-email
patch, so it must keep changing from under me. I have the last commit to
master on this checkout as 9c8d9781794ed0886a79c8ce4544ba98be0ff858
The performance difference should be quite minimal, but I have not
extensively tested with timing metrics in place.
>> diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
>> index 46783f8..dab20fc 100644
>> --- a/meta/lib/oe/path.py
>> +++ b/meta/lib/oe/path.py
>> @@ -90,7 +90,7 @@ def copyhardlinktree(src, dst):
>> if os.path.isdir(src) and not len(os.listdir(src)):
>> return
>>
>> - if (os.stat(src).st_dev == os.stat(dst).st_dev):
>> + if (getmount(src) == getmount(dst)):
>> # Need to copy directories only with tar first since cp will error if two
>> # writers try and create a directory at the same time
>> cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - --no-recursion | tar -xf - -C %s' % (src, src, dst)
>> @@ -257,3 +257,14 @@ def realpath(file, root, use_physdir = True, loop_cnt = 100, assume_dir = False)
>> raise
>>
>> return file
>> +
>> +def getmount(path):
>> + """ getmount takes a path parameter, uses os.path.realpath with os.path.abspath to
>> + handle symlink resolution, and returns the path to the mount point of the input path
>> + """
>> + path = os.path.realpath(os.path.abspath(path))
>> + while path != os.path.sep:
>> + if os.path.ismount(path):
>> + return path
>> + path = os.path.abspath(os.path.join(path, os.pardir))
>> + return path
>> \ No newline at end of file
>>
--
Jason Plum
Sr. Software Engineer
Devon IT
next prev parent reply other threads:[~2014-01-29 14:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 19:22 [PATCH v3] meta/oe/lib/path.py - check mount points, not device Jason Plum
2014-01-24 14:05 ` Jason Plum
2014-01-28 18:47 ` Saul Wold
2014-01-29 14:54 ` Jason Plum [this message]
2014-02-10 6:59 ` Saul Wold
2014-02-21 4:01 ` Saul Wold
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=52E91639.6010606@devonit.com \
--to=jplum@devonit.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=sgw@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox