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-7160 mgs: Skip processing .bak files on MGS
[fs/lustre-release.git]
/
lustre
/
mgs
/
mgs_llog.c
diff --git
a/lustre/mgs/mgs_llog.c
b/lustre/mgs/mgs_llog.c
index
2efea90
..
e307e16
100644
(file)
--- a/
lustre/mgs/mgs_llog.c
+++ b/
lustre/mgs/mgs_llog.c
@@
-100,6
+100,15
@@
int class_dentry_readdir(const struct lu_env *env,
goto next;
}
goto next;
}
+ /* filter out ".bak" files */
+ /* sizeof(".bak") - 1 == 3 */
+ if (key_sz >= 3 &&
+ !memcmp(".bak", key + key_sz - 3, 3)) {
+ CDEBUG(D_MGS, "Skipping backup file %.*s\n",
+ key_sz, key);
+ goto next;
+ }
+
de = mgs_direntry_alloc(key_sz + 1);
if (de == NULL) {
rc = -ENOMEM;
de = mgs_direntry_alloc(key_sz + 1);
if (de == NULL) {
rc = -ENOMEM;