est_ops.c File Reference

Handling of single struct estat s. More...

#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include "global.h"
#include "status.h"
#include "cache.h"
#include "actions.h"
#include "est_ops.h"
#include "ignore.h"
#include "direnum.h"
#include "warnings.h"
#include "helper.h"
#include "checksum.h"
#include "url.h"
Include dependency graph for est_ops.c:

Go to the source code of this file.

Data Structures

struct  free_estat
 Single-linked list for storing the freed entries. More...

Defines

#define WAA_MAX_DIR_INFO_CHARS

Functions

int ops__string_to_dev (struct estat *sts, char *data, char **info)
 -.
int ops__link_to_string (struct estat *sts, char *filename, char **erg)
 -.
char * ops___dev_to_string (struct estat *sts, char delimiter)
char * ops__dev_to_waa_string (struct estat *sts)
 -.
char * ops__dev_to_filedata (struct estat *sts)
 -.
int ops__stat_to_action (struct estat *sts, struct sstat_t *new)
 -.
int ops__load_1entry (char **mem_pos, struct estat *sts, char **filename, ino_t *parent_i)
 -.
int ops___entries_to_write (struct estat *dir)
 Returns the number of entries to write into the entry list.
int ops__save_1entry (struct estat *sts, ino_t parent_ino, int filehandle)
 -.
char * ops__get_filename (char *path)
 -.
static const char * ops___split_fnpart (const char *path)
 Returns the "rest" of the path; a \0 is written over the path separator.
int ops__build_path2 (char *path, int max, struct estat *sts)
 The real recursive part of ops__build_path().
int ops__calc_path_len (struct estat *sts)
 -.
int ops__build_path (char **value, struct estat *sts)
 -.
int ops__new_entries (struct estat *dir, int count, struct estat **new_entries)
 -.
int ops__find_entry_byname (struct estat *dir, char *name, struct estat **sts, int ignored_too)
 -.
int ops__find_entry_byinode (struct estat *dir, dev_t dev, ino_t inode, struct estat **sts)
 -.
static void ops___move_array (struct estat **array, int index, int len)
 Inline function to abstract a move.
int ops__allocate (int needed, struct estat **where, int *count)
 -.
int ops__free_entry (struct estat **sts_p)
 -.
int ops__delete_entry (struct estat *dir, struct estat *sts, int index_byinode, int index_byname)
 -.
int ops__free_marked (struct estat *dir, int fast_mode)
 -.
int ops__traverse (struct estat *current, char *fullpath, int flags, int sts_flags, struct estat **ret)
 -.
int ops__update_single_entry (struct estat *sts, struct sstat_t *output)
 -.
void ops___set_todo_bits (struct estat *sts)
 Set the estat::do_* bits, depending on the parent.
void ops__set_todo_bits (struct estat *sts)
 -.
int ops__update_filter_set_bits (struct estat *sts)
 -.
void ops__copy_single_entry (struct estat *src, struct estat *dest)
 -.
int ops__correlate_dirs (struct estat *dir_A, struct estat *dir_B, ops__correlate_fn1_t only_A, ops__correlate_fn2_t both, ops__correlate_fn1_t only_B, ops__correlate_fn2_t for_every)
 -.
int ops__read_special_entry (apr_file_t *a_stream, char **data, int max, ssize_t *real_len, char *filename, apr_pool_t *pool)
 -.
int ops__are_children_interesting (struct estat *dir)
 -.
int ops__apply_group (struct estat *sts, hash_t *props, apr_pool_t *pool)
 -.
int ops__make_shadow_entry (struct estat *sts, int flags)
 -.
void DEBUGP_dump_estat (struct estat *sts)
 -.

Variables

const char ops__dir_info_format_p []
 Formats for writing entries in the dir files.
const char link_spec [] = "link "
 -.
const char cdev_spec [] = "cdev"
const char bdev_spec [] = "bdev"
static struct free_estatfree_list = NULL

Detailed Description

Handling of single struct estat s.

Definition in file est_ops.c.


Define Documentation

#define WAA_MAX_DIR_INFO_CHARS
Value:
(11+1+8+1+8+1+8+1+APR_MD5_DIGESTSIZE*2+1 \
        +18+1+9+1+9+1+16+1+18+1+18+1+9+1+ \
        9+1+9+1+NAME_MAX+1+1)

Definition at line 57 of file est_ops.c.

Referenced by ops__save_1entry().


Function Documentation

void DEBUGP_dump_estat ( struct estat sts  ) 
char* ops___dev_to_string ( struct estat sts,
char  delimiter 
)

Definition at line 174 of file est_ops.c.

References bdev_spec, BUG_ON, cdev_spec, FS_NEW, sstat_t::mode, estat::name, sstat_t::rdev, estat::remote_status, and estat::st.

Referenced by ops__dev_to_filedata(), and ops__dev_to_waa_string().

Here is the caller graph for this function:

int ops___entries_to_write ( struct estat dir  ) 

Returns the number of entries to write into the entry list.

Must be called with a directory entry.

Definition at line 463 of file est_ops.c.

References estat::by_inode, estat::entry_count, and ops__should_entry_be_written_in_list().

Referenced by ops__save_1entry().

Here is the call graph for this function:

Here is the caller graph for this function:

static void ops___move_array ( struct estat **  array,
int  index,
int  len 
) [inline, static]

Inline function to abstract a move.

Definition at line 865 of file est_ops.c.

Referenced by ops__delete_entry().

Here is the caller graph for this function:

void ops___set_todo_bits ( struct estat sts  )  [inline]

Set the estat::do_* bits, depending on the parent.

Should not be called for the root.

Definition at line 1427 of file est_ops.c.

References estat::do_this_entry, estat::do_userselected, opt_recursive, and estat::parent.

Referenced by ops__are_children_interesting(), and ops__set_todo_bits().

Here is the caller graph for this function:

static const char* ops___split_fnpart ( const char *  path  )  [inline, static]

Returns the "rest" of the path; a \0 is written over the path separator.

So path="abc/def/ghi" becomes "abc\0def/ghi" and the returned * pointer points to "def/ghi".

If there's only a filename left (no / found), this returns NULL.

Definition at line 600 of file est_ops.c.

References PATH_SEPARATOR.

Referenced by ops__traverse().

Here is the caller graph for this function:

int ops__allocate ( int  needed,
struct estat **  where,
int *  count 
)

-.

This function returns blocks of (struct estat), possibly smaller than wanted by the caller.

The returned area is zeroed.

Definition at line 877 of file est_ops.c.

References BUG_ON, free_estat::count, DEBUGP, hlp__calloc(), free_estat::next, STOPIF, and VALGRIND_MAKE_MEM_DEFINED.

Referenced by cb__add_entry(), dir__enumerator(), ops__make_shadow_entry(), ops__traverse(), waa__copy_entries(), and waa__input_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__apply_group ( struct estat sts,
hash_t props,
apr_pool_t *  pool 
)

-.

Applies the defined group to the entry sts.

This means applying the target URL, and storing the auto-properties.

Optionally the property database can be returned in props.

Definition at line 1754 of file est_ops.c.

References grouping_t::auto_props, BUG_ON, DEBUGP, estat::flags, global_pool, ignore_t::group_def, ignore_t::group_name, HASH_REMEMBER_FILENAME, grouping_t::is_ignore, estat::match_pattern, estat::name, prp__open_byestat(), prp__set_from_aprhash(), RF_PUSHPROPS, STOPIF, STORE_IN_FS, estat::to_be_ignored, grouping_t::url, and estat::url.

Referenced by au__action(), ci___send_user_props(), ops__save_1entry(), and prp__s_work().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__are_children_interesting ( struct estat dir  ) 

-.

Determines whether child entries of this entry should be done, based on the recursive settings and dir's todo-bits.

Definition at line 1735 of file est_ops.c.

References estat::do_child_wanted, estat::do_this_entry, estat::do_userselected, ops___set_todo_bits(), and estat::parent.

Referenced by waa___check_dir_for_update(), waa__build_tree(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__build_path ( char **  value,
struct estat sts 
)

-.

Return the path of this entry.

This function uses a rotating array of cache_entry_t. This means that a few paths will be usable at once; if some path has to be stored for a (possibly indefinite) time it should be strdup()ed, or re-built upon need.

A LRU eviction scheme is used - with last one marked.

If some function modifies that memory, it should set the first char to \0, to signal that it's no longer valid for other users.

Todo:
A further optimization would be to check if a parent is already present, and append to that path. Similar for a neighbour entry.

The cache_entry_t::id member is used as a pointer to the struct estat.

Definition at line 696 of file est_ops.c.

References BUG, estat::cache_index, cch__add(), cch__set_active(), cache_entry_t::data, DEBUGP, cache_t::entries, cache_entry_t::id, cache_t::lru, cache_t::max, ops__build_path2(), ops__calc_path_len(), estat::path_len, and STOPIF.

Referenced by ac___up_set_paths(), cb___report_path_rev(), ci__action(), ci__nondir(), cm___get_base_source(), cm___match(), cm__find_file_source(), cs___update_manber(), cs__compare_file(), cs__new_manber_filter(), cs__read_manber_hashes(), DEBUGP_dump_estat(), df___diff_wc_remote(), df___direct_diff(), df___repos_repos(), df___type_def_diff(), df__do_diff(), ign___test_all_patterns(), ign___test_single_pattern(), ign__is_ignore(), log__work(), ops__link_to_string(), ops__update_single_entry(), prp__open_byestat(), prp__unlink_db_for_estat(), res__mark_conflict(), res__remove_aux_files(), rev___handle_dir_mtime(), rev___revert_to_base(), rev___undo_change(), rev__get_props(), rev__install_file(), rev__merge(), st__print_entry_info(), st__rm_status(), st__status(), sync___recurse(), sync__progress(), up__apply_textdelta(), up__close_directory(), up__parse_prop(), up__rmdir(), up__set_meta_data(), up__unlink(), url__other_full_url(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__build_path2 ( char *  path,
int  max,
struct estat sts 
)

The real recursive part of ops__build_path().

This function has a non-standard return parameter - it gives the number of characters written, and 0 denotes an error.

Definition at line 621 of file est_ops.c.

References estat::name, estat::parent, estat::path_len, and PATH_SEPARATOR.

Referenced by ops__build_path().

Here is the caller graph for this function:

int ops__calc_path_len ( struct estat sts  ) 

-.

Calculate the length of the path for this entry.

This function returns the number of characters needed. We don't return success or failure; there should never be a problem, and if we'd return 0 for success someone might put a STOPIF() in the recursive call below, which would double the size of this function :-)

We don't include the trailing \0, as that would be counted on each level.

Definition at line 660 of file est_ops.c.

References estat::name, ops__calc_path_len(), estat::parent, and estat::path_len.

Referenced by ops__build_path(), ops__calc_path_len(), and waa__output_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

void ops__copy_single_entry ( struct estat src,
struct estat dest 
)
int ops__correlate_dirs ( struct estat dir_A,
struct estat dir_B,
ops__correlate_fn1_t  only_A,
ops__correlate_fn2_t  both,
ops__correlate_fn1_t  only_B,
ops__correlate_fn2_t  for_every 
)

-.

The function to go through the lists.

only_A, both, and only_B are called, then for_every (if not NULL).

This builds and loops throught the sts::by_name lists, so modifying them must be done carefully, to change only the elements already processed.

Returning an error from any function stops the loop.

Definition at line 1572 of file est_ops.c.

References estat::by_name, DEBUGP, dir___f_sort_by_name(), dir__sortbyname(), estat::name, and STOPIF.

Referenced by cm___match_children(), waa__copy_entries(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__delete_entry ( struct estat dir,
struct estat sts,
int  index_byinode,
int  index_byname 
)

-.

Delete an entry by either index_byinode, or index_byname, or sts.

Only one the 3 specifications my be given; the other 2 values must be a NULL resp. UNKNOWN_INDEX.

If the entry is given via sts, but is not found, ENOENT is returned.

If an invalid index is given, we mark a BUG().

Todo:
Use a binary search in the by_inode and by_name arrays.

Definition at line 1067 of file est_ops.c.

References BUG_ON, estat::by_inode, estat::by_name, DEBUGP, estat::entry_count, sstat_t::mode, ops___move_array(), ops__free_entry(), estat::st, STOPIF, and UNKNOWN_INDEX.

Referenced by au__action().

Here is the call graph for this function:

Here is the caller graph for this function:

char* ops__dev_to_filedata ( struct estat sts  ) 

-.

See ops__dev_to_waa_string(), but uses a space character (\x20 ) for subversion compatibility.

Definition at line 207 of file est_ops.c.

References ops___dev_to_string().

Referenced by ci__nondir(), df___type_def_diff(), and up__apply_textdelta().

Here is the call graph for this function:

Here is the caller graph for this function:

char* ops__dev_to_waa_string ( struct estat sts  ) 

-.

Converts a device entry into a string suitable for storage in the WAA area (using a : separator).

Definition at line 199 of file est_ops.c.

References ops___dev_to_string().

Referenced by ops__save_1entry().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__find_entry_byinode ( struct estat dir,
dev_t  dev,
ino_t  inode,
struct estat **  sts 
)

-.

Find an entry in dir by the inode.

Definition at line 831 of file est_ops.c.

References BUG_ON, estat::by_inode, sstat_t::dev, dir___f_sort_by_inode(), dir__sortbyinode(), estat::entry_count, sstat_t::ino, sstat_t::mode, estat::st, and STOPIF.

Here is the call graph for this function:

int ops__find_entry_byname ( struct estat dir,
char *  name,
struct estat **  sts,
int  ignored_too 
)

-.

Find an entry in the dir by bname.

This function doesn't return ENOENT, if no entry is found; *sts will just be NULL.

Definition at line 787 of file est_ops.c.

References BUG_ON, estat::by_name, DEBUGP, dir___f_sort_by_nameCS(), dir__sortbyname(), estat::entry_count, filename, sstat_t::mode, ops__get_filename(), estat::st, STOPIF, and estat::to_be_ignored.

Referenced by cb___delete_entry(), cb__add_entry(), and ops__traverse().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__free_entry ( struct estat **  sts_p  ) 

-.

Frees the memory associated with this entry and all its children.

The pointer to the entry is set to NULL, to avoid re-using.

Definition at line 959 of file est_ops.c.

References BUG_ON, estat::by_inode, estat::by_name, free_estat::count, DEBUGP, estat::entry_count, IF_FREE, sstat_t::mode, free_estat::next, estat::old, ops__free_entry(), estat::st, STOPIF, estat::strings, VALGRIND_MAKE_MEM_DEFINED, and VALGRIND_MAKE_MEM_NOACCESS.

Referenced by ops__delete_entry(), ops__free_entry(), ops__free_marked(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__free_marked ( struct estat dir,
int  fast_mode 
)

-.

Frees all "marked" entries in the given directory at once.

An entry is marked by having estat::to_be_ignored set; and such entries are removed here.

If fast_mode is set, the entries are get removed from the list are not free()d, nor do the pointer arrays get resized.

Definition at line 1156 of file est_ops.c.

References BUG_ON, estat::by_inode, estat::by_name, estat::entry_count, hlp__realloc(), IF_FREE, sstat_t::mode, ops__free_entry(), estat::st, and STOPIF.

Referenced by rev___local_revert(), rev__do_changed(), and waa__build_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

char* ops__get_filename ( char *  path  ) 

-.

Returns the filename.

If no PATH_SEPARATOR is found in the path, the path itself is returned.

Definition at line 583 of file est_ops.c.

References PATH_SEPARATOR.

Referenced by cb__add_entry(), and ops__find_entry_byname().

Here is the caller graph for this function:

int ops__link_to_string ( struct estat sts,
char *  filename,
char **  erg 
)

-.

Reads a symlink and returns a pointer to its destination.

The subversion header string for special nodes is prepended.

The returned pointer in *erg must not be free()d.

Definition at line 141 of file est_ops.c.

References BUG_ON, cch__add(), link_spec, sstat_t::mode, ops__build_path(), sstat_t::size, estat::st, STOPIF, and STOPIF_CODE_ERR.

Referenced by ci__nondir(), cs__compare_file(), df___type_def_diff(), and up__apply_textdelta().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__load_1entry ( char **  mem_pos,
struct estat sts,
char **  filename,
ino_t *  parent_i 
)

-.

Fills sts from a buffer where.

The filename still points into the buffer (mmap()ed area) and must be copied.

mem_pos is advanced, and points after the \0. If a \n is seen immediately afterwards, it is skipped, too.

parent_i gets set to the stored value; the translation to a parent pointer must be done in the caller.

EOF cannot be reliable detected here; but we are guaranteed a \0\n at the end of the string, to have a filename termination.

Definition at line 331 of file est_ops.c.

References BUG_ON, cs__char2md5(), sstat_t::ctim, sstat_t::dev, estat::entry_count, estat::flags, sstat_t::gid, hlp__get_word(), hlp__skip_ws(), sstat_t::ino, estat::local_mode_packed, estat::md5, sstat_t::mode, MODE_T_to_PACKED, sstat_t::mtim, estat::new_rev_mode_packed, estat::old_rev, estat::old_rev_mode_packed, ops__string_to_dev(), estat::repos_rev, sstat_t::size, estat::st, STOPIF, sstat_t::uid, estat::url, url__find_by_intnum(), urllist, and urllist_count.

Referenced by waa__input_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__make_shadow_entry ( struct estat sts,
int  flags 
)

-.

Creates a copy of sts, and keeps it referenced by sts->old.

Definition at line 1806 of file est_ops.c.

References BUG_ON, estat::cache_index, FS_REMOVED, FS_REPLACED, estat::old, ops__allocate(), estat::remote_status, SHADOWED_BY_LOCAL, SHADOWED_BY_REMOTE, and STOPIF.

Referenced by cb__add_entry().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__new_entries ( struct estat dir,
int  count,
struct estat **  new_entries 
)

-.

Appends the array of count new_entries as children to dir.

The directory gets by_name removed; by_inode is extended and sorted.

Note:
If this gets called multiple times for the same directory, depending on the accesses in-between it might be possible to do the sorting only once.

Definition at line 755 of file est_ops.c.

References estat::by_inode, estat::by_name, estat::entry_count, hlp__realloc(), IF_FREE, STOPIF, and estat::to_be_sorted.

Referenced by cb__add_entry(), ops__traverse(), waa__copy_entries(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__read_special_entry ( apr_file_t *  a_stream,
char **  data,
int  max,
ssize_t *  real_len,
char *  filename,
apr_pool_t *  pool 
)

-.

Reads a file.

The specified stream gets rewound, read up to max bytes (sane default for 0), and returned (zero-terminated) in *buffer allocated in pool.

The real length can be seen via real_len.

If filename is given, the file is removed.

If pool is NULL, the space is malloc()ed and must be free()d by the caller.

Definition at line 1670 of file est_ops.c.

References DEBUGP, hlp__alloc(), STOPIF, and STOPIF_CODE_ERR.

Referenced by rev__install_file().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__save_1entry ( struct estat sts,
ino_t  parent_ino,
int  filehandle 
)

-.

Writes a textual description of the given sts to the filehandle.

The parameter parent_ino is a(n integer) reference to the parent directory - the line number in which it was written. The format is fixed (see ops__dir_info_format_p); the string includes a \0 for filename termination, and a \n at the end.

Any other characters that are allowed in a filename can be written - even control characters like \n, \r, \f and so on.

Definition at line 491 of file est_ops.c.

References BUG_ON, cs__md5tohex_buffered(), sstat_t::ctim, url_t::current_rev, DEBUGP, sstat_t::dev, estat::flags, sstat_t::gid, sstat_t::ino, url_t::internal_number, estat::match_pattern, estat::md5, sstat_t::mode, sstat_t::mtim, estat::name, ops___entries_to_write(), ops__apply_group(), ops__dev_to_waa_string(), ops__dir_info_format_p, estat::parent, estat::repos_rev, RF___SAVE_MASK, RF_ADD, RF_COPY_BASE, RF_COPY_SUB, SET_REVNUM, sstat_t::size, estat::st, STOPIF, STOPIF_CODE_ERR, sstat_t::uid, estat::url, and WAA_MAX_DIR_INFO_CHARS.

Referenced by waa__output_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

void ops__set_todo_bits ( struct estat sts  ) 

-.

Set the estat::do_userselected and estat::do_this_entry attributes depending on opt_recursive and the parent's bits.

Should not be called for the root.

Definition at line 1442 of file est_ops.c.

References DEBUGP, estat::do_filter_allows, estat::do_filter_allows_done, estat::do_this_entry, estat::do_userselected, ops___set_todo_bits(), and estat::parent.

Referenced by ops__update_filter_set_bits(), waa__build_tree(), and waa__update_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__stat_to_action ( struct estat sts,
struct sstat_t new 
)

-.

Compare the struct sstat_t , and set the entry_status.

Returns the change mask as a binary OR of the various FS_* constants, see fs_bits.

Definition at line 216 of file est_ops.c.

References BUG_ON, sstat_t::ctim, DEBUGP, estat::flags, FS_CHANGED, FS_LIKELY, FS_META_GROUP, FS_META_MTIME, FS_META_OWNER, FS_META_UMODE, FS_NO_CHANGE, FS_REPLACED, sstat_t::gid, sstat_t::mode, sstat_t::mtim, sstat_t::rdev, RF___IS_COPY, sstat_t::size, estat::st, st__status_string_fromint(), estat::to_be_ignored, and sstat_t::uid.

Referenced by ops__update_single_entry().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__string_to_dev ( struct estat sts,
char *  data,
char **  info 
)

-.

Converts a string describing a special node to the struct sstat_t data.

info, if not NULL, gets the pointer to the first character after the parsed text: For a symlink it is returned as the path it points to, devices are fully decoded and should a pointer to \0.

Definition at line 82 of file est_ops.c.

References bdev_spec, cdev_spec, link_spec, estat::local_mode_packed, sstat_t::mode, MODE_T_to_PACKED, sstat_t::rdev, estat::st, and STOPIF_CODE_ERR.

Referenced by ops__load_1entry(), sync___recurse(), and up__handle_special().

Here is the caller graph for this function:

int ops__traverse ( struct estat current,
char *  fullpath,
int  flags,
int  sts_flags,
struct estat **  ret 
)

-.

Create or find an entry below parent.

Does not modify path.

The flags parameter tells about the policy regarding tree walking.

For add, unversion we need to create the given path with the specified flags; in add it should exist, for unversion is needs not. For diff / info we only walk the tree without creating or checking for current status (info, repos/repos diff for removed files). For prop_set / prop_get / prop_list we need an existing path, which might be not versioned currently. For revert we need to look in the tree, and find removed entries, too. In waa__partial_update() (status check with given subtrees) we create the paths as necessary. If they do not exist we'd like to print them as removed.

So we need to know:

  • Create paths or walk only (OPS__CREATE)
  • Has the given path to exist? (OPS__FAIL_NOT_LIST)
    • Should we update this entry, or all below? (OPS__ON_UPD_LIST)
  • Which flags the newly created entries should get (in sts_flags)

Definition at line 1228 of file est_ops.c.

References BUG, BUG_ON, estat::entry_count, estat::flags, hlp__strdup(), IF_FREE, sstat_t::mode, estat::name, ops___split_fnpart(), ops__allocate(), OPS__CREATE, OPS__FAIL_NOT_LIST, ops__find_entry_byname(), ops__new_entries(), OPS__ON_UPD_LIST, estat::parent, RF_ISNEW, sstat_t::size, estat::st, STOPIF, STOPIF_CODE_ERR, and waa__insert_entry_block().

Referenced by cat__work(), cm___make_copy(), cm__uncopy(), hlp__match_path_envs(), log__work(), prp__s_work(), and waa__partial_update().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__update_filter_set_bits ( struct estat sts  ) 

-.

Wrapper for ops__update_single_entry and some more.

Calls ops__set_to_handle_bits() and maybe ops__update_single_entry(), and depending on the filter settings sts->do_this_entry might be cleared.

Definition at line 1467 of file est_ops.c.

References action, DEBUGP, estat::do_filter_allows, estat::do_this_entry, estat::entry_status, FS_REMOVED, FS_REPLACED, ops__calc_filter_bit(), ops__set_todo_bits(), ops__update_single_entry(), actionlist_t::overwrite_sts_st, estat::parent, estat::st, and STOPIF.

Referenced by waa__update_tree().

Here is the call graph for this function:

Here is the caller graph for this function:

int ops__update_single_entry ( struct estat sts,
struct sstat_t output 
)

-.

Does a lstat() on the given entry, and sets the entry_status.

The parent directory should already be done, so that removal of whole trees is done without doing unneeded lstat()s.

Depending on o_chcheck a file might be checked for changes by a MD5 comparision.

Per default only_check_status is not set, and the data from lstat() is written into sts. Some functions need the old values and can set this flag; then only entry_status is modified.

If output is not NULL, then it is overwritten, and sts->st is not changed - independent of only_check_status. In case of a removed entry *output is not changed.

Definition at line 1336 of file est_ops.c.

References action, CHCHECK_ALLFILES, CHCHECK_FILE, cs__compare_file(), DEBUGP, estat::entry_status, estat::flags, FS_CHANGED, FS_LIKELY, FS_REMOVED, hlp__lstat(), estat::local_mode_packed, sstat_t::mode, MODE_T_to_PACKED, ops__build_path(), ops__stat_to_action(), OPT__CHANGECHECK, actionlist_t::overwrite_sts_st, estat::parent, estat::st, and STOPIF.

Referenced by ops__update_filter_set_bits(), and waa__partial_update().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char bdev_spec[] = "bdev"

Definition at line 71 of file est_ops.c.

Referenced by ops___dev_to_string(), and ops__string_to_dev().

const char cdev_spec[] = "cdev"

Definition at line 70 of file est_ops.c.

Referenced by ops___dev_to_string(), and ops__string_to_dev().

struct free_estat* free_list = NULL [static]

Definition at line 73 of file est_ops.c.

const char link_spec[] = "link "

-.

Startstrings for links in the repository.

It's a bit unaesthetical that devices use a " " for the repository data, but a ":" in the waa as delimiter. But "link " is specified in subversion, and having the repository data different would not be better. So we just allow both at parsing, and use the "right" for each target.

Definition at line 69 of file est_ops.c.

Referenced by ops__link_to_string(), ops__string_to_dev(), and sync___recurse().

const char ops__dir_info_format_p[]
Initial value:
"%07llo %8x %8x %x %s %s "
"%lld %ld %u %lx %lld %lld %u "
"%u %u %s"

Formats for writing entries in the dir files.

mode ctime mtime repo_flags dev_descr MD5_should size repos_version url# dev# inode# parent_line# entry_count uid gid name\0\n Directories have an x instead of MD5_*.

Definition at line 54 of file est_ops.c.

Referenced by ops__save_1entry().


Generated for fsvs by  doxygen 1.6.1