From qx@shire.math.columbia.edu Fri Mar 12 10:10:32 1993
Return-Path: <qx@shire.math.columbia.edu>
Date: Fri, 12 Mar 93 10:16:57 -0500
From: qx@shire.math.columbia.edu (Qi Xia)
To: ftp-linux@tsx-11.MIT.EDU, ftpkeeper@sunsite.unc.edu
Subject: xiafs-0.7.3


Please put this article in linux/.../xiafs/xiafs-0.7pl3
Thank you.

Ignore this post if you do not have xiafs running before Linux-0.99.7.

The xiafs will be part of Linus' next official kernel release (0.99.7).
There are some changes in xiafs since xiafs 0.7.2. For those of you who
have existing xiafs on your disk and want to upgrade to 0.99.7 or above,
please apply following patch to linux-0.99.6/xiafs-0.7.2 or early version.
You will not notice any change between 0.7.2 and 0.7.3; the mkxfs and
xfsck you have still works.

After you upgrade to linux-0.99.7, linux-0.99.7 will modify your
xiafs partition. linux-0.99.6/xiafs-0.7.2 or earlier version will not work 
any more. But, linux-0.99.6/xiafs-0.7.3 will work happyly.

Occasionally, you may want to use old kernel. If this is the case.
upgrade to  xiafs-0.7.3 before upgrade to xiafs within Linux 0.99.7.

To upgrade to xiafs-0.7.3, move following to xiafs directory,
and apply the patch.

Frank Xia. 
March 12, 1993

-------[xiafs-0.7pl3]--------------------------------------------
*** inode.c.org	Wed Mar 10 17:00:38 1993
--- inode.c	Wed Mar 10 18:17:51 1993
***************
*** 374,382 ****
          inode->i_rdev = raw_inode->i_zone[0];
      else {
          for (zone = 0; zone < 8; zone++)
! 	    inode->u.xfs_i.i_zone[zone] = raw_inode->i_zone[zone];
! 	inode->u.xfs_i.i_ind_zone = raw_inode->i_ind_zone;
! 	inode->u.xfs_i.i_dind_zone = raw_inode->i_dind_zone;
      }
      brelse(bh);
      if (S_ISREG(inode->i_mode))
--- 374,382 ----
          inode->i_rdev = raw_inode->i_zone[0];
      else {
          for (zone = 0; zone < 8; zone++)
! 	    inode->u.xfs_i.i_zone[zone] = raw_inode->i_zone[zone] & 0xffffff;
! 	inode->u.xfs_i.i_ind_zone       = raw_inode->i_ind_zone   & 0xffffff;
! 	inode->u.xfs_i.i_dind_zone      = raw_inode->i_dind_zone  & 0xffffff;
      }
      brelse(bh);
      if (S_ISREG(inode->i_mode))
***************
*** 438,446 ****
          raw_inode->i_zone[0] = inode->i_rdev;
      else {
          for (zone = 0; zone < 8; zone++)
! 	    raw_inode->i_zone[zone] = inode->u.xfs_i.i_zone[zone];
! 	raw_inode->i_ind_zone = inode->u.xfs_i.i_ind_zone;
! 	raw_inode->i_dind_zone = inode->u.xfs_i.i_dind_zone;
      }
      inode->i_dirt=0;
      bh->b_dirt=1;
--- 438,449 ----
          raw_inode->i_zone[0] = inode->i_rdev;
      else {
          for (zone = 0; zone < 8; zone++)
! 	    raw_inode->i_zone[zone] = (raw_inode->i_zone[zone] & 0xff000000) 
! 	                             | (inode->u.xfs_i.i_zone[zone] & 0xffffff);
! 	raw_inode->i_ind_zone = (raw_inode->i_ind_zone & 0xff000000)
! 	                             | (inode->u.xfs_i.i_ind_zone   & 0xffffff);
! 	raw_inode->i_dind_zone = (raw_inode->i_dind_zone & 0xff000000)
! 	                             | (inode->u.xfs_i.i_dind_zone  & 0xffffff);
      }
      inode->i_dirt=0;
      bh->b_dirt=1;










