Displaying 13 results from an estimated 13 matches for "block_shift".
Did you mean:
blk_shift
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...n a block.
+ * @mask_per_blk: mask to limit the max nr. of addresses in a block.
+ * @addr_count: nr. of addresses in a block.
+ */
+static uint64_t
+bmap_indirect(struct fs_info *fs, uint64_t start, uint32_t block,
+ int levels, size_t *nblocks)
+{
+ const uint32_t shft_per_blk = fs->block_shift - UFS_SB(fs)->addr_shift;
+ const uint32_t addr_count = (1 << shft_per_blk);
+ const uint32_t mask_per_blk = addr_count - 1;
+ const uint8_t *blk = NULL;
+ uint32_t index = 0;
+
+ while (levels--) {
+ if (!start) {
+ if (nblocks)
+ *nblocks = addr_count << (levels...
2012 Aug 02
0
[PATCH 3/3] ALPHA: implement and use rdwr_bytes
...C)
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index b08923c..3c7620e 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -731,7 +731,7 @@ static int vfat_fs_init(struct fs_info *fs)
fs->sector_size = 1 << fs->sector_shift;
fs->block_size = 1 << fs->block_shift;
- disk->rdwr_sectors(disk, &fat, 0, 1, 0);
+ rdwr_bytes(disk, &fat, 0, 512, 0);
/* XXX: Find better sanity checks... */
if (!fat.bxResSectors || !fat.bxFATs)
diff --git a/core/fs/iso9660/iso9660.c b/core/fs/iso9660/iso9660.c
index 3cd3ac4..60b3b55 100644
--- a/core/f...
2013 Jul 12
1
[PATCH 001/001] core/fs: Add support to Unix File system 1/2.
...n a block.
+ * @mask_per_blk: mask to limit the max nr. of addresses in a block.
+ * @addr_count: nr. of addresses in a block.
+ */
+static uint64_t
+bmap_indirect(struct fs_info *fs, uint64_t start, uint32_t block,
+ int levels, size_t *nblocks)
+{
+ const uint32_t shft_per_blk = fs->block_shift - UFS_SB(fs)->addr_shift;
+ const uint32_t addr_count = (1 << shft_per_blk);
+ const uint32_t mask_per_blk = addr_count - 1;
+ const uint8_t *blk = NULL;
+ uint32_t index = 0;
+
+ while (levels--) {
+ if (!start) {
+ if (nblocks)
+ *nblocks = addr_count << (levels...
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
...b.sb_magicnum));
+ xfs_debug("sb magic: 0x%lX", be32_to_cpu(sb.sb_magicnum));
info = xfs_new_sb_info(&sb);
if (!info) {
xfs_error("Failed to fill in filesystem-specific info structure");
goto out;
}
-
fs->fs_info = info;
xfs_debug("block_shift %u blocksize 0x%lX (%lu)", info->block_shift,
diff --git a/core/fs/xfs/xfs.h b/core/fs/xfs/xfs.h
index 0d953d8..a8bfa93 100644
--- a/core/fs/xfs/xfs.h
+++ b/core/fs/xfs/xfs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 Paulo Alcantara <pcacjr at zytor.com>
+ * Copyright (c) 2012-2...
2014 Feb 20
2
[PATCH] NTFS: fragmented $MFT file was not handled
..._size);
- if (!buf)
- malloc_error("uint8_t *");
+ int err = 0;
- /* determine MFT record's LCN and block number */
- lcn = NTFS_SB(fs)->mft_lcn + (file << mft_record_shift >>
clust_byte_shift);
- cur_blk = (lcn << clust_byte_shift >> BLOCK_SHIFT(fs)) - mft_blk;
- offset = (file << mft_record_shift) % BLOCK_SIZE(fs);
- for (;;) {
- right_blk = cur_blk + mft_blk;
- err = ntfs_read(fs, buf, mft_record_size, mft_record_size,
&right_blk,
- &offset, &next_offset, &lcn);
- if (err) {
-...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...nt == be32_to_cpu(core->di_nextents))
+ goto out;
+
+ if (core->di_format == XFS_DINODE_FMT_EXTENTS) {
+ bmbt_irec_get(&rec, (xfs_bmbt_rec_t *)&core->di_literal_area[0] +
+ XFS_PVT(inode)->i_cur_extent++);
+
+ bno = fsblock_to_bytes(fs, rec.br_startblock) >> BLOCK_SHIFT(fs);
+
+ XFS_PVT(inode)->i_offset = rec.br_startoff;
+
+ inode->next_extent.pstart = bno << BLOCK_SHIFT(fs) >> SECTOR_SHIFT(fs);
+ inode->next_extent.len = ((rec.br_blockcount << BLOCK_SHIFT(fs)) +
+ SECTOR_SIZE(fs) - 1) >> SECTOR_SHIFT(fs);
+ } else if (cor...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com>
Wrote the documentation below. I think it would be good to push the doc to
the wiki as soon as the UFS support gets merged.
Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install)
-----
There is a confusion about the name of this file system, then I decided to
contact the author who replied:
"The name has always been
2013 Nov 21
0
[PATCH] FSUUID for ext2 filesystem
...s)
sbi->s_first_data_block = sb.s_first_data_block;
sbi->s_inode_size = sb.s_inode_size;
+ /* Volume UUID */
+ memcpy(sbi->s_uuid, sb.s_uuid, sizeof(sbi->s_uuid));
+
/* Initialize the cache, and force block zero to all zero */
cache_init(fs->fs_dev, fs->block_shift);
cs = _get_cache_block(fs->fs_dev, 0);
@@ -321,6 +324,41 @@ static int ext2_fs_init(struct fs_info *fs)
return fs->block_shift;
}
+#define EXT2_UUID_LEN (4 + 4 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 4 + 4 + 4 + 1)
+static char *ext2_fs_uuid(struct fs_info *fs)
+{
+ char *uuid = NULL;...
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...e->di_literal_area[0] +
- XFS_PVT(inode)->i_cur_extent++);
+ bmbt_irec_get(&rec, (xfs_bmbt_rec_t *)XFS_DFORK_PTR(core,
+ XFS_DATA_FORK) +
+ XFS_PVT(inode)->i_cur_extent);
+ XFS_PVT(inode)->i_cur_extent++;
bno = fsblock_to_bytes(fs, rec.br_startblock) >> BLOCK_SHIFT(fs);
@@ -130,7 +135,7 @@ static int xfs_next_extent(struct inode *inode, uint32_t lstart)
} else if (core->di_format == XFS_DINODE_FMT_BTREE) {
xfs_debug("XFS_DINODE_FMT_BTREE");
index = XFS_PVT(inode)->i_cur_extent++;
- rblock = (xfs_bmdr_block_t *)&...
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com>
Change since v1:
* Fix bug on dentry structure (thank you specification; btw, sarcasm), and
consequently a bug on ufs_readdir.
* Add readlink support (applied tests for symlinks whose destionation path
were stored in blk pointers and the file itself).
* Several improvements.
Wrote the documentation below. I think it would be good to
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512.
Currently it fixes extlinux, MBR for GPT and ext partitions.
Other code is unaffected.
This set of patches has been tested on a read Dell machine running a beta
firmware.
2013 Nov 19
2
[PATCH] Add filesystem UUID to SYSAPPEND for FAT
...it(struct fs_info *fs)
}
sbi->clusters = clusters;
+ /* fs UUID - serial number */
+ if (FAT32 == sbi->fat_type)
+ sbi->uuid = fat.fat32.num_serial;
+ else
+ sbi->uuid = fat.fat12_16.num_serial;
+
/* Initialize the cache */
cache_init(fs->fs_dev, fs->block_shift);
@@ -811,6 +818,29 @@ static int vfat_copy_superblock(void *buf)
return 0;
}
+#define FAT_UUID_LEN (4 + 1 + 4 + 1)
+static char *vfat_fs_uuid(struct fs_info *fs)
+{
+ char *uuid = NULL;
+ char *ptr;
+
+ uuid = malloc(FAT_UUID_LEN);
+ if (!uuid)
+ return NULL;
+
+ if (snprintf...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...s = %u.%u.%u.%u\n", argv[1],
(ip & 0xff), (ip >> 8) & 0xff,
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index 2c8dc31..127a24d 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -779,7 +779,7 @@ static int vfat_fs_init(struct fs_info *fs)
return fs->block_shift;
}
-int vfat_copy_superblock(void *buf)
+static int vfat_copy_superblock(void *buf)
{
struct fat_bpb fat;
struct disk *disk;
@@ -821,4 +821,5 @@ const struct fs_ops vfat_fs_ops = {
.iget_root = vfat_iget_root,
.iget = vfat_iget,
.next_extent = fat_next_extent,...