xfs
[Top] [All Lists]

XFS accessing arch-specific structures

To: nathans@xxxxxxx, hch@xxxxxxxxxxxxx
Subject: XFS accessing arch-specific structures
From: David Howells <dhowells@xxxxxxxxxx>
Date: Mon, 12 Dec 2005 14:39:12 +0000
Cc: linux-xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi Nathan,

I've got a problem in which XFS is accessing arch-specific structures, and
thus requiring those structures to conform to its ideals. Specifically, it's
trying to read the counter using atomic_read(), whether or not this is
possible:

    fs/xfs/linux-2.6/sema.h:
    #define valusema(sp)                        (atomic_read(&(sp)->count))

    compile log:

      CC      fs/xfs/xfs_inode.o
      CC      fs/xfs/xfs_inode_item.o
    fs/xfs/xfs_inode_item.c: In function `xfs_inode_item_pushbuf':
    fs/xfs/xfs_inode_item.c:803: error: structure has no member named `count'
    fs/xfs/xfs_inode_item.c:825: error: structure has no member named `count'

Can you fix this please? This will not compile with all archs.

I'm told that Christoph Hellwig may have an idea or a patch that might provide
a fix. If it's necessary to get the count on the semaphore (which it might
be), then you should add a function to each asm/semaphore.h to retrieve it and
use that.

David


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