Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-960 utils: bad stripe count report, and validate stripe size
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi.c
diff --git
a/lustre/utils/liblustreapi.c
b/lustre/utils/liblustreapi.c
index
999a2c3
..
2994cdd
100644
(file)
--- a/
lustre/utils/liblustreapi.c
+++ b/
lustre/utils/liblustreapi.c
@@
-177,6
+177,9
@@
int parse_size(char *optarg, unsigned long long *size,
{
char *end;
+ if (strncmp(optarg, "-", 1) == 0)
+ return -1;
+
if (*size_units == 0)
*size_units = 1;
@@
-1654,7
+1657,7
@@
static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
&scount, NULL,
NULL);
if (rc == 0)
- llapi_printf(LLAPI_MSG_NORMAL, "%
u
%c",
+ llapi_printf(LLAPI_MSG_NORMAL, "%
d
%c",
scount, nl);
else
llapi_error(LLAPI_MSG_ERROR, rc,
@@
-1698,6
+1701,14
@@
static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
lum->lmm_pattern, nl);
}
+ if ((verbose & VERBOSE_GENERATION) && !is_dir) {
+ if (verbose & ~VERBOSE_GENERATION)
+ llapi_printf(LLAPI_MSG_NORMAL, "%slayout_gen: ",
+ prefix);
+ llapi_printf(LLAPI_MSG_NORMAL, "%u%c",
+ (int)lum->u.lum_layout_gen, nl);
+ }
+
if (verbose & VERBOSE_OFFSET) {
if (verbose & ~VERBOSE_OFFSET)
llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_offset: ",
@@
-1926,7
+1937,7
@@
static int find_time_check(lstat_t *st, struct find_param *param, int mds)
/* Check if file is accepted. */
if (param->atime) {
ret = find_value_cmp(st->st_atime, param->atime,
- param->asign, param->exclude_atime,
+ param->asign, param->exclude_atime,
24 * 60 * 60, mds);
if (ret < 0)
return ret;
@@
-1935,7
+1946,7
@@
static int find_time_check(lstat_t *st, struct find_param *param, int mds)
if (param->mtime) {
ret = find_value_cmp(st->st_mtime, param->mtime,
- param->msign, param->exclude_mtime,
+ param->msign, param->exclude_mtime,
24 * 60 * 60, mds);
if (ret < 0)
return ret;
@@
-2538,7
+2549,6
@@
int llapi_target_iterate(int type_num, char **obd_type,
char *obd_name = NULL;
char *obd_uuid = NULL;
char *bufp = buf;
- struct obd_ioctl_data datal = { 0, };
struct obd_statfs osfs_buffer;
while(bufp[0] == ' ')
@@
-2552,9
+2562,6
@@
int llapi_target_iterate(int type_num, char **obd_type,
memset(&osfs_buffer, 0, sizeof (osfs_buffer));
- datal.ioc_pbuf1 = (char *)&osfs_buffer;
- datal.ioc_plen1 = sizeof(osfs_buffer);
-
for (i = 0; i < type_num; i++) {
if (strcmp(obd_type_name, obd_type[i]) != 0)
continue;