fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / xfs / linux-2.6 / xfs_linux.h
index bf9f7b6..ca367c2 100644 (file)
@@ -139,7 +139,7 @@ BUFFER_FNS(PrivateStart, unwritten);
 #define current_pid()          (current->pid)
 #define current_fsuid(cred)    (current->fsuid)
 #define current_fsgid(cred)    (current->fsgid)
-#define current_fsxid(cred,vp) (vx_current_fsxid(vn_to_inode(vp)->i_sb))
+#define current_fstag(cred,vp) (dx_current_fstag(vn_to_inode(vp)->i_sb))
 #define current_test_flags(f)  (current->flags & (f))
 #define current_set_flags_nested(sp, f)                \
                (*(sp) = current->flags, current->flags |= (f))
@@ -149,11 +149,7 @@ BUFFER_FNS(PrivateStart, unwritten);
                (current->flags = ((current->flags & ~(f)) | (*(sp) & (f))))
 
 #define NBPP           PAGE_SIZE
-#define DPPSHFT                (PAGE_SHIFT - 9)
 #define NDPP           (1 << (PAGE_SHIFT - 9))
-#define dtop(DD)       (((DD) + NDPP - 1) >> DPPSHFT)
-#define dtopt(DD)      ((DD) >> DPPSHFT)
-#define dpoff(DD)      ((DD) & (NDPP-1))
 
 #define NBBY           8               /* number of bits per byte */
 #define        NBPC            PAGE_SIZE       /* Number of bytes per click */
@@ -173,8 +169,6 @@ BUFFER_FNS(PrivateStart, unwritten);
 #define        btoct(x)        ((__psunsigned_t)(x)>>BPCSHIFT)
 #define        btoc64(x)       (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
 #define        btoct64(x)      ((__uint64_t)(x)>>BPCSHIFT)
-#define        io_btoc(x)      (((__psunsigned_t)(x)+(IO_NBPC-1))>>IO_BPCSHIFT)
-#define        io_btoct(x)     ((__psunsigned_t)(x)>>IO_BPCSHIFT)
 
 /* off_t bytes to clicks */
 #define offtoc(x)       (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
@@ -187,7 +181,6 @@ BUFFER_FNS(PrivateStart, unwritten);
 #define        ctob(x)         ((__psunsigned_t)(x)<<BPCSHIFT)
 #define btoct(x)        ((__psunsigned_t)(x)>>BPCSHIFT)
 #define        ctob64(x)       ((__uint64_t)(x)<<BPCSHIFT)
-#define        io_ctob(x)      ((__psunsigned_t)(x)<<IO_BPCSHIFT)
 
 /* bytes to clicks */
 #define btoc(x)         (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
@@ -340,4 +333,11 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y)
        return(x * y);
 }
 
+static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)
+{
+       x += y - 1;
+       do_div(x, y);
+       return x;
+}
+
 #endif /* __XFS_LINUX__ */