+xfsprogs-current
+ - fix logprint bug in reporting extended attributes
+ (thanks to Tang Lingbo <tanglb@sina.com> 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
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);
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;
}
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)
{
*ptr += sizeof(xfs_dinode_core_t);
if (*i == num_ops-1 && f->ilf_size == 3) {
- return 1;
+ return 1;
}
/* does anything come next */
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: {
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,
}
}
-void
-res_failed(
- int err)
-{
- fprintf(stderr, "%s: ran out of disk space!\n", progname);
- ASSERT(0);
- exit(1);
-}
-
static long
filesize(
int fd)