1/*
2 * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
3 *
4 * The soft updates code is derived from the appendix of a University
5 * of Michigan technical report (Gregory R. Ganger and Yale N. Patt,
6 * "Soft Updates: A Solution to the Metadata Update Problem in File
7 * Systems", CSE-TR-254-95, August 1995).
8 *
--- 22 unchanged lines hidden (view full) ---
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)softdep.h 9.7 (McKusick) 6/21/00
39 * $FreeBSD: head/sys/ufs/ffs/softdep.h 62976 2000-07-11 22:07:57Z mckusick $
40 */
41
42#include <sys/queue.h>
43
44/*
45 * Allocation dependencies are handled with undo/redo on the in-memory
46 * copy of the data. A particular data dependency is eliminated when
47 * it is ALLCOMPLETE: that is ATTACHED, DEPCOMPLETE, and COMPLETE.
--- 29 unchanged lines hidden (view full) ---
77 * DIRCHG flag marks a diradd structure as representing the changing
78 * of an existing entry rather than the addition of a new one. When
79 * the update is complete the dirrem associated with the inode for
80 * the old name must be added to the worklist to do the necessary
81 * reference count decrement. The GOINGAWAY flag indicates that the
82 * data structure is frozen from further change until its dependencies
83 * have been completed and its resources freed after which it will be
84 * discarded. The IOSTARTED flag prevents multiple calls to the I/O
85 * start routine from doing multiple rollbacks. The ONWORKLIST flag
86 * shows whether the structure is currently linked onto a worklist.
87 */
88#define ATTACHED 0x0001
89#define UNDONE 0x0002
90#define COMPLETE 0x0004
91#define DEPCOMPLETE 0x0008
92#define MKDIR_PARENT 0x0010
93#define MKDIR_BODY 0x0020
94#define RMDIR 0x0040
95#define DIRCHG 0x0080
96#define GOINGAWAY 0x0100
97#define IOSTARTED 0x0200
98#define ONWORKLIST 0x8000
99
100#define ALLCOMPLETE (ATTACHED | COMPLETE | DEPCOMPLETE)
101
102/*
103 * The workitem queue.
104 *
105 * It is sometimes useful and/or necessary to clean up certain dependencies
--- 426 unchanged lines hidden ---
2 * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
3 *
4 * The soft updates code is derived from the appendix of a University
5 * of Michigan technical report (Gregory R. Ganger and Yale N. Patt,
6 * "Soft Updates: A Solution to the Metadata Update Problem in File
7 * Systems", CSE-TR-254-95, August 1995).
8 *
--- 22 unchanged lines hidden (view full) ---
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)softdep.h 9.7 (McKusick) 6/21/00
39 * $FreeBSD: head/sys/ufs/ffs/softdep.h 62976 2000-07-11 22:07:57Z mckusick $
40 */
41
42#include <sys/queue.h>
43
44/*
45 * Allocation dependencies are handled with undo/redo on the in-memory
46 * copy of the data. A particular data dependency is eliminated when
47 * it is ALLCOMPLETE: that is ATTACHED, DEPCOMPLETE, and COMPLETE.
--- 29 unchanged lines hidden (view full) ---
77 * DIRCHG flag marks a diradd structure as representing the changing
78 * of an existing entry rather than the addition of a new one. When
79 * the update is complete the dirrem associated with the inode for
80 * the old name must be added to the worklist to do the necessary
81 * reference count decrement. The GOINGAWAY flag indicates that the
82 * data structure is frozen from further change until its dependencies
83 * have been completed and its resources freed after which it will be
84 * discarded. The IOSTARTED flag prevents multiple calls to the I/O
85 * start routine from doing multiple rollbacks. The ONWORKLIST flag
86 * shows whether the structure is currently linked onto a worklist.
87 */
88#define ATTACHED 0x0001
89#define UNDONE 0x0002
90#define COMPLETE 0x0004
91#define DEPCOMPLETE 0x0008
92#define MKDIR_PARENT 0x0010
93#define MKDIR_BODY 0x0020
94#define RMDIR 0x0040
95#define DIRCHG 0x0080
96#define GOINGAWAY 0x0100
97#define IOSTARTED 0x0200
98#define ONWORKLIST 0x8000
99
100#define ALLCOMPLETE (ATTACHED | COMPLETE | DEPCOMPLETE)
101
102/*
103 * The workitem queue.
104 *
105 * It is sometimes useful and/or necessary to clean up certain dependencies
--- 426 unchanged lines hidden ---