X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fmount_lustre.c;h=c0905bc51395bbccb16a1f46c9785d7e9bbed66b;hp=469d0824f1eea8b33d35b3939cd31976bcf23e17;hb=3be527797699853aae3d1a71089900c9b1676791;hpb=7e4673aeb348677a770bf686a13780c873becf7f diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 469d082..c0905bc 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -190,12 +190,23 @@ static const struct opt_map opt_map[] = { { "nodev", 0, MS_NODEV }, /* don't interpret devices */ { "sync", 0, MS_SYNCHRONOUS}, /* synchronous I/O */ { "async", 1, MS_SYNCHRONOUS}, /* asynchronous I/O */ + { "atime", 1, MS_NOATIME }, /* set file access time on read */ + { "noatime", 0, MS_NOATIME }, /* do not set file access time on read */ +#ifdef MS_NODIRATIME + { "diratime", 1, MS_NODIRATIME }, /* set file access time on read */ + { "nodiratime",0,MS_NODIRATIME }, /* do not set file access time on read */ +#endif +#ifdef MS_RELATIME + { "relatime", 0, MS_RELATIME }, /* set file access time on read */ + { "norelatime",1,MS_RELATIME }, /* do not set file access time on read */ +#endif { "auto", 0, 0 }, /* Can be mounted using -a */ { "noauto", 0, 0 }, /* Can only be mounted explicitly */ { "nousers", 1, 0 }, /* Forbid ordinary user to mount */ { "nouser", 1, 0 }, /* Forbid ordinary user to mount */ { "noowner", 1, 0 }, /* Device owner has no special privs */ { "_netdev", 0, 0 }, /* Device accessible only via network */ + { "loop", 0, 0 }, { NULL, 0, 0 } }; /****************************************************************************/ @@ -379,7 +390,8 @@ int set_tunables(char *source, int src_len) if (verbose) fprintf(stderr,"warning: device %s does not match any " "entry under /sys/block\n", real_path); - return -EINVAL; + rc = -EINVAL; + goto out; } snprintf(path, sizeof(path), "%s/%s", glob_info.gl_pathv[i], @@ -389,7 +401,7 @@ int set_tunables(char *source, int src_len) if (verbose) fprintf(stderr, "warning: opening %s: %s\n", path, strerror(errno)); - return rc; + goto out; } if (strlen(buf) - 1 > 0) { @@ -400,6 +412,9 @@ int set_tunables(char *source, int src_len) fprintf(stderr, "warning: writing to %s: %s\n", path, strerror(errno)); } + +out: + globfree(&glob_info); return rc; }