On Fri, Feb 09, 2018 at 03:44:24PM +0800, Qu Wenruo wrote: > Used by later btrfs_alloc_chunk() rework.
We have the libc provided qsort, so please don't pull another implementation but rather add a wrapper. > --- /dev/null > +++ b/kernel-lib/sort.c > @@ -0,0 +1,104 @@ > +/* > + * taken from linux kernel lib/sort.c, removed kernel config code and adapted > + * for btrfsprogs > + */ > + > +#include "sort.h" > + > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * A fast, small, non-recursive O(nlog n) sort for the Linux kernel > + * > + * Jan 23 2005 Matt Mackall <m...@selenic.com> > + */ When taking files from kernel: take the file as is and insert notes for btrfs-progs below the comments. The SPDX line must be first. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html