diff --git a/add-dcache-parameter-support.patch b/add-dcache-parameter-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba5f578bf31b012853a62bf2ed398d3ed683141d --- /dev/null +++ b/add-dcache-parameter-support.patch @@ -0,0 +1,49 @@ +diff --git a/super.c b/super.c +index 18f222c..aee7d47 100644 +--- a/super.c ++++ b/super.c +@@ -21,6 +21,9 @@ enum { + OPT_NO_OFFLINE_STASH, + OPT_NO_DENTRY_CACHE, + OPT_USER_ID, ++ OPT_DCACHE_THRESHOLD, ++ OPT_DCACHE_PRECISION, ++ OPT_DCACHE_TIMEOUT, + OPT_ERR, + }; + +@@ -33,6 +36,9 @@ static match_table_t hmdfs_tokens = { + { OPT_NO_OFFLINE_STASH, "no_offline_stash" }, + { OPT_NO_DENTRY_CACHE, "no_dentry_cache" }, + { OPT_USER_ID, "user_id=%s"}, ++ {OPT_DCACHE_THRESHOLD, "dcache_threshold=%d"}, ++ {OPT_DCACHE_PRECISION, "dcache_precision=%d"}, ++ {OPT_DCACHE_TIMEOUT, "dcache_timeout=%d"}, + { OPT_ERR, NULL }, + }; + +@@ -150,6 +156,24 @@ int hmdfs_parse_options(struct hmdfs_sb_info *sbi, const char *data) + sbi->user_id = user_id; + } + break; ++ case OPT_DCACHE_THRESHOLD: ++ err = match_int(&args[0], &decache); ++ if (err) ++ goto out; ++ sbi->dcache_threshold = decache; ++ break; ++ case OPT_DCACHE_PRECISION: ++ err = match_int(&args[0], &decache); ++ if (err) ++ goto out; ++ sbi->dcache_precision = decache; ++ break; ++ case OPT_DCACHE_TIMEOUT: ++ err = match_int(&args[0], &decache); ++ if (err) ++ goto out; ++ sbi->dcache_timeout = decache; ++ break; + default: + err = -EINVAL; + goto out;