From 21b50fe6cd1697e679bb7e32bbdce2ab98598991 Mon Sep 17 00:00:00 2001 From: liuzerun Date: Fri, 21 Feb 2025 15:36:18 +0800 Subject: [PATCH] hmdfs_remount Signed-off-by: liuzerun --- fs/hmdfs/hmdfs.h | 2 +- fs/hmdfs/main.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/hmdfs/hmdfs.h b/fs/hmdfs/hmdfs.h index c9940693f3e7..22d64c162b10 100644 --- a/fs/hmdfs/hmdfs.h +++ b/fs/hmdfs/hmdfs.h @@ -43,7 +43,7 @@ // 20 digits +'\0', Converted from a u64 integer #define HMDFS_ACCOUNT_HASH_MAX_LEN 21 -#define CTRL_PATH_MAX_LEN 21 +#define CTRL_PATH_MAX_LEN 11 #define HMDFS_SUPER_MAGIC 0x20200302 diff --git a/fs/hmdfs/main.c b/fs/hmdfs/main.c index 10d37cbac2ef..db4f58d45391 100644 --- a/fs/hmdfs/main.c +++ b/fs/hmdfs/main.c @@ -864,7 +864,6 @@ static int hmdfs_fill_super(struct super_block *sb, void *data, int silent) struct super_block *lower_sb; struct dentry *root_dentry; char ctrl_path[CTRL_PATH_MAX_LEN]; - uint64_t ctrl_hash; if (!raw_data) return -EINVAL; @@ -901,9 +900,8 @@ static int hmdfs_fill_super(struct super_block *sb, void *data, int silent) goto out_freesbi; // add ctrl sysfs node - ctrl_hash = path_hash(sbi->local_dst, strlen(sbi->local_dst), true); - scnprintf(ctrl_path, CTRL_PATH_MAX_LEN, "%llu", ctrl_hash); - hmdfs_debug("hash %llu", ctrl_hash); + scnprintf(ctrl_path, CTRL_PATH_MAX_LEN, "%u", sb->s_dev); + hmdfs_debug("s_dev %u", sb->s_dev); err = hmdfs_register_sysfs(ctrl_path, sbi); if (err) goto out_freesbi; -- Gitee