Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2015 13:23:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 53475] cp(1) copies files in reverse order to destination
Message-ID:  <bug-53475-8-cedHWVBVcJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-53475-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-53475-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=53475

--- Comment #3 from commit-hook@freebsd.org ---
A commit references this bug:

Author: jilles
Date: Tue May  5 13:23:04 UTC 2015
New revision: 282482
URL: https://svnweb.freebsd.org/changeset/base/282482

Log:
  cp: Remove fts sorting.

  In an attempt to improve performance, cp reordered directories first
  (although the comment says directories last). This is not effective with new
  UFS layout policies.

  The sorting reorders multiple arguments passed to cp, which may be
  undesirable.

  Additionally, the comparison function does not induce a total order. Per
  POSIX, this causes undefined behaviour in qsort().

  NetBSD removed the sorting in 2009.

  On filesystems that return directory entries in hash/btree order, sorting by
  d_fileno before statting improves performance on large directories. However,
  this can only be implemented in fts(3).

  PR:        53475
  Reviewed by:    bde (in 2004)
  MFC after:    1 week

Changes:
  head/bin/cp/cp.c

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-53475-8-cedHWVBVcJ>