Displaying 5 results from an estimated 5 matches for "xfs_error".
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
...struct disk *disk = fs->fs_dev->disk;
@@ -376,24 +376,21 @@ static int xfs_fs_init(struct fs_info *fs)
SECTOR_SHIFT(fs) = disk->sector_shift;
SECTOR_SIZE(fs) = 1 << SECTOR_SHIFT(fs);
- if (xfs_read_superblock(fs, &sb)) {
+ if (xfs_read_sb(fs, &sb)) {
xfs_error("Superblock read failed");
goto out;
}
-
- if (!xfs_is_valid_magicnum(&sb)) {
+ if (!xfs_is_valid_sb(&sb)) {
xfs_error("Invalid superblock");
goto out;
}
-
- xfs_debug("magicnum 0x%lX", be32_to_cpu(sb.sb_magicnum));
+ xfs_debug("...
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...- memset(buf, 0, XFS_INFO(fs)->dirblksize);
-
- while (count--) {
- p = (uint8_t *)get_cache(fs->fs_dev, startblock++);
- memcpy(buf + offset, p, BLOCK_SIZE(fs));
- offset += BLOCK_SIZE(fs);
+ ret = cache_read(fs, buf, offs, len);
+ if (ret != len) {
+ xfs_error("failed to read contiguous directory blocks\n");
+ free(buf);
+ return NULL;
}
-
return buf;
}
-const void *xfs_dir2_dirblks_get_cached(struct fs_info *fs, block_t startblock,
- xfs_filblks_t c)
+void *xfs_dir2_dirblks_get_cached(struct fs_info *fs, block_t...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...+
+ return retval;
+}
+
+static int xfs_readdir(struct file *file, struct dirent *dirent)
+{
+ struct fs_info *fs = file->fs;
+ xfs_dinode_t *core;
+ struct inode *inode = file->inode;
+ int retval = -1;
+
+ core = xfs_dinode_get_core(fs, inode->ino);
+ if (!core) {
+ xfs_error("Failed to get dinode from disk (ino %llx)", inode->ino);
+ return -1;
+ }
+
+ if (core->di_format == XFS_DINODE_FMT_LOCAL)
+ retval = xfs_fmt_local_readdir(file, dirent, core);
+ else if (core->di_format == XFS_DINODE_FMT_EXTENTS)
+ retval = xfs_fmt_extents_readdir(file...
2016 Jan 18
1
[PATCH] xfs: Add support for v3 directories
...R3_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_hdr));
>> + } else {
>> + xfs_error("Leaf's magic number does not match (0x%04x)!",
>> + be16_to_cpu(lhdr->info.magic));
>> goto out;
>> }
>>
>> - if (!leaf->hdr.count)
>> - goto out;
>> + if (!count)
>> + goto out;
&g...
2016 Jan 18
0
[PATCH] xfs: Add support for v3 directories
...hdr->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_hdr));
> + } else {
> + xfs_error("Leaf's magic number does not match (0x%04x)!",
> + be16_to_cpu(lhdr->info.magic));
> goto out;
> }
>
> - if (!leaf->hdr.count)
> - goto out;
> + if (!count)
> + goto out;
>
> - for (lep = leaf->...