Skip to contentSkip to conversation

Revert "btrfs-progs: disable backtrace and define __always_inline"

PATCH In review Josef Bacik 3 participants 9 messages Jan 13, 2015 – Jan 14, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "btrfs-progs: disable backtrace and define __always_inline"

This reverts commit c2691f807ddd2c6b261c5707f6838a45d9275390 as it breaks backtracing on actual glibc environments.

---
 kerncompat.h | 6 ------
 1 file changed, 6 deletions(-)
kerncompat.h +0 -6
index 7397274..5c1cca9 100644
@@ -29,12 +29,6 @@
 #include <stddef.h>
 #include <linux/types.h>
 #include <stdint.h>
-
-#ifndef __glibc__
-#define BTRFS_DISABLE_BACKTRACE
-#define __always_inline __inline __attribute__ ((__always_inline__))
-#endif
-
 #ifndef BTRFS_DISABLE_BACKTRACE
 #include <execinfo.h>
 #endif
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 2 lines · Josef Bacik

This reverts commit c2691f807ddd2c6b261c5707f6838a45d9275390 as it breaks backtracing on actual glibc environments.

This is to support musl libc. If it does not work then the test is wrong and should be fixed. CCed the author.

http://openwall.com/lists/musl/2013/03/29/13

Seems that there's no ifdef way to find out the libc used.

#2 lore raw

It's a regression and I don't have the setup to figure out how to make it work for both. If somebody else can fix it quickly then fine but if not it needs to be reverted. Thanks,

Josef

David Sterba <[email protected]> wrote:

Quoted 2 lines · Josef Bacik

This reverts commit c2691f807ddd2c6b261c5707f6838a45d9275390 as it breaks backtracing on actual glibc environments.

This is to support musl libc. If it does not work then the test is wrong and should be fixed. CCed the author.

https://urldefense.proofpoint.com/v1/url?u=http://openwall.com/lists/musl/2013/03/29/13&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=cKCbChRKsMpTX8ybrSkonQ%3D%3D%0A&m=Dm8rcPdQBMJJL%2B383z6ziMVmnPg9BLbftawEBBcsq6E%3D%0A&s=86bd77631ddae58dca51fe780a120817815205620ff4fe920d578ce1f335ad5e

Seems that there's no ifdef way to find out the libc used.

#3 lore raw
In reply to David Sterba

Hi,

Quoted 6 lines · David Sterba
Quoted 2 lines · Josef Bacik

This reverts commit c2691f807ddd2c6b261c5707f6838a45d9275390 as it breaks backtracing on actual glibc environments.

This is to support musl libc. If it does not work then the test is wrong and should be fixed. CCed the author.

Thanks for letting me know. It unfortunately seems like I made a
mistake: it should be __GLIBC__ and not __glibc__.

Sorry about that. Would you like me to create a patch?

Regards,
Merlijn

#4 lore raw

This only works if you include features.h and I don't know if other libcs provide that. Thanks,

Josef

Merlijn Wajer <[email protected]> wrote:

Hi,

Quoted 6 lines · David Sterba
Quoted 2 lines · Josef Bacik

This reverts commit c2691f807ddd2c6b261c5707f6838a45d9275390 as it breaks backtracing on actual glibc environments.

This is to support musl libc. If it does not work then the test is wrong and should be fixed. CCed the author.

Thanks for letting me know. It unfortunately seems like I made a
mistake: it should be __GLIBC__ and not __glibc__.

Sorry about that. Would you like me to create a patch?

Regards,
Merlijn

#5 lore raw

Hi,

Quoted 1 line · Josef Bacik

This only works if you include features.h and I don't know if other libcs provide that. Thanks,

musl provides /usr/include/features.h and glibc does so as well. (Checked on musl and glibc systems) Searching the web seems to suggest that uclibc supports it as well.

Would you be in favour of including features.h and checking for __GLIBC__ ?

Regards,
Merlijn

#6 lore raw

Yeah just make sure we still get a backtrace on glibc. Thanks,

Josef

Merlijn Wajer <[email protected]> wrote:

Hi,

Quoted 1 line · Josef Bacik

This only works if you include features.h and I don't know if other libcs provide that. Thanks,

musl provides /usr/include/features.h and glibc does so as well. (Checked on musl and glibc systems) Searching the web seems to suggest that uclibc supports it as well.

Would you be in favour of including features.h and checking for __GLIBC__ ?

Regards,
Merlijn

#7 lore raw
In reply to Merlijn Wajer
Quoted 5 lines · Merlijn Wajer
Quoted 1 line

This only works if you include features.h and I don't know if other libcs provide that. Thanks,

musl provides /usr/include/features.h and glibc does so as well. (Checked on musl and glibc systems) Searching the web seems to suggest that uclibc supports it as well.

I'd say that we care about these two right now.

Quoted 1 line

Would you be in favour of including features.h and checking for __GLIBC__ ?

Yes please.

#8 lore raw

Hi,

Quoted 7 lines · David Sterba
Quoted 5 lines · Merlijn Wajer
Quoted 1 line

This only works if you include features.h and I don't know if other libcs provide that. Thanks,

musl provides /usr/include/features.h and glibc does so as well. (Checked on musl and glibc systems) Searching the web seems to suggest that uclibc supports it as well.

Quoted 5 lines

I'd say that we care about these two right now.

Quoted 1 line

Would you be in favour of including features.h and checking for __GLIBC__ ?

Yes please.

Alright. I will send a patch tomorrow - it's definitely past bed time here now. :-)

Sorry for the inconvenience.

Regards,
Merlijn