summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a2ba6c0)
lctl replace_nids command saves previous version of
config files to file with original_name.bak file name.
This file should never be processed by MGS.
This patch adds code that skips file with .bak extention
from list to be processed by MGS.
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Xyratex-bug-id: MRP-2742
Change-Id: I5ad5cf5548d395459d2245394ef3f7764fe8f0ca
Reviewed-on: http://review.whamcloud.com/16428
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
+ /* 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;