aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr_remote.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-10-14 18:17:51 -0400
committerBen Myers <bpm@sgi.com>2013-10-23 15:21:40 -0400
commit5706278758e334bf6a15f57c18dc16df19c83957 (patch)
treec7f70f138ac46b11432f3598c85244bf862194f8 /fs/xfs/xfs_attr_remote.h
parent70a9883c5f34b215b8a77665cefd0398edc5a9ef (diff)
xfs: unify directory/attribute format definitions
The on-disk format definitions for the directory and attribute structures are spread across 3 header files right now, only one of which is dedicated to defining on-disk structures and their manipulation (xfs_dir2_format.h). Pull all the format definitions into a single header file - xfs_da_format.h - and switch all the code over to point at that. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr_remote.h')
-rw-r--r--fs/xfs/xfs_attr_remote.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/fs/xfs/xfs_attr_remote.h b/fs/xfs/xfs_attr_remote.h
index b3e1e1bdfb3b..5a9acfa156d7 100644
--- a/fs/xfs/xfs_attr_remote.h
+++ b/fs/xfs/xfs_attr_remote.h
@@ -18,33 +18,6 @@
18#ifndef __XFS_ATTR_REMOTE_H__ 18#ifndef __XFS_ATTR_REMOTE_H__
19#define __XFS_ATTR_REMOTE_H__ 19#define __XFS_ATTR_REMOTE_H__
20 20
21#define XFS_ATTR3_RMT_MAGIC 0x5841524d /* XARM */
22
23/*
24 * There is one of these headers per filesystem block in a remote attribute.
25 * This is done to ensure there is a 1:1 mapping between the attribute value
26 * length and the number of blocks needed to store the attribute. This makes the
27 * verification of a buffer a little more complex, but greatly simplifies the
28 * allocation, reading and writing of these attributes as we don't have to guess
29 * the number of blocks needed to store the attribute data.
30 */
31struct xfs_attr3_rmt_hdr {
32 __be32 rm_magic;
33 __be32 rm_offset;
34 __be32 rm_bytes;
35 __be32 rm_crc;
36 uuid_t rm_uuid;
37 __be64 rm_owner;
38 __be64 rm_blkno;
39 __be64 rm_lsn;
40};
41
42#define XFS_ATTR3_RMT_CRC_OFF offsetof(struct xfs_attr3_rmt_hdr, rm_crc)
43
44#define XFS_ATTR3_RMT_BUF_SPACE(mp, bufsize) \
45 ((bufsize) - (xfs_sb_version_hascrc(&(mp)->m_sb) ? \
46 sizeof(struct xfs_attr3_rmt_hdr) : 0))
47
48int xfs_attr3_rmt_blocks(struct xfs_mount *mp, int attrlen); 21int xfs_attr3_rmt_blocks(struct xfs_mount *mp, int attrlen);
49 22
50int xfs_attr_rmtval_get(struct xfs_da_args *args); 23int xfs_attr_rmtval_get(struct xfs_da_args *args);