Displaying 4 results from an estimated 4 matches for "blk_t".
Did you mean:
blk_
2006 Jun 12
0
Some questions about function usage
Hello,
Recently, I am coding a program about read and write control.
And there are some questions confusing me.
1.
In info libext2fs:
Function: errcode_t ext2fs_get_blocks (ext2_filsys FS, ext2_ino_t
INO, blk_t *BLOCKS)
Returns an array of blocks corresponding to the direct, indirect,
doubly indirect, and triply indirect blocks as stored in the inode
structure.
So I wrote some codes like following:
blk_t target_blks[EXT_N_BLOCKS];
retval = ext2fs_get_blocks(fs, ino, target_blks);
printf("[percentage...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...-fail:
- return -1;
-}
-
-static int ext2_close(struct convert_fs *fs)
-{
- ext2fs_close((ext2_filsys)fs->privdata);
- return 0;
-}
-
-static int ext2_cache_free_extents(struct convert_fs *fs,
- struct extent_io_tree *free_tree)
-{
- ext2_filsys ext2_fs = fs->privdata;
- int ret = 0;
- blk_t block;
- u64 bytenr;
- u64 blocksize = ext2_fs->blocksize;
-
- block = ext2_fs->super->s_first_data_block;
- for (; block < ext2_fs->super->s_blocks_count; block++) {
- if (ext2fs_fast_test_block_bitmap(ext2_fs->block_map, block))
- continue;
- bytenr = block * blocksize;
-...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...ar *name, ext2_filsys *ret_fs)
{
int mnt_flags;
errcode_t ret;
@@ -88,9 +89,6 @@ static int close_ext2fs(ext2_filsys fs)
return 0;
}
-/*
- * Stupid algorithm, search forward starting from the first free block.
- */
static int ext2_alloc_block(ext2_filsys fs, u64 goal, u64 *block_ret)
{
blk_t block;
@@ -115,6 +113,7 @@ static int custom_alloc_extent(struct bt
{
ext2_filsys fs = (ext2_filsys)root->fs_info->priv_data;
u32 blocksize = fs->blocksize;
+ u64 first = 0;
u64 block;
u64 bytenr;
int ret;
@@ -127,6 +126,12 @@ static int custom_alloc_extent(struct bt
if (ret)...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...E, 0, "ext2_link: ext2fs_expand_dir: %s: %s",
- basename, error_message (err));
- goto again;
- }
-
- if (err != 0)
- error (EXIT_FAILURE, 0, "ext2fs_link: %s: %s",
- basename, error_message (err));
-}
-
-static int
-release_block (ext2_filsys fs, blk_t *blocknr,
- int blockcnt, void *private)
-{
- blk_t block;
-
- block = *blocknr;
- ext2fs_block_alloc_stats (fs, block, -1);
- return 0;
-}
-
-/* unlink or rmdir path, if it exists. */
-void
-ext2_clean_path (ext2_ino_t dir_ino,
- const char *dirname, const char *...