xfs
[Top] [All Lists]

Re: SGI XFS on alpha

To: linux-xfs@xxxxxxxxxxx
Subject: Re: SGI XFS on alpha
From: Thomas Graichen <news-innominate.list.sgi.xfs@xxxxxxxxxxxxx>
Date: 5 Aug 2000 07:47:19 GMT
Distribution: local
Organization: innominate AG, Berlin, Germany
References: <news-innominate.list.sgi.xfs@xxxxxxxxxxxxx> <200008041857.NAA21911@xxxxxxxxxxxxxxxxxxxx>
Reply-to: Thomas Graichen <graichen@xxxxxxxxxxxxx>
Reply-to: thomas.graichen@xxxxxxxxxxxxx
Sender: owner-linux-xfs-announce@xxxxxxxxxxx
User-agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-local (i586))
Steve Lord <lord@xxxxxxx> wrote:

> You missed out the diffs!

oh yes - i seem to have forgotten them - they are at the end of
this mail now ...

> I just hit a corruption problem myself, on the i386, this may be
> something to do with moving up to test5 - and may or may not be 
> the same problem you hit. If I get that out of the way then we
> can establish if you are seeing the same issue or not. Did you
> select KIOBUF based I/O in the configuration options - this only
> affects SCSI drives right now, but at the moment I am suspecting
> it being related to the corruption I saw.

no - so far i don't use kiobufs - i keeped them turned of due
to the problems from the beginning with test5

> On a topic related to porting XFS to other architectures, I now
> have a system which does not need the 64 bit divide and modulus
> support functions. All the places XFS does this turn out to be
> dividing by a 32 bit quantity and there is a function called 
> do_div provided for that on all architectures. This will show
> up after we get the corruption sorted out.

yes - this should make it running on other arches without that
more easy

> An ia64 port has been attempted, not sure what the current status
> is, and XFS does come from a 64 bit background in the first place,
> all modern Irix platforms are 64 bit. However, this is a good check
> that we did not lose information in the port to Linux. 

i think the code itself is quite clean - but the linux related
parts are so far then not really tested to be 64bit safe - for
instance - most of the compiler warnings came from the linux
related things like in the linux subdir or the pagebuf
(which i assume to be heavily linux related too)

> other things: there are some tests in cmd/xfs/stress - getting these
> to build may or may not be a problem. Also check out this web site, you
> can download yet more tests for xfs from here:

> http://oss.sgi.com/projects/ltp/ - again porting to other platforms may
> be some work.

i'll have a look at them

> I will take a look at packaging the changes you did for the pagebuf
> debug mechanism next week.

that would be fine - thanks

btw. are there any docs available about how to read the pagebuf traces
to find things out or something else about the internals of xfs
(because due to the amount of source code it would take
really long for me i assume to even get a rough
picture just from reading the code :-)

ok - below the changes to make the compiler happier ...
all the other warnings were definitely harmless (printk
wrong formats etc.)

t

cast from/to pointer to/from integer of different size

Index: fs/pagebuf/page_buf_io.c
===================================================================
RCS file: /cvs/linux-2.4-xfs/linux/fs/pagebuf/page_buf_io.c,v
retrieving revision 1.16
diff -u -r1.16 page_buf_io.c
--- fs/pagebuf/page_buf_io.c    2000/08/02 20:40:07     1.16
+++ fs/pagebuf/page_buf_io.c    2000/08/04 18:10:01
@@ -898,7 +898,7 @@
                do_generic_file_read(filp, lp, (read_descriptor_t *) rdp,
                    _pagebuf_read_helper);
        } else {
-               if ((unsigned int) buf & (inode->i_sb->s_blocksize - 1))
+               if ((unsigned long int) buf & (inode->i_sb->s_blocksize - 1))
                        return -EINVAL;
 
                inode->i_op->pagebuf_fileread(filp, rdp);
@@ -934,7 +934,7 @@
                if (bh->b_size == PAGE_SIZE)
                        PageBlockSetAllValid(page);
                else
-                       PageBlockSetValid(page, (int) bh->b_private);
+                       PageBlockSetValid(page, (long int) bh->b_private);
        }
 
        /*
@@ -993,7 +993,7 @@
        if (bh->b_size == PAGE_SIZE)
                PageBlockSetAllValid(page);
        else
-               PageBlockSetValid(page, (int) bh->b_private);
+               PageBlockSetValid(page, (long int) bh->b_private);
        unlock_buffer(bh);
 }
 
@@ -1017,7 +1017,7 @@
        struct buffer_head *bh, *head, *arr[PAGE_CACHE_SIZE / 512];
        int blocksize, bbits = inode->i_sb->s_blocksize_bits;
        unsigned long kaddr = 0;
-       int nr, i, status = 0;
+       long int nr, i, status = 0;
 
        if (!PageLocked(page) || (inode->i_op->pagebuf_bmap == NULL))
                PAGE_BUG(page);

comparision always true due to limited range of data type

Index: fs/xfs/xfs_rw.c
===================================================================
RCS file: /cvs/linux-2.4-xfs/linux/fs/xfs/xfs_rw.c,v
retrieving revision 1.322
diff -u -r1.322 xfs_rw.c
--- fs/xfs/xfs_rw.c     2000/07/31 16:16:28     1.322
+++ fs/xfs/xfs_rw.c     2000/08/04 18:10:04
@@ -659,7 +659,7 @@
                for (i = 0; i < nimaps; i++) {
                        imapp = &imaps[i];
                        count_fsb -= imapp->br_blockcount;
-                       ASSERT(((long)count_fsb) >= 0);
+                       ASSERT(((int)count_fsb) >= 0);
                        ASSERT(offset_fsb == imapp->br_startoff);
                        offset_fsb += imapp->br_blockcount;
                        ASSERT(offset_fsb <= last_fsb);
Index: fs/xfs/xfs_vnodeops.c
===================================================================
RCS file: /cvs/linux-2.4-xfs/linux/fs/xfs/xfs_vnodeops.c,v
retrieving revision 1.469
diff -u -r1.469 xfs_vnodeops.c
--- fs/xfs/xfs_vnodeops.c       2000/07/31 16:16:28     1.469
+++ fs/xfs/xfs_vnodeops.c       2000/08/04 18:10:05
@@ -5053,7 +5053,7 @@
                for (i = 0; i < nimaps; i++) {
                        ASSERT(imap[i].br_startblock != HOLESTARTBLOCK);
                        count_fsb -= imap[i].br_blockcount;
-                       ASSERT(((long)count_fsb) >= 0);
+                       ASSERT(((int)count_fsb) >= 0);
                        curr_off_fsb += imap[i].br_blockcount;
                        ASSERT(curr_off_fsb <= last_fsb);
                }

initialization from incompatible pointer type

Index: fs/xfs/linux/xfs_file.c
===================================================================
RCS file: /cvs/linux-2.4-xfs/linux/fs/xfs/linux/xfs_file.c,v
retrieving revision 1.32
diff -u -r1.32 xfs_file.c
--- fs/xfs/linux/xfs_file.c     2000/07/31 21:38:52     1.32
+++ fs/xfs/linux/xfs_file.c     2000/08/04 18:10:05
@@ -37,9 +37,9 @@
 #include <linux/xfs_cred.h>
 #include <sys/vnode.h>
 
-STATIC long long linvfs_file_lseek(
+STATIC loff_t linvfs_file_lseek(
        struct file *file,
-       long long offset,
+       loff_t offset,
        int origin)
 {
        struct inode *inode = file->f_dentry->d_inode;

-- 
thomas.graichen@xxxxxxxxxxxxx
Technical Director                                       innominate AG
Clustering & Security                                networking people
tel: +49.30.308806-13  fax: -77                   http://innominate.de

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