nfsd: nfsd should drop CAP_MKNOD for non-root
[safe/jmp/linux-2.6] / fs / xfs / xfs_da_btree.h
index e64c692..70b710c 100644 (file)
@@ -72,27 +72,7 @@ typedef struct xfs_da_intnode {
 typedef struct xfs_da_node_hdr xfs_da_node_hdr_t;
 typedef struct xfs_da_node_entry xfs_da_node_entry_t;
 
-#define XFS_DA_MAXHASH ((xfs_dahash_t)-1) /* largest valid hash value */
-
 #define        XFS_LBSIZE(mp)  (mp)->m_sb.sb_blocksize
-#define        XFS_LBLOG(mp)   (mp)->m_sb.sb_blocklog
-
-#define        XFS_DA_MAKE_BNOENTRY(mp,bno,entry)      \
-       (((bno) << (mp)->m_dircook_elog) | (entry))
-#define        XFS_DA_MAKE_COOKIE(mp,bno,entry,hash)   \
-       (((xfs_off_t)XFS_DA_MAKE_BNOENTRY(mp, bno, entry) << 32) | (hash))
-#define        XFS_DA_COOKIE_HASH(mp,cookie)           ((xfs_dahash_t)cookie)
-#define        XFS_DA_COOKIE_BNO(mp,cookie)            \
-       ((((xfs_off_t)(cookie) >> 31) == -1LL ? \
-               (xfs_dablk_t)0 : \
-               (xfs_dablk_t)((xfs_off_t)(cookie) >> \
-                               ((mp)->m_dircook_elog + 32))))
-#define        XFS_DA_COOKIE_ENTRY(mp,cookie)          \
-       ((((xfs_off_t)(cookie) >> 31) == -1LL ? \
-               (xfs_dablk_t)0 : \
-               (xfs_dablk_t)(((xfs_off_t)(cookie) >> 32) & \
-                               ((1 << (mp)->m_dircook_elog) - 1))))
-
 
 /*========================================================================
  * Btree searching and modification structure definitions.
@@ -132,14 +112,20 @@ typedef struct xfs_da_args {
        int             index2;         /* index of 2nd attr in blk */
        xfs_dablk_t     rmtblkno2;      /* remote attr value starting blkno */
        int             rmtblkcnt2;     /* remote attr value block count */
-       unsigned char   justcheck;      /* T/F: check for ok with no space */
-       unsigned char   rename;         /* T/F: this is an atomic rename op */
-       unsigned char   addname;        /* T/F: this is an add operation */
-       unsigned char   oknoent;        /* T/F: ok to return ENOENT, else die */
+       int             op_flags;       /* operation flags */
        enum xfs_dacmp  cmpresult;      /* name compare result for lookups */
 } xfs_da_args_t;
 
 /*
+ * Operation flags:
+ */
+#define XFS_DA_OP_JUSTCHECK    0x0001  /* check for ok with no space */
+#define XFS_DA_OP_RENAME       0x0002  /* this is an atomic rename op */
+#define XFS_DA_OP_ADDNAME      0x0004  /* this is an add operation */
+#define XFS_DA_OP_OKNOENT      0x0008  /* lookup/add op, ENOENT ok, else die */
+#define XFS_DA_OP_CILOOKUP     0x0010  /* lookup to return CI name if found */
+
+/*
  * Structure to describe buffer(s) for a block.
  * This is needed in the directory version 2 format case, when
  * multiple non-contiguous fsblocks might be needed to cover one
@@ -220,9 +206,8 @@ struct xfs_nameops {
 };
 
 
-#ifdef __KERNEL__
 /*========================================================================
- * Function prototypes for the kernel.
+ * Function prototypes.
  *========================================================================*/
 
 /*
@@ -283,6 +268,5 @@ xfs_daddr_t xfs_da_blkno(xfs_dabuf_t *dabuf);
 
 extern struct kmem_zone *xfs_da_state_zone;
 extern struct kmem_zone *xfs_dabuf_zone;
-#endif /* __KERNEL__ */
 
 #endif /* __XFS_DA_BTREE_H__ */