From 60407ed695b3f54900ca2a408c562ae5abfd7194 Mon Sep 17 00:00:00 2001 From: x00456388 Date: Mon, 27 Dec 2021 19:45:23 +0800 Subject: [PATCH 1/4] add distributedfile property syspara query Signed-off-by: x00456388 --- services/BUILD.gn | 7 +++++++ services/distributedfile.para | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 services/distributedfile.para diff --git a/services/BUILD.gn b/services/BUILD.gn index 189a30a86..98bfdb6da 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -28,10 +28,17 @@ ohos_prebuilt_etc("distributedfile_etc") { subsystem_name = "storage" } +ohos_prebuilt_etc("distributedfile.para") { + source = "distributedfile.para" + part_name = "storage_distributed_file_manager" + module_install_dir = "etc/param" +} + group("services_target") { deps = [ ":distributedfile_etc", ":distributedfile_sa_profile", + ":distributedfile.para", "distributedfiledaemon:distributedfiledaemon_target", "distributedfileservice:distributedfileservice_target", ] diff --git a/services/distributedfile.para b/services/distributedfile.para new file mode 100644 index 000000000..8cc6ad18f --- /dev/null +++ b/services/distributedfile.para @@ -0,0 +1,16 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +const.distributedfile_property.enabled=true + -- Gitee From edd26f14f1f5da05fef856dc827b6ae025fd39d8 Mon Sep 17 00:00:00 2001 From: x00456388 Date: Wed, 29 Dec 2021 16:36:21 +0800 Subject: [PATCH 2/4] update readme--structure and name specification Signed-off-by: x00456388 --- README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b1b425c28..2006b5271 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 分布式文件管理的架构如下图所示: -![架构图](https://images.gitee.com/uploads/images/2021/1102/094937_01125861_9249473.png "io.drawio.png") +![架构图](https://images.gitee.com/uploads/images/2021/1229/163114_099e1073_7809790.png "架构图update.png") 其包括如下几个核心模块: @@ -23,18 +23,18 @@ ├── frameworks // 接口实现 │ └── native // c/c++ 接口实现 ├── interfaces // 接口声明 -│ └── innerkits // 对内接口声明 +│ └── inner_API // 对内接口声明 ├── services // 服务实现 -│ └── distributedfiledaemon // 常驻服务实现 +│ └── distributed_file_daemon // 常驻服务实现 | └── include | └── src - └── device // 设备上下线管理 - └── ipc // daemon进程拉起退出流程以及ipc接口实现 - └── mountpoint // hmdfs挂载管理 - └── network // 软总线和内核会话session交互相关 +| └── device // 设备上下线管理 +| └── ipc // daemon进程拉起退出流程以及ipc接口实现 +| └── mountpoint // hmdfs挂载管理 +| └── network // 软总线和内核会话session交互相关 | └── test | └── BUILD.gn -| └── distributedfileservice // 三方应用调用流程服务实现 +| └── distributed_file_service // 三方应用调用流程服务实现 └── utils // 公共组件 ├── log // 日志组件 └── system // 平台相关组件 @@ -68,13 +68,8 @@ 可以使用终端调试分布式文件管理能力。 -在多台设备已经组网(同一局域网)的情况下, 并且在经过hichian模块可信认证的设备间,可以建立设备间分布式文件互相访问的能力。 +多台设备在已经组网(同一局域网), 并且经过hichian模块可信认证,可以建立设备间分布式文件互相访问的能力。 可以在应用内通过```Context.distributedFileDir()```接口获取本应用沙箱内的分布式路径,然后在此目录下可以进行创建、删除、读写文件和目录。 -在此目录下有```device_view```和```merge_view```两个目录。 - -device_view 的含义是分设备视图,其下的 local 对应被堆叠的本地文件系统,`79xxx0c8d` 对应相应设备上的本地文件系统。如果在 local 中进行文件系统操作,其影响也将体现在 hmdfs 的源目录,即 `/data/misc_ce/0/hmdfs/storage` 中。如果在 `79xxx0c8d` 中进行文件系统操作,其影响也将体现在对应设备的 hmdfs 的源目录中。 - -merge_view 的含义是融合视图,它由分设备视图中各目录融合而成。在其中进行文件系统操作,将影响所有设备 hmdfs 的源目录。特别地,当将会产生新文件/目录时,总会产生在本地 hmdfs 的源目录中。 ## 相关 -- Gitee From d5ddb06c7bec766fb613f5d2171748725df963ca Mon Sep 17 00:00:00 2001 From: x00456388 Date: Thu, 30 Dec 2021 15:02:18 +0800 Subject: [PATCH 3/4] structure fix Signed-off-by: x00456388 --- README.md | 14 +++++++------- services/BUILD.gn | 6 +++--- ...{distributedfile.para => distributed_file.para} | 0 3 files changed, 10 insertions(+), 10 deletions(-) rename services/{distributedfile.para => distributed_file.para} (100%) diff --git a/README.md b/README.md index 2006b5271..c10b77ab9 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ 分布式文件管理的架构如下图所示: -![架构图](https://images.gitee.com/uploads/images/2021/1229/163114_099e1073_7809790.png "架构图update.png") +![架构图](https://images.gitee.com/uploads/images/2021/1230/144700_951a1fe5_7809790.png "hmdfs架构图update_20211230.png") 其包括如下几个核心模块: -- distributedfiledaemon:分布式文件管理常驻用户态服务,负责接入设备组网、数据传输能力,并负责挂载hmdfs -- distributedfileservice:分布式文件管理服务进程,对应用提供分布式扩展能力 +- distributed_file_daemon:分布式文件管理常驻用户态服务,负责接入设备组网、数据传输能力,并负责挂载hmdfs +- distributed_file_service:分布式文件管理服务进程,对应用提供分布式扩展能力 - hmdfs(Harmony Distributed File System):分布式文件管理核心模块,是一种面向移动分布式场景的、高性能的、基于内核实现的、堆叠式文件系统。 ## 目录 @@ -28,10 +28,10 @@ │ └── distributed_file_daemon // 常驻服务实现 | └── include | └── src -| └── device // 设备上下线管理 -| └── ipc // daemon进程拉起退出流程以及ipc接口实现 -| └── mountpoint // hmdfs挂载管理 -| └── network // 软总线和内核会话session交互相关 +| └── device // 设备上下线管理 +| └── ipc // daemon进程拉起退出流程以及ipc接口实现 +| └── mount_point // hmdfs挂载管理 +| └── network // 软总线和内核会话session交互相关 | └── test | └── BUILD.gn | └── distributed_file_service // 三方应用调用流程服务实现 diff --git a/services/BUILD.gn b/services/BUILD.gn index 98bfdb6da..07fd5de41 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -28,8 +28,8 @@ ohos_prebuilt_etc("distributedfile_etc") { subsystem_name = "storage" } -ohos_prebuilt_etc("distributedfile.para") { - source = "distributedfile.para" +ohos_prebuilt_etc("distributed_file.para") { + source = "distributed_file.para" part_name = "storage_distributed_file_manager" module_install_dir = "etc/param" } @@ -38,7 +38,7 @@ group("services_target") { deps = [ ":distributedfile_etc", ":distributedfile_sa_profile", - ":distributedfile.para", + ":distributed_file.para", "distributedfiledaemon:distributedfiledaemon_target", "distributedfileservice:distributedfileservice_target", ] diff --git a/services/distributedfile.para b/services/distributed_file.para similarity index 100% rename from services/distributedfile.para rename to services/distributed_file.para -- Gitee From 4429360ec45612af6e7447b11dc878ea685e115c Mon Sep 17 00:00:00 2001 From: x00456388 Date: Thu, 30 Dec 2021 15:29:48 +0800 Subject: [PATCH 4/4] fix para file Signed-off-by: x00456388 --- services/distributed_file.para | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/distributed_file.para b/services/distributed_file.para index 8cc6ad18f..114ed9451 100644 --- a/services/distributed_file.para +++ b/services/distributed_file.para @@ -12,5 +12,5 @@ # limitations under the License. -const.distributedfile_property.enabled=true +const.distributed_file_property.enabled=true -- Gitee