Displaying 4 results from an estimated 4 matches for "xfs_dir2_leaf_hdr".
2016 Jan 18
1
[PATCH] xfs: Add support for v3 directories
...t; + int mid;
>
>
>> + if (be16_to_cpu(lhdr->info.magic) == XFS_DIR2_LEAFN_MAGIC) {
>> + count = be16_to_cpu(lhdr->count);
>> + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr +
>> + sizeof(struct
>> xfs_dir2_leaf_hdr));
>> + } else if (be16_to_cpu(lhdr->info.magic) == XFS_DIR3_LEAFN_MAGIC) {
>> + count = be16_to_cpu(((xfs_dir3_leaf_hdr_t *)lhdr)->count);
>> + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr +
>> + sizeof(struct...
2016 Jan 18
0
[PATCH] xfs: Add support for v3 directories
...count;
> - int mid = 0;
> + int mid;
> + if (be16_to_cpu(lhdr->info.magic) == XFS_DIR2_LEAFN_MAGIC) {
> + count = be16_to_cpu(lhdr->count);
> + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr +
> + sizeof(struct xfs_dir2_leaf_hdr));
> + } else if (be16_to_cpu(lhdr->info.magic) == XFS_DIR3_LEAFN_MAGIC) {
> + count = be16_to_cpu(((xfs_dir3_leaf_hdr_t *)lhdr)->count);
> + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr +
> + sizeof(struct xfs_dir3_leaf_hd...
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...+ p += (isdir3 ? xfs_dir3_data_entsize(dep->namelen) :
+ xfs_dir2_data_entsize(dep->namelen));
}
out:
@@ -348,7 +368,9 @@ failed:
struct inode *xfs_dir2_leaf_find_entry(const char *dname, struct inode *parent,
xfs_dinode_t *core)
{
- xfs_dir2_leaf_t *leaf;
+ xfs_dir2_leaf_hdr_t *hdr;
+ xfs_dir2_leaf_entry_t *ents;
+ uint16_t count;
xfs_bmbt_irec_t irec;
block_t leaf_blk, dir_blk;
xfs_dir2_leaf_entry_t *lep;
@@ -358,37 +380,47 @@ struct inode *xfs_dir2_leaf_find_entry(const char *dname, struct inode *parent,
uint32_t hash = 0;
uint32_t hash...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...ACE * XFS_DIR2_SPACE_SIZE)
+#define XFS_DIR2_LEAF_FIRSTDB(fs) \
+ xfs_dir2_byte_to_db(fs, XFS_DIR2_LEAF_OFFSET)
+
+typedef struct xfs_da_blkinfo {
+ uint32_t forw;
+ uint32_t back;
+ uint16_t magic;
+ uint16_t pad;
+} __attribute__((__packed__)) xfs_da_blkinfo_t;
+
+typedef struct xfs_dir2_leaf_hdr {
+ xfs_da_blkinfo_t info;
+ uint16_t count;
+ uint16_t stale;
+} __attribute__((__packed__)) xfs_dir2_leaf_hdr_t;
+
+typedef struct xfs_dir2_leaf_entry {
+ uint32_t hashval; /* hash value of name */
+ uint32_t address; /* address of data entry */
+} __attribute__((__packed__))...