12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FSTRANS (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> FSTRANS (9)<strong>NAME</strong>fstrans, fstrans_setstate, fstrans_getstate, fstrans_start,fstrans_start_nowait, fstrans_done, fstrans_is_owner, fscow_establish,fscow_disestablish, fscow_run —file system suspension helper subsystemSYNOPSIS#include #include intfstrans_setstate(struct mount ∗mp , enum fstrans_state new_state);enum fstrans_statefstrans_getstate(struct mount ∗mp);voidfstrans_start(struct mount ∗mp , enum fstrans_lock_type lock_type);intfstrans_start_nowait(struct mount ∗mp , enum fstrans_lock_type lock_type);voidfstrans_done(struct mount ∗mp);intfstrans_is_owner(struct mount ∗mp);intfscow_establish(struct mount ∗mp , int (∗func)(void ∗, struct buf ∗, bool) ,void ∗cookie);intfscow_disestablish(struct mount ∗mp ,int (∗func)(void ∗, struct buf ∗, bool) , void ∗cookie);intfscow_run(struct buf ∗bp , bool data_valid);DESCRIPTIONThe fstrans subsystem is a set of operations to assist file system suspension. These operations must notbe used outside of file systems.File systems supporting this subsystem must set the flag IMNT_HAS_TRANS in mnt_iflag.File systems are always in one of these states:FSTRANS_NORMAL normal operations.FSTRANS_SUSPENDING preparing a suspension.FSTRANS_SUSPENDED suspended.This state is represented by enum fstrans_state.fstrans_getstate(mp)returns the current state of the file system mp.fstrans_setstate(mp , new_state)changes the state of the file system mp to new_state.All file system operations use a fstrans lock. This lock is recursive. A thread already owning a lock willalways get another lock. The lock has two variants:<strong>NetBSD</strong> 3.0 December 2, 2007 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!