Annotate ABI sensitivness for some data structures
authorBernd Schubert <bschubert@ddn.com>
Tue, 25 Jun 2024 03:42:21 +0000 (05:42 +0200)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Wed, 3 Jul 2024 11:10:46 +0000 (13:10 +0200)
These are not all ABI sensitive data structures yet.

Also some space vs tab indentation issues are corrected.

include/fuse.h
include/fuse_common.h
include/fuse_lowlevel.h

index ad50d7f777171c82d6b0a3859e357c94214b8e82..396358d8d1e23d26738b619658d23f946366e25a 100644 (file)
@@ -94,6 +94,9 @@ typedef int (*fuse_fill_dir_t) (void *buf, const char *name,
  * fuse_new(), and then passed to the file system's init() handler
  * which should ensure that the configuration is compatible with the
  * file system implementation.
+ *
+ * Note: this data structure is ABI sensitive, new options have to be
+ * appended at the end of the structure
  */
 struct fuse_config {
        /**
@@ -276,6 +279,7 @@ struct fuse_config {
         * fuse_file_info argument is NULL.
         */
        int nullpath_ok;
+
        /**
         *  Allow parallel direct-io writes to operate on the same file.
         *
@@ -292,7 +296,7 @@ struct fuse_config {
        int parallel_direct_writes;
 
        /**
-        * The remaining options are used by libfuse internally and
+        * These 3 options are used by libfuse internally and
         * should not be touched.
         */
        int show_help;
index c583af399bf1f53cd8fa375195c02a185ca6959a..04ecb95876b2f55233ba32cb3b42f0e289c646fc 100644 (file)
@@ -40,6 +40,10 @@ extern "C" {
  * concurrently open for the same file.  Generally, a client will create one
  * file handle per file descriptor, though in some cases multiple file
  * descriptors can share a single file handle.
+ *
+ * Note: This data structure is ABI sensitive, new parameters have to be
+ *       added within padding/padding2 bits and always below existing
+ *       parameters.
  */
 struct fuse_file_info {
        /** Open flags.  Available in open(), release() and create() */
@@ -63,8 +67,8 @@ struct fuse_file_info {
        unsigned int keep_cache : 1;
 
        /** Can be filled by open/create, to allow parallel direct writes on this
-         *  file */
-        unsigned int parallel_direct_writes : 1;
+           file */
+       unsigned int parallel_direct_writes : 1;
 
        /** Indicates a flush operation.  Set in flush operation, also
            maybe set in highlevel lock operation and lowlevel release
index e84961718eadc466a4db3174d42b134bdb3d00d1..e62e24cf994496d620fa59cca7cf2ca02757a437 100644 (file)
@@ -199,6 +199,9 @@ enum fuse_notify_entry_flags {
  * interrupted, and the reply discarded.  For example if
  * fuse_reply_open() return -ENOENT means, that the release method for
  * this file will not be called.
+ *
+ * This data structure is ABI sensitive, on adding new functions these need to
+ * be appended at the end of the struct
  */
 struct fuse_lowlevel_ops {
        /**
@@ -509,7 +512,7 @@ struct fuse_lowlevel_ops {
         *    expected to properly handle the O_APPEND flag and ensure
         *    that each write is appending to the end of the file.
         * 
-         *  - When writeback caching is enabled, the kernel will
+        *  - When writeback caching is enabled, the kernel will
         *    handle O_APPEND. However, unless all changes to the file
         *    come through the kernel this will not work reliably. The
         *    filesystem should thus either ignore the O_APPEND flag
@@ -744,7 +747,7 @@ struct fuse_lowlevel_ops {
         * Returning a directory entry from readdir() does not affect
         * its lookup count.
         *
-         * If off_t is non-zero, then it will correspond to one of the off_t
+        * If off_t is non-zero, then it will correspond to one of the off_t
         * values that was previously returned by readdir() for the same
         * directory handle. In this case, readdir() should skip over entries
         * coming before the position defined by the off_t value. If entries