xfs
[Top] [All Lists]

error in xfs_logprint?

To: linux-xfs@xxxxxxxxxxx
Subject: error in xfs_logprint?
From: Tang Lingbo <tanglb@xxxxxxxx>
Date: Wed, 15 Aug 2001 23:06:52 +0800
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi,

There was a core dump in xfs_logprint when I did as follows:

1)$ dd if=/dev/zero of=/tmp/xfs bs=1024 count=50000
2)$ mkfs.xfs /tmp/xfs
3)$ mount -t xfs -o loop /tmp/xfs /xfs
4)$ touch /xfs/test
5)$ for((i=0;i<1024;i++));do echo -n 1 >> /tmp/dummy;done
6)$ value=`cat /tmp/dummy`;attr -s test -V $value /xfs/test
7)$ xfs_logprint /tmp/xfs

output:

...
xlog_print_trans_inode: illegal inode type

And I think the patch will be as follows:

--- logprint/log_misc.c Wed Aug 15 22:57:18 2001
+++ logprint/log_misc.c.new     Wed Aug 15 23:00:14 2001
@@ -714,6 +714,41 @@
            printf("UUID inode: no extra region\n");
            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 0: {
            ASSERT(f->ilf_size == 2);
            break;


Any comments?

Best regards,
Tang Lingbo
______________________________________

===================================================================
ÐÂÀËÃâ·Ñµç×ÓÓÊÏä (http://mail.sina.com.cn)
¶©ÔÄÊÖ»ú¶ÌÐÅÍ·ÌõÐÂÎÅ£¬ÌìÌì½±¶à¿îʱÉÐÊÖ»ú£¡ 
(http://dailynews.sina.com.cn/c/272235.html)
ÏëÈÃ100ÍòÄ°ÉúÈËͬʱ°®ÉÏÄãô?À´ÕÒÎÒ°É! (http://cheese.sina.com.cn)


<Prev in Thread] Current Thread [Next in Thread>