On 2018年02月21日 23:40, David Sterba wrote:
> 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.

Thanks for pointing this out.

Another 100 lines saved.

> 
>> --- /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.

Will keep that in mind.

Although quite a lot of kernel-libs doesn't follow this behavior.

Maybe we should put some README into kernel-libs/?

Thanks,
Qu

> --
> 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
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to