Displaying 3 results from an estimated 3 matches for "xfs_dir2_dataptr_to_off".
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
xfs_is_valid_magicnum is not actually a generic function that checks for
magic numbers, instead it checks only for superblock's one.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs.c | 13 +++++--------
core/fs/xfs/xfs.h | 19 ++++++++++---------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...39;s data magic No. does not match!");
goto out;
}
@@ -432,10 +466,10 @@ struct inode *xfs_dir2_leaf_find_entry(const char *dname, struct inode *parent,
curdb = newdb;
}
- dep = (xfs_dir2_data_entry_t *)((char *)buf +
- xfs_dir2_dataptr_to_off(parent->fs, be32_to_cpu(lep->address)));
-
- start_name = &dep->name[0];
+ dep = (xfs_dir2_data_entry_t *)(
+ buf + xfs_dir2_dataptr_to_off(parent->fs,
+ be32_to_cpu(lep->address)));
+ start_name = dep->n...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...r2_byte_to_db(fs, xfs_dir2_dataptr_to_byte(dp));
+}
+
+static inline unsigned int
+xfs_dir2_byte_to_off(struct fs_info *fs, int64_t by)
+{
+ return (unsigned int)(by &
+ (( 1 << (XFS_INFO(fs)->block_shift + XFS_INFO(fs)->dirblklog)) - 1));
+}
+
+static inline unsigned int
+xfs_dir2_dataptr_to_off(struct fs_info *fs, uint32_t dp)
+{
+ return xfs_dir2_byte_to_off(fs, xfs_dir2_dataptr_to_byte(dp));
+}
+
+#define XFS_DIR2_LEAF_SPACE 1
+#define XFS_DIR2_LEAF_OFFSET (XFS_DIR2_LEAF_SPACE * XFS_DIR2_SPACE_SIZE)
+#define XFS_DIR2_LEAF_FIRSTDB(fs) \
+ xfs_dir2_byte_to_db(fs, XFS_DIR2_LEAF_OFFSET)...