CVS log for xfs-cmds/xfsdump/restore/tree.c

[BACK] Up to [Development] / xfs-cmds / xfsdump / restore

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Wed May 24 06:08:55 2006 UTC (11 years, 4 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.30: +1 -1 lines
Diff to previous 1.30 (unified)

Update xfsdump build to use xfs.h instead of libxfs.h, fixing a recent namespace collision on list symbols.
Merge of master-melb:xfs-cmds:26007a by kenmcd.

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 1 14:51:59 2006 UTC (11 years, 5 months ago) by wkendall
Branch: MAIN
Changes since 1.29: +1 -91 lines
Diff to previous 1.29 (unified)

Another approach to restoring the immutable flag at the correct
time. Also addresses some inefficiencies in restoring metadata
on files dumped in multiple extent groups and files with
extended attributes.
Back out changes that required the dirattr routines to be used for
restoring the immutable flag on regular files which had extended
attributes.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Feb 7 16:00:26 2006 UTC (11 years, 8 months ago) by wkendall
Branch: MAIN
Changes since 1.28: +3 -11 lines
Diff to previous 1.28 (unified)

Merge in some changes from the IRIX tree. A few minor bug
fixes, but mainly whitespace changes and code reorganization
to line up with IRIX.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 31 15:47:31 2006 UTC (11 years, 8 months ago) by wkendall
Branch: MAIN
Changes since 1.27: +25 -13 lines
Diff to previous 1.27 (unified)

This mod adds a number of optimizations to increase the
performance of xfsdump and xfsrestore, especially on filesystems
with millions of inodes. Many small changes were made to
minimize the number of system calls required per inode.
Significant changes to xfsdump:
- Cache the gen number of each inode during the initial inode
  scan so that a bulkstat single does not need to be done for
  each inode when dumping directories.
- No longer retrieve the DMF attribute when estimating the dump
  size of a file. Use information from the bulkstat instead.
- Retrieve DMF attribute by handle instead of doing
  open/attr_getf/close.
- In determining where to split multi-stream dumps, take into
  consideration the number of files and not just the file size.
  This allows filesystems with large amounts of inodes but
  relatively little data (DMF filesystem) to be split correctly.
Significant changes to xfsrestore:
- Buffer writes to the namreg file to eliminate 2 very small
  write system calls per directory entry.
- Buffer writes to dirattr file to eliminate a small write system
  call per directory.
- Speedup the check to see if a particular window of the tree
  file is mapped. This allows xfsrestore to use more, smaller
  windows which is beneficial if we can't fit them all in memory
  and have to start unmapping them. This also makes the -w
  option obsolete so that option now has no effect.
- Change the hash function to give a better distribution among
  the hash buckets.
- Do not make an unnecessary unlink call if the file being
  restored does not already exist.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 29 21:27:26 2005 UTC (11 years, 10 months ago) by wkendall
Branch: MAIN
Changes since 1.26: +96 -4 lines
Diff to previous 1.26 (unified)

Change xfsrestore to set various inode flags at the appropriate
time, as some need to be set before restoring data and others
after restoring data and/or extended attributes. To facilitate
this, enable partial file restoration checking even when
restoring from only one stream, and make use of the dirattr
routines for restoring the immutable flag on files that have
extended attributes.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Nov 10 23:03:17 2005 UTC (11 years, 11 months ago) by wkendall
Branch: MAIN
Changes since 1.25: +22 -36 lines
Diff to previous 1.25 (unified)

Add support for dumping and restoring project ids for regular files
and directories. This is done in a backwards compatible way --
restores from old IRIX dumps will restore the correct project id,
and restores from old Linux dumps will restore a 0 for the project
id.

Fix a bug on IRIX where the first two bytes of bs_pad1 in a bstat_t
were not being zeroed before being dumped. Document this fact since
it might affect the ability to use them in the future.

xfsrestore on IRIX was not restoring any extended inode flags for
directories. This is now fixed. Change setdirattr() to do only one
path_to_handle/open_by_handle sequence when restoring directory
attributes. Previously this was being done twice on Linux -- once
for setting the DMAPI event mask and once for the extended inode
flags.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 10 22:05:47 2005 UTC (11 years, 11 months ago) by wkendall
Branch: MAIN
Changes since 1.24: +0 -7 lines
Diff to previous 1.24 (unified)

Change xfsdump and xfsrestore to unconditionally compile support for
extended attributes and DMAPI event flags.

Noticed some code which would revert to an old media format if the
user requested that extended attributes not be dumped. The intention
being to make the dumps compatible with old xfsrestores (really old
now). But using the old media format means that holes will not be
efficiently encoded in the dump. So I'm removing this code so that
we always dump in the current media format.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 9 05:04:17 2005 UTC (11 years, 11 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.23: +14 -28 lines
Diff to previous 1.23 (unified)

Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24334a by kenmcd.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jun 3 15:12:00 2005 UTC (12 years, 4 months ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.22: +3 -0 lines
Diff to previous 1.22 (unified)

get rid of stat64_to_xfsbstat
Merge of master-melb:xfs-cmds:22817a by kenmcd.

  add comment about gen# of root inode.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 9 19:21:00 2005 UTC (12 years, 8 months ago) by wkendall
Branch: MAIN
Changes since 1.21: +16 -2 lines
Diff to previous 1.21 (unified)

Fix a couple of spots in xfsrestore where XFS-specific calls were
being made without first checking to see if the filesystem being
restored is XFS.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 15 19:42:58 2004 UTC (13 years, 6 months ago) by wkendall
Branch: MAIN
Changes since 1.20: +6 -20 lines
Diff to previous 1.20 (unified)

- Fix file descriptor leak in path_to_fshandle. It now caches
one descriptor per filesystem.
- In xfsrestore, always allocate a fs handle during content_init.
This allows us to not have to call path_to_fshandle before attempting
every open_by_handle.
- Change open_by_fshandle to open_by_handle is cases where we are
passing a file handle (instead of a fshandle).
Always allocate a fshandle during content_init rather than calling
path_to_fshandle before each open_by_handle. Change path_to_fshandle
to path_to_handle in cases where we are actually passing a file handle.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Feb 13 19:12:27 2004 UTC (13 years, 8 months ago) by alkirkco
Branch: MAIN
Changes since 1.19: +18 -6 lines
Diff to previous 1.19 (unified)

Some of the libhandle routines were not clear whether they were working
on fshandles or file handles.  This mod renames open_by_handle() to
open_by_fshandle() and updates any calling applications to now call
open_by_fshandle() instead.  A new open_by_handle() has been created.

path_to_fshandle() was trying to maintain a hash of fshandles but the
hash was only storing a max of 2 fshandles at a time.  This has been
fixed so the hash can hold multiple fs handles.
call open_by_fshandle() rather than open_by_handle(), but first
use path_to_fshandle() to make sure the fshandle is in the hash.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jan 5 17:08:20 2004 UTC (13 years, 9 months ago) by alkirkco
Branch: MAIN
Changes since 1.18: +43 -4 lines
Diff to previous 1.18 (unified)

Add support to properly dump and restore the new inode flags:
immutable, append, sync, noatime and nodump.  Add all inode
flags, new and old, to the list defined in _mk_fillconfig_ea()
of cmd/xfstests/common.dump.  Test 063 can be used to verify
the proper backup and restore of these flags.  Also update man
pages to 1) remove reference to miniroot (IRIX-only), 2) document
the new XFS_XFLAG_NODUMP inode flag as the preferred method to
exclude files, and 3) better describe how the media inventory
files can be used.

The code for the inode flags was contributed by Ethan Benson,
with copyright assignment obtained by Nathan Scott.
Add code to restore xflags from an inode.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Apr 29 01:52:34 2003 UTC (14 years, 5 months ago) by nathans
Branch: MAIN
CVS Tags: XFS-1_3_0pre1
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (unified)

Fix includes to not be relative to paths provided by -I directives, for
the xfsprogs and xfsdump builds.  At this stage still provide these gcc
options in the build but later that can be removed too now that headers
are clean.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Dec 19 22:44:59 2002 UTC (14 years, 10 months ago) by nathans
Branch: MAIN
Changes since 1.16: +124 -123 lines
Diff to previous 1.16 (unified)

I18N support for xfsdump package.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 4 23:07:56 2002 UTC (15 years, 4 months ago) by sandeen
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (unified)

Update copyright dates (again)

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 4 22:53:09 2002 UTC (15 years, 4 months ago) by sandeen
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (unified)

Undoes mod:     xfs-cmds:slinx:120772a
Undo xfs-cmds:slinx:120772a, inadvertently whacked a previous mod.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 4 17:58:21 2002 UTC (15 years, 4 months ago) by sandeen
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (unified)

Update copyright dates

Revision 1.13 / (download) - annotate - [select for diffs], Mon Feb 18 01:29:49 2002 UTC (15 years, 8 months ago) by ivanr
Branch: MAIN
Changes since 1.12: +3 -0 lines
Diff to previous 1.12 (unified)

avoid assertion failure for cumulative restores with -B option

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 16 08:12:04 2002 UTC (15 years, 9 months ago) by tes
Branch: MAIN
Changes since 1.11: +40 -1 lines
Diff to previous 1.11 (unified)

Add explanatory comments for tree postprocessing functions.
Fix noref_elim_recurse() to remove non-dirs which are
really deleted and not just renamed. See pv#844219.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 14 01:47:07 2001 UTC (15 years, 10 months ago) by ivanr
Branch: MAIN
Changes since 1.10: +11 -1 lines
Diff to previous 1.10 (unified)

add xfsrestore -B option

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 13 09:23:07 2001 UTC (15 years, 10 months ago) by tes
Branch: MAIN
Changes since 1.9: +125 -35 lines
Diff to previous 1.9 (unified)

- add n_sibprevh - previous sibling ptr - for fast deletes [optimisation]
- update nodesz for prev ptr field
- add padding as struct will be implictly rounded to
  8 byte boundary - this makes it clearer
- in tree_init(), test for Node allocation failing
- in tree_begindir(), test for Node allocation failing
- in tree_addent(), test for Node allocation failing
- in tree_cb_links(),
    -> if callback function fails then return RV_NOTOK
    -> if Node allocation fails then return RV_ERROR
- in Node_alloc
    -> test for node_alloc() failure instead of asserting it
    -> init our new previous sibling ptr
- in Node_free
    -> reset our new previous sibling ptr
- in adopt()
    -> need to update the previous sibling ptr
       when child added to front of list
       (assuming a child previously exists)
- in disown() - the child deletion function
    -> can use previous sibling pointer instead of
       requiring a while loop to find the previous
       sibling
- add some diagnostics to link_in
- add some diagnostics to hash_find

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 28 07:30:43 2001 UTC (15 years, 10 months ago) by tes
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (unified)

Fix code where it looked up the hardlink to then mark it as 
referenced but after finding the hardlink didn't bother to use it,
just used the start of the hard link list for that inode.
This looks to have been a cut'n'paste mistake.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 10 05:21:03 2001 UTC (15 years, 11 months ago) by tes
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (unified)

Allow name to be up to 255 chars instead of 254.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 8 06:55:49 2001 UTC (16 years ago) by ajag
Branch: MAIN
Changes since 1.6: +2 -0 lines
Diff to previous 1.6 (unified)

wrap previously missed call to exit()

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jul 19 19:26:28 2001 UTC (16 years, 3 months ago) by roehrich
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (unified)

Turn on the dmapi stuff.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jul 19 01:00:14 2001 UTC (16 years, 3 months ago) by nathans
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (unified)

port to Linux.

Revision 1.4 / (download) - annotate - [select for diffs], Tue May 15 04:05:35 2001 UTC (16 years, 5 months ago) by tes
Branch: MAIN
CVS Tags: Linux-2_4_5-merge
Changes since 1.3: +7 -7 lines
Diff to previous 1.3 (unified)

Make chown come before chmod so that suid and guid bits are not cleared
when restoring directories.

Revision 1.3 / (download) - annotate - [select for diffs], Mon May 7 02:34:50 2001 UTC (16 years, 5 months ago) by nathans
Branch: MAIN
Changes since 1.2: +6 -6 lines
Diff to previous 1.2 (unified)

fix precedence problems picked up by -Wall.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Apr 9 06:32:28 2001 UTC (16 years, 6 months ago) by nathans
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (unified)

ensure parameter types match fprintf type directives for both
32 and 64 bit machines.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jan 15 04:06:20 2001 UTC (16 years, 9 months ago) by nathans
Branch: MAIN
CVS Tags: Release-1_0_0

cmd/xfs/dump/restore/tree.c 1.9 Renamed to cmd/xfsdump/restore/tree.c

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>