diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-09 20:29:04 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-09 22:03:07 -0700 |
commit | 64c97de5be7f899e1d36e620b3a5959d122909c7 (patch) | |
tree | 643c4e3c8fc8aeccfb7cc8416cd2e0d9d292e5cb /example | |
parent | a668d264d6d123bba3e33b0af39e2cacce88d047 (diff) | |
download | libfuse-64c97de5be7f899e1d36e620b3a5959d122909c7.tar.gz |
Renamed timefsN examples to fuse_notify_*
This should make it more obvious at first glance what the different
examples do.
Diffstat (limited to 'example')
-rw-r--r-- | example/.gitignore | 5 | ||||
-rw-r--r-- | example/Makefile.am | 4 | ||||
-rw-r--r-- | example/notify_inval_entry.c (renamed from example/timefs3.c) | 8 | ||||
-rw-r--r-- | example/notify_inval_inode.c (renamed from example/timefs1.c) | 48 | ||||
-rw-r--r-- | example/notify_store_retrieve.c (renamed from example/timefs2.c) | 16 |
5 files changed, 41 insertions, 40 deletions
diff --git a/example/.gitignore b/example/.gitignore index fb1794a..f7cd045 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -8,5 +8,6 @@ /poll_client /cusexmp /passthrough_ll -/timefs1 -/timefs2 +/notify_inval_inode +/notify_store_retrieve +/notify_inval_entry diff --git a/example/Makefile.am b/example/Makefile.am index 9d780a7..6d93edc 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -4,8 +4,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -D_REENTRANT noinst_HEADERS = ioctl.h noinst_PROGRAMS = passthrough passthrough_fh hello hello_ll \ ioctl ioctl_client poll poll_client \ - cusexmp passthrough_ll timefs1 timefs2 \ - timefs3 + cusexmp passthrough_ll notify_inval_inode \ + notify_store_retrieve notify_inval_entry LDADD = ../lib/libfuse3.la passthrough_fh_LDADD = ../lib/libfuse3.la @passthrough_fh_libs@ diff --git a/example/timefs3.c b/example/notify_inval_entry.c index 613407c..fc8bc1e 100644 --- a/example/timefs3.c +++ b/example/notify_inval_entry.c @@ -18,7 +18,7 @@ * To see the effect, first start the file system with the * ``--no-notify`` * - * $ timefs --update-interval=1 --timeout 30 --no-notify mnt/ + * $ notify_inval_entry --update-interval=1 --timeout 30 --no-notify mnt/ * * Observe that `ls` always prints the correct directory contents * (since `readdir` output is not cached):: @@ -52,7 +52,7 @@ * In contrast, if you enable notifications you will be unable to stat * the file as soon as the file system updates its name: * - * $ timefs --update-interval=1 --timeout 30 --no-notify mnt/ + * $ notify_inval_entry --update-interval=1 --timeout 30 --no-notify mnt/ * $ file=$(ls mnt/); stat mnt/$file * File: ‘mnt/Time_is_20h_42m_11s’ * Size: 0 Blocks: 0 IO Block: 4096 regular empty file @@ -67,10 +67,10 @@ * * \section section_compile compiling this example * - * gcc -Wall timefs3.c `pkg-config fuse3 --cflags --libs` -o timefs3 + * gcc -Wall notify_inval_entry.c `pkg-config fuse3 --cflags --libs` -o notify_inval_entry * * \section section_source the complete source - * \include timefs3.c + * \include notify_inval_entry.c */ diff --git a/example/timefs1.c b/example/notify_inval_inode.c index 50363fd..5dfc225 100644 --- a/example/timefs1.c +++ b/example/notify_inval_inode.c @@ -12,35 +12,35 @@ * This example implements a file system with a single file whose * contents change dynamically: it always contains the current time. * - * While timefs2.c uses fuse_lowlevel_notify_store() to actively push - * the updated data into the kernel cache, this example uses - * fuse_lowlevel_notify_inval_inode() to notify the kernel that the - * cache has to be invalidated - but the kernel still has to explicitly - * request the updated data on the next read. + * While notify_store_retrieve.c uses fuse_lowlevel_notify_store() to + * actively push the updated data into the kernel cache, this example + * uses fuse_lowlevel_notify_inval_inode() to notify the kernel that + * the cache has to be invalidated - but the kernel still has to + * explicitly request the updated data on the next read. * - * To see the effect, first start the file system with the + * To see the effect, first start the file system with the * ``--no-notify`` option: * - * $ timefs --update-interval=1 --no-notify mnt/ + * $ notify_inval_inode --update-interval=1 --no-notify mnt/ * - * Observe that the output never changes, even though the file system - * updates it once per second. This is because the contents are cached - * in the kernel: + * Observe that the output never changes, even though the file system + * updates it once per second. This is because the contents are cached + * in the kernel: * - * $ for i in 1 2 3 4 5; do - * > cat mnt/current_time - * > sleep 1 - * > done - * The current time is 15:58:18 - * The current time is 15:58:18 - * The current time is 15:58:18 - * The current time is 15:58:18 - * The current time is 15:58:18 + * $ for i in 1 2 3 4 5; do + * > cat mnt/current_time + * > sleep 1 + * > done + * The current time is 15:58:18 + * The current time is 15:58:18 + * The current time is 15:58:18 + * The current time is 15:58:18 + * The current time is 15:58:18 * - * If you instead enable the notification functions, the changes become - * visible: + * If you instead enable the notification functions, the changes become + * visible: * - * $ timefs --update-interval=1 mnt/ + * $ notify_inval_inode --update-interval=1 mnt/ * $ for i in 1 2 3 4 5; do * > cat mnt/current_time * > sleep 1 @@ -53,10 +53,10 @@ * * \section section_compile compiling this example * - * gcc -Wall timefs1.c `pkg-config fuse3 --cflags --libs` -o timefs1 + * gcc -Wall notify_inval_inode.c `pkg-config fuse3 --cflags --libs` -o notify_inval_inode * * \section section_source the complete source - * \include timefs1.c + * \include notify_inval_inode.c */ diff --git a/example/timefs2.c b/example/notify_store_retrieve.c index ae3fe99..a21d117 100644 --- a/example/timefs2.c +++ b/example/notify_store_retrieve.c @@ -12,15 +12,15 @@ * This example implements a file system with a single file whose * contents change dynamically: it always contains the current time. * - * While timefs1.c uses fuse_lowlevel_notify_inval_inode() to let the - * kernel know that it has to invalidate the cache, this example - * actively pushes the updated data into the kernel cache using - * fuse_lowlevel_notify_store(). + * While notify_inval_inode.c uses fuse_lowlevel_notify_inval_inode() + * to let the kernel know that it has to invalidate the cache, this + * example actively pushes the updated data into the kernel cache + * using fuse_lowlevel_notify_store(). * * To see the effect, first start the file system with the * ``--no-notify`` option: * - * $ timefs --update-interval=1 --no-notify mnt/ + * $ notify_store_retrieve --update-interval=1 --no-notify mnt/ * * Observe that the output never changes, even though the file system * updates it once per second. This is because the contents are cached @@ -39,7 +39,7 @@ * If you instead enable the notification functions, the changes become * visible: * - * $ timefs --update-interval=1 mnt/ + * $ notify_store_retrieve --update-interval=1 mnt/ * $ for i in 1 2 3 4 5; do * > cat mnt/current_time * > sleep 1 @@ -52,10 +52,10 @@ * * \section section_compile compiling this example * - * gcc -Wall timefs2.c `pkg-config fuse3 --cflags --libs` -o timefs2 + * gcc -Wall notify_store_retrieve.c `pkg-config fuse3 --cflags --libs` -o notify_store_retrieve * * \section section_source the complete source - * \include timefs2.c + * \include notify_store_retrieve.c */ |