Changeset 2641 in MondoRescue


Ignore:
Timestamp:
Jun 10, 2010, 12:05:36 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Attempt to fix problem of slowdown in filelist creation by re-introducing a limit to the find command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-filelist.c

    r2608 r2641  
    13731373          mr_free(token);
    13741374        }
     1375
     1376/**
     1377 * The maximum depth of directories to put in the skeleton filelist.
     1378 * This is a balance between performance and a good progress indicator.
     1379 */
     1380#define MAX_SKEL_DEPTH  3
     1381
    13751382#if linux
    13761383        // 2.6 has /sys as a proc-type thing -- must be excluded
    1377         mr_asprintf(&strtmp, "find '%s' -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
     1384        mr_asprintf(&strtmp, "find '%s' -maxdepth %d -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o %s -type d -print > %s 2> /dev/null", dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
    13781385#else
    13791386        // On BSD, for example, /sys is the kernel sources -- don't exclude
    1380         mr_asprintf(&strtmp, "find '%s' -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
     1387        mr_asprintf(&strtmp, "find '%s' -maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null", dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
    13811388#endif
    13821389        paranoid_free(find_excludes);
     
    13941401        log_msg(5, "entries = %ld", g_skeleton_entries);
    13951402        percentage = 0;
    1396     } else // update evalcall form if appropriate
     1403    } else if (depth <= MAX_SKEL_DEPTH) // update evalcall form if appropriate
    13971404    {
    13981405        sprintf(find_skeleton_marker,
Note: See TracChangeset for help on using the changeset viewer.