Deleted Added
full compact
ffs_softdep.c (58349) ffs_softdep.c (58934)
1/*
2 * Copyright 1998 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 *

--- 39 unchanged lines hidden (view full) ---

48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 *
55 * from: @(#)ffs_softdep.c 9.56 (McKusick) 1/17/00
1/*
2 * Copyright 1998 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 *

--- 39 unchanged lines hidden (view full) ---

48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 *
55 * from: @(#)ffs_softdep.c 9.56 (McKusick) 1/17/00
56 * $FreeBSD: head/sys/ufs/ffs/ffs_softdep.c 58349 2000-03-20 11:29:10Z phk $
56 * $FreeBSD: head/sys/ufs/ffs/ffs_softdep.c 58934 2000-04-02 15:24:56Z phk $
57 */
58
59/*
60 * For now we want the safety net that the DIAGNOSTIC and DEBUG flags provide.
61 */
62#ifndef DIAGNOSTIC
63#define DIAGNOSTIC
64#endif

--- 4597 unchanged lines hidden (view full) ---

4662 * contains dependencies. This should only happen if an I/O error has
4663 * occurred. The routine is called with the buffer locked.
4664 */
4665static void
4666softdep_deallocate_dependencies(bp)
4667 struct buf *bp;
4668{
4669
57 */
58
59/*
60 * For now we want the safety net that the DIAGNOSTIC and DEBUG flags provide.
61 */
62#ifndef DIAGNOSTIC
63#define DIAGNOSTIC
64#endif

--- 4597 unchanged lines hidden (view full) ---

4662 * contains dependencies. This should only happen if an I/O error has
4663 * occurred. The routine is called with the buffer locked.
4664 */
4665static void
4666softdep_deallocate_dependencies(bp)
4667 struct buf *bp;
4668{
4669
4670 if ((bp->b_flags & B_ERROR) == 0)
4670 if ((bp->b_ioflags & BIO_ERROR) == 0)
4671 panic("softdep_deallocate_dependencies: dangling deps");
4672 softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error);
4673 panic("softdep_deallocate_dependencies: unrecovered I/O error");
4674}
4675
4676/*
4677 * Function to handle asynchronous write errors in the filesystem.
4678 */
4679void
4680softdep_error(func, error)
4681 char *func;
4682 int error;
4683{
4684
4685 /* XXX should do something better! */
4686 printf("%s: got error %d while accessing filesystem\n", func, error);
4687}
4671 panic("softdep_deallocate_dependencies: dangling deps");
4672 softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error);
4673 panic("softdep_deallocate_dependencies: unrecovered I/O error");
4674}
4675
4676/*
4677 * Function to handle asynchronous write errors in the filesystem.
4678 */
4679void
4680softdep_error(func, error)
4681 char *func;
4682 int error;
4683{
4684
4685 /* XXX should do something better! */
4686 printf("%s: got error %d while accessing filesystem\n", func, error);
4687}