[Gluster-devel] [Qusetions] About the implemention of function gf_backtrace_fillframes
C0reFast
topchenfu at qq.com
Tue Jun 20 03:08:24 UTC 2017
When I trying to listing /tmp in a gluster server. I found that have some bt prefix files like:[root at xxx# ll /tmp/
ls: cannot access /tmp/btm1RpMm: No such file or directory
total 116
-rw------- 1 root root 129 Jan 13 17:11 bt0tJH3c
-?????????? ? ? ? ? ? btm1RpMm
-rw------- 1 root root 287 Jan 13 17:11 btyDGNO9
drwx------. 2 root root 16384 Oct 19 09:21 lost+found
so i checked the source code. found in libglusterfs/src/common-utils.c
in function gf_backtrace_fillframes:
1. call frames = backtrace (array, GF_BACKTRACE_FRAME_COUNT); to get backtrace.
2. save backtrace to a temp file.
3. read backtrace from temp file to btbuf.
so why need writing a temp file instead just doing this in memory?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20170620/efeb75ab/attachment.html>
More information about the Gluster-devel
mailing list