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
b=23428 Fix lustre built with --enable-lu_ref
[fs/lustre-release.git]
/
lustre
/
utils
/
ll_recover_lost_found_objs.c
diff --git
a/lustre/utils/ll_recover_lost_found_objs.c
b/lustre/utils/ll_recover_lost_found_objs.c
index
d95fb5a
..
4ac685d
100644
(file)
--- a/
lustre/utils/ll_recover_lost_found_objs.c
+++ b/
lustre/utils/ll_recover_lost_found_objs.c
@@
-26,7
+26,7
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright
2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright
(c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
* Use is subject to license terms.
*/
/*
@@
-187,7
+187,7
@@
static unsigned filetype_dir_table[] = {
static int traverse_lost_found(char *src_dir, const char *mount_path)
{
DIR *dir_ptr;
static int traverse_lost_found(char *src_dir, const char *mount_path)
{
DIR *dir_ptr;
- struct filter_fid
trusted
_fid;
+ struct filter_fid
parent
_fid;
struct dirent64 *dirent;
__u64 ff_group, ff_objid;
char *file_path;
struct dirent64 *dirent;
__u64 ff_group, ff_objid;
char *file_path;
@@
-252,25
+252,24
@@
static int traverse_lost_found(char *src_dir, const char *mount_path)
case DT_REG:
file_path = src_dir;
xattr_len = getxattr(file_path, "trusted.fid",
case DT_REG:
file_path = src_dir;
xattr_len = getxattr(file_path, "trusted.fid",
- (void *)&
trusted
_fid,
- sizeof(
trusted
_fid));
+ (void *)&
parent
_fid,
+ sizeof(
parent
_fid));
- if (xattr_len == -1 || xattr_len < sizeof(
trusted
_fid))
+ if (xattr_len == -1 || xattr_len < sizeof(
parent
_fid))
/*
* Its very much possible that we dont find fid
* on precreated files, LAST_ID
*/
continue;
/*
* Its very much possible that we dont find fid
* on precreated files, LAST_ID
*/
continue;
- ff_group = le64_to_cpu(trusted_fid.ff_group);
- ff_objid = le64_to_cpu(trusted_fid.ff_objid);
-
- if (ff_group >= MAX_GROUPS) {
+ ff_group = le64_to_cpu(parent_fid.ff_seq);
+ if (ff_group >= FID_SEQ_OST_MAX) {
fprintf(stderr, "error: invalid group "LPU64" likely"
"indicates a corrupt xattr for file %s.\n",
ff_group, file_path);
continue;
}
fprintf(stderr, "error: invalid group "LPU64" likely"
"indicates a corrupt xattr for file %s.\n",
ff_group, file_path);
continue;
}
+ ff_objid = le64_to_cpu(parent_fid.ff_objid);
/* might need to create the parent directories for
this object */
/* might need to create the parent directories for
this object */