[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio: export fastpath protocol version
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Apr 11 17:58:20 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.16
------>
commit 183806478065c97995aea0f39f945e94bd51a11c
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date: Thu Apr 11 14:41:52 2019 +0300
fs/fuse kio: export fastpath protocol version
In order to transfer the logic of the fallback decision to user-space,
let's add export fastpath version.
https://jira.sw.ru/browse/PSBM-93637
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 ++++++
fs/fuse/kio/pcs/pcs_ioctl.h | 2 +-
fs/fuse/kio/pcs/pcs_prot_types.h | 9 ++++++---
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 010f90621df0..38d7885f99c7 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -31,6 +31,10 @@ unsigned int pcs_loglevel = LOG_TRACE;
module_param(pcs_loglevel, uint, 0644);
MODULE_PARM_DESC(pcs_loglevel, "Trace level");
+u64 fast_path_version;
+module_param(fast_path_version, ullong, 0444);
+MODULE_PARM_DESC(fast_path_version, "Fast path protocol version");
+
unsigned int debugfs_tracing = DEBUGFS_TRACE;
module_param(debugfs_tracing, uint, 0644);
MODULE_PARM_DESC(debugfs_tracing, "Enable/Disbale debugfs tracing");
@@ -1578,6 +1582,8 @@ static int __init kpcs_mod_init(void)
if (!pcs_cleanup_wq)
goto free_wq;
+ fast_path_version = PCS_FAST_PATH_VERSION.full;
+
if (fuse_register_kio(&kio_pcs_ops))
goto free_cleanup_wq;
diff --git a/fs/fuse/kio/pcs/pcs_ioctl.h b/fs/fuse/kio/pcs/pcs_ioctl.h
index 8fe1aca9ef12..31d5e92cdd93 100644
--- a/fs/fuse/kio/pcs/pcs_ioctl.h
+++ b/fs/fuse/kio/pcs/pcs_ioctl.h
@@ -10,7 +10,7 @@
#include "pcs_map.h"
#include "pcs_rpc.h"
-#define PCS_FAST_PATH_VERSION ((PCS_FAST_PATH_VERSION_T){1, 2})
+#define PCS_FAST_PATH_VERSION ((PCS_FAST_PATH_VERSION_T){{1, 2}})
#define PCS_FUSE_INO_SPECIAL_ ((unsigned long long)-0x1000)
diff --git a/fs/fuse/kio/pcs/pcs_prot_types.h b/fs/fuse/kio/pcs/pcs_prot_types.h
index bba1f1dc76e3..5905fabbfad8 100644
--- a/fs/fuse/kio/pcs/pcs_prot_types.h
+++ b/fs/fuse/kio/pcs/pcs_prot_types.h
@@ -73,9 +73,12 @@ typedef u64 PCS_CHUNK_UID_T;
typedef u64 PCS_LEASE_GEN_T;
typedef u32 PCS_POLICY_GEN_T;
-typedef struct {
- u32 major;
- u32 minor;
+typedef union {
+ struct {
+ u32 major;
+ u32 minor;
+ };
+ u64 full;
} PCS_FAST_PATH_VERSION_T;
/*
More information about the Devel
mailing list