55 Commits

Author SHA1 Message Date
fangzhiyi18 bd5ee7c317 升级1.17.3
Signed-off-by: fangzhiyi18 <fangzhiyi1@h-partners.com>
2025-11-08 13:04:30 +08:00
psycho c99f6182b4 libfuse升级
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-09 09:19:42 +08:00
Hookey d8f5fe0b31 Remove unused fuse_worker bufsize (#590)
Not used since https://github.com/libfuse/libfuse/commit/561d7054d856eea6c2d634093546d6af773dada9
2021-04-12 11:08:50 +01:00
Rosen Penev 0fda68d9b8 remove fuse_mutex_init
This seems to have been added before 2006 to fix a uclibc bug. It
doesn't seem to be the case anymore so just get rid of it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-29 10:59:23 +00:00
Tom Callaway 6fc9630acd Implement GCC 10 style symbol versioning (#545) 2020-09-11 10:15:43 +01:00
Stefan Hajnoczi 56345a98c5 Introduce callback for logging
Introduce an API for custom log handler functions.  This allows libfuse
applications to send messages to syslog(3) or other logging systems.
See include/fuse_log.h for details.

Convert libfuse from fprintf(stderr, ...) to log_fuse(level, ...).  Most
messages are error messages with FUSE_LOG_ERR log level.  There are also
some debug messages which now use the FUSE_LOG_DEBUG log level.

Note that lib/mount_util.c is used by both libfuse and fusermount3.
Since fusermount3 does not link against libfuse, we cannot call
fuse_log() from lib/mount_util.c.  This file will continue to use
fprintf(stderr, ...) until someone figures out how to split it up.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-04 15:59:18 +01:00
Nikolaus Rath 12e2eaa7c9 Revert "Do not include struct fuse_buf in struct fuse_worker"
This reverts commit 161983e241,
because this causes resource leaks when threads are terminated
by pthread_cancel().

Fixes: #313.
2018-11-06 18:52:50 +00:00
Nikolaus Rath 161983e241 Do not include struct fuse_buf in struct fuse_worker
This is only used in fuse_do_work(), so we can put it on
the stack.
2018-09-17 10:45:16 +01:00
Nikolaus Rath 8929982478 Make *_loop_mt() available in version 3.0 again
The old versions of these symbols were defined with version
tag FUSE_3.0, so this is what we have to use in the .symver
directive.
2017-09-19 20:33:26 +01:00
Nikolaus Rath f24673cc17 Don't use external symbol names in internal files
The fuse_session_loop_mt() and fuse_loop_mt() symbols are only visible
when linking against the shared object. The code in lib/, however, is
compiled *into* the shared object and should thus use the internal
names of these functions.

Surprisingly enough, the code still worked before - but only when link
time optimization was disabled.

Unfortunately, we still can't compile with LTO because it seems that
enabling LTO somehow makes the tagged symbols vanish.

Without lto, we have:

$ nm lib/libfuse3.so | grep fuse_new
0000000000011070 T fuse_new_30
0000000000010a00 t fuse_new_31
0000000000011070 T fuse_new@FUSE_3.0
0000000000010a00 T fuse_new@@FUSE_3.1

and with LTO:

$ nm lib/libfuse3.so | grep fuse_new
0000000000019a70 T fuse_new_30
0000000000019270 t fuse_new_31

See also issue #198.
2017-09-19 16:47:40 +01:00
Joseph Dodge f12d9686d4 Add idle_threads mount option. 2017-08-24 15:17:01 +02:00
Nikolaus Rath cdea3acc2b fuse_loop_mt(): on error, return errno rather than -1. 2017-08-23 23:38:20 +02:00
Nikolaus Rath c22da7f3a8 Add support for more detailed error codes from main loop 2016-11-16 12:41:41 -08:00
Nikolaus Rath 2bfa342cda Make -o clone_fd into a parameter of session_loop_mt().
This option really affects the behavior of the session loop, not the
low-level interface. Therefore, it does not belong in the fuse_session
object.
2016-10-13 10:35:12 -07:00
Nikolaus Rath ac7121d514 Merge fuse_ll into fuse_session (part 3)
Replace se->f with se.
2016-10-04 20:47:59 -07:00
Nikolaus Rath e4015aca9b Merge master fuse_chan into fuse_session.
This is a code simplification patch.

- It confines most of the implementation channel implementation into
  fuse_loop_mt (which is its only user).

- It makes it more obvious in the code that channels are only ever used
  when using -o clone_fd and multi-threaded main loop.

- It simplies the definition of both struct fuse_session and struct
  fuse_chan.

- Theoretically it should result in (minuscule) performance
  improvements when not using -o clone_fd.

- Overall, it removes a lot more lines of source code than it adds :-).
2016-10-03 23:01:46 -07:00
Nikolaus Rath d968b4ddae Extended per-file comments.
This should make more clear what file contains code for what
purpose.
2016-10-02 21:20:44 -07:00
Nikolaus Rath 65c9df72e3 Turned fuse_session_{process,receive}_buf into wrapper functions. 2016-10-02 10:46:49 -07:00
Nikolaus Rath f007954525 Inlined fuse_chan_fd 2016-03-29 13:18:16 -07:00
Miklos Szeredi a5a00e9b7d libfuse: add "clone_fd" option
This creates a separate device file descriptor for each processing thread,
which might improve performance.
2015-05-18 16:55:20 +02:00
Miklos Szeredi e6e7a249c5 libfuse: remove "-D_FILE_OFFSET_BITS=64" from fuse.pc
add AC_SYS_LARGEFILE to your configure.ac instead.
2013-07-24 17:09:26 +02:00
Miklos Szeredi 95e71dd19e Merge https://github.com/qknight/fuse-fuse 2013-07-17 15:14:55 +02:00
Miklos Szeredi 561d7054d8 libfuse: remove fuse_chan_bufsize()
Remove fuse_chan_bufsize() from the lowlevel API.
fuse_session_receive_buf() is now responsible for allocating memory for the
buffer.
2013-06-21 18:17:27 +02:00
Miklos Szeredi 5334a152e1 libfuse: remove fuse_chan_(send|receive)
Move the fuse_chan_ops.send and .receive implementations to fuse_lowlevel.c.  The abstraction wasn't actually useful and made the the splice implementation more difficult.

Remove fuse_chan_ops.send and fuse_chan_ops.receive.
2013-06-21 18:17:27 +02:00
Miklos Szeredi 2bcfd55fc1 libfuse: replace fuse_session_next_chan
Replace fuse_session_next_chan() with fuse_session_chan(), as multiple
channels per session were never actually supported and probably never will.
2013-06-21 13:35:30 +02:00
Joachim Schiele ea7227db43 - added a doxygen main page
- modified all examples to be included in doxygen
- modified the API documentation to have more details
- added the 490px_FUSE_structure.svg.png (c) wikipedia
2013-06-20 19:18:18 +02:00
Miklos Szeredi 44088bc7fb libfuse: fix thread cancel race
Exiting a worker my race with cancelling that same worker.  This caused a
segmenation fault.

Reported and tested by Anatol Pomozov
2013-03-19 17:16:14 +01:00
Miklos Szeredi 6c4cc1e64d Remove unnecessary mutex unlock at the end of multithreaded event loop 2012-01-02 18:15:05 +01:00
therealneworld@gmail.com 94c2b63955 add "remember" option
This works similar to "noforget" except that eventually the node will
be allowed to expire from the cache.
2011-06-02 14:27:02 +02:00
Miklos Szeredi d915a6b4a8 Allow batching of forget requests
This allows forget requests to be processed faster and doesn't require
a modification to fuse filesystems.  Reported by Terje Malmedal
2011-05-19 15:26:37 +02:00
Miklos Szeredi 71b1c37a66 libfuse: fuse_session_loop_mt() shouldn't pause when exiting worker threads
In fuse_session_loop_mt() don't pause when exiting the worker threads.
The pause() was added in 2.2.1 to prevent segfault on pthread_cancel()
on an exited, detached thread.  Now worker threads are not detached
and pthread_cancel() should work fine even after the thread exited.
Reported by Boris Protopopov
2011-02-02 12:18:38 +01:00
Miklos Szeredi 4e0aea6a96 libfuse: support zero copy writes in lowlevel interface
Add new ->write_buf() method to low level interface.  This
allows passig a generic buffer, either containing a memory buffer
or a file descriptor.  This allows implementing zero copy writes.

Add fuse_session_receive_buf() and fuse_session_process_buf()
which may be used in event loop implementations to replace
fuse_chan_recv() and fuse_session_process() respectively.
2010-11-08 17:11:46 +01:00
Miklos Szeredi 72faaa58a8 Add queuing on contention to per-node lock algorithm... 2008-03-07 11:22:11 +00:00
Miklos Szeredi 24b009347e If the "FUSE_THREAD_STACK" environment is set, initialize the stack size of threads by this value 2008-02-08 18:35:04 +00:00
Miklos Szeredi cdb8b79bad change indenting 2007-12-12 14:25:40 +00:00
Miklos Szeredi 7d62647d7a Clarify licence version to be "LGPLv2" for the library 2007-10-16 15:12:09 +00:00
Miklos Szeredi 84b4f9d5b5 lib: don't create new thread for each FORGET request... 2007-05-29 13:34:15 +00:00
Miklos Szeredi 1bf09e6bf7 lib: fix memory leak on thread creation failure... 2007-05-24 08:05:45 +00:00
Miklos Szeredi ccf0be03c3 In multithreaded loop, use a semaphore instead of SIGHUP... 2007-04-26 20:29:12 +00:00
Miklos Szeredi 611ad93ac7 update copyright dates 2007-04-25 16:19:15 +00:00
Miklos Szeredi 288ed4ebce interrupt support 2006-09-07 06:02:44 +00:00
Miklos Szeredi 38f152c72d fix 2006-09-03 18:28:52 +00:00
Miklos Szeredi 9d3b7daa43 fix 2006-05-08 12:35:04 +00:00
Miklos Szeredi 8d975f6fb3 fix 2006-03-17 15:56:05 +00:00
Miklos Szeredi 5d9ce36da4 fix 2006-03-01 12:10:13 +00:00
Miklos Szeredi 95da860d29 fix 2006-01-06 18:29:40 +00:00
Miklos Szeredi 044da2e9e0 fix 2005-12-06 17:59:55 +00:00
Miklos Szeredi 40d7b38b29 fix 2005-11-29 20:07:23 +00:00
Miklos Szeredi a90b734930 *** empty log message *** 2005-11-27 19:22:42 +00:00
Miklos Szeredi 8393e3d228 fix 2005-11-21 11:37:01 +00:00