From a981f2023b9f083e63b0cf4b600ab7d123b9c295 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Sun, 19 Aug 2001 09:59:52 +0000 Subject: [PATCH] document things changed so far. --- doc/CHANGES | 6 ++++++ libxfs/util.c | 15 +++++++++------ logprint/log_misc.c | 41 +++++++++++++++++++++++++++++++++++++++-- mkfs/proto.c | 19 ++++++++----------- 4 files changed, 62 insertions(+), 19 deletions(-) diff --git a/doc/CHANGES b/doc/CHANGES index 7fcc1bef1..b9fce5926 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,9 @@ +xfsprogs-current + - fix logprint bug in reporting extended attributes + (thanks to Tang Lingbo for fixing this) + - fix mkfs.xfs core dump when attemping to run on devices + which are too small to hold a valid XFS filesystem + xfsprogs-1.3.5 (13 August 2001) - fix bug in xfs_db bit handling on big endian platforms - fix mkfs bug related to too-small final allocation group diff --git a/libxfs/util.c b/libxfs/util.c index 74da15776..92ca72ef2 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -61,9 +61,9 @@ libxfs_inode_alloc( ialloc_context = (xfs_buf_t *)0; error = libxfs_ialloc(*tp, pip, mode, nlink, rdev, cr, (xfs_prid_t) 0, 1, &ialloc_context, &call_again, &ip); - if (error) { + if (error) return error; - } + if (call_again) { xfs_trans_bhold(*tp, ialloc_context); ntp = xfs_trans_dup(*tp); @@ -78,12 +78,15 @@ libxfs_inode_alloc( error = libxfs_ialloc(*tp, pip, mode, nlink, rdev, cr, (xfs_prid_t) 0, 1, &ialloc_context, &call_again, &ip); - if (error) { + if (!ip) + error = ENOSPC; + if (error) return error; - } } + if (!ip) + error = ENOSPC; + *ipp = ip; - ASSERT(ip); return error; } @@ -696,7 +699,7 @@ libxfs_da_read_bufr( xfs_trans_t *trans, xfs_inode_t *dp, xfs_dablk_t bno, - xfs_daddr_t mappedbno, + xfs_daddr_t mappedbno, xfs_dabuf_t **bpp, int whichfork) { diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 76d492aa4..f98afa43b 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -687,7 +687,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops) *ptr += sizeof(xfs_dinode_core_t); if (*i == num_ops-1 && f->ilf_size == 3) { - return 1; + return 1; } /* does anything come next */ @@ -724,8 +724,45 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops) xlog_print_dir_sf((xfs_dir_shortform_t*)*ptr, size); } *ptr += INT_GET(op_head->oh_len, ARCH_CONVERT); - if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) + if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) { + return 1; + } + break; + } + case XFS_ILOG_AEXT: { + ASSERT(f->ilf_size == 3); + (*i)++; + xlog_print_op_header(op_head, *i, ptr); + printf("EXTENTS inode attr\n"); + *ptr += INT_GET(op_head->oh_len, ARCH_CONVERT); + if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) { + return 1; + } + break; + } + case XFS_ILOG_ABROOT: { + ASSERT(f->ilf_size == 3); + (*i)++; + xlog_print_op_header(op_head, *i, ptr); + printf("BTREE inode attr\n"); + *ptr += INT_GET(op_head->oh_len, ARCH_CONVERT); + if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) { + return 1; + } + break; + } + case XFS_ILOG_ADATA: { + ASSERT(f->ilf_size == 3); + (*i)++; + xlog_print_op_header(op_head, *i, ptr); + printf("LOCAL inode attr\n"); + if (mode == IFDIR) { + xlog_print_dir_sf((xfs_dir_shortform_t*)*ptr, size); + } + *ptr += INT_GET(op_head->oh_len, ARCH_CONVERT); + if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) { return 1; + } break; } case XFS_ILOG_DEV: { diff --git a/mkfs/proto.c b/mkfs/proto.c index 409557f31..503fc81b2 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -113,11 +113,17 @@ fail( char *msg, int i) { - fprintf(stderr, "%s: %s %d\n", progname, msg, i); - ASSERT(0); + fprintf(stderr, "%s: %s [%d - %s]\n", progname, msg, i, strerror(i)); exit(1); } +void +res_failed( + int i) +{ + fail("cannot reserve space", i); +} + static void getres( xfs_trans_t *tp, @@ -746,15 +752,6 @@ rtinit( } } -void -res_failed( - int err) -{ - fprintf(stderr, "%s: ran out of disk space!\n", progname); - ASSERT(0); - exit(1); -} - static long filesize( int fd) -- 2.47.2