lkml.org 
[lkml]   [2021]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 16/23] erofs: add 'uuid' mount option
Date
Introduce 'uuid' mount option to enable the nodev mode, in which erofs
could be mounted from blob files instead of blkdev. By then users could
specify the path of bootstrap blob file containing the complete erofs
image.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
fs/erofs/super.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index ea56122f7a35..4f17aedc4acd 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -451,6 +451,7 @@ enum {
Opt_dax,
Opt_dax_enum,
Opt_device,
+ Opt_uuid,
Opt_err
};

@@ -475,6 +476,7 @@ static const struct fs_parameter_spec erofs_fs_parameters[] = {
fsparam_flag("dax", Opt_dax),
fsparam_enum("dax", Opt_dax_enum, erofs_dax_param_enums),
fsparam_string("device", Opt_device),
+ fsparam_string("uuid", Opt_uuid),
{}
};

@@ -570,6 +572,12 @@ static int erofs_fc_parse_param(struct fs_context *fc,
}
++ctx->devs->extra_devices;
break;
+ case Opt_uuid:
+ kfree(ctx->opt.uuid);
+ ctx->opt.uuid = kstrdup(param->string, GFP_KERNEL);
+ if (!ctx->opt.uuid)
+ return -ENOMEM;
+ break;
default:
return -ENOPARAM;
}
@@ -784,6 +792,7 @@ static void erofs_fc_free(struct fs_context *fc)
struct erofs_fs_context *ctx = fc->fs_private;

erofs_free_dev_context(ctx->devs);
+ kfree(ctx->opt.uuid);
kfree(ctx);
}

--
2.27.0
\
 
 \ /
  Last update: 2021-12-27 13:56    [W:0.201 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site