Displaying 15 results from an estimated 15 matches for "cache_init".
2013 Dec 26
0
[PATCH] core: Avoid initializing the cache more than once
...he.c | 2 ++
core/fs/diskio.c | 1 +
core/fs/fs.c | 5 +++--
core/include/fs.h | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/fs/cache.c b/core/fs/cache.c
index 3b21fc2..798c622 100644
--- a/core/fs/cache.c
+++ b/core/fs/cache.c
@@ -55,6 +55,8 @@ void cache_init(struct device *dev, int block_size_shift)
data += dev->cache_block_size;
prev = cur++;
}
+
+ dev->cache_init = 1; /* Set cache as initialized */
}
/*
diff --git a/core/fs/diskio.c b/core/fs/diskio.c
index 7d95d67..e9a4c1d 100644
--- a/core/fs/diskio.c
+++ b/core/...
2011 Oct 21
2
[PATCH] fix for boot crash of syslinux-4.xx
...usb stick (which works on general
desktop pc), that usb stick does not work with embedded atom based board.
Screen is garbaged, flickering and the system hangs, instead of loading the
image to be booted.
Dissecting syslinux source code reveals, that the problem is within
core/fs/cache.c
function cache_init(), where seems to be an invalid pointer used to store an
initial value - following patch fixes the problem by commenting out the
offending line, that seems not to be needed anyway:
--- syslinux-4.04/core/fs/cache.c-orig 2011-04-18 23:24:17.000000000 +0200
+++ syslinux-4.04/core/fs/cache.c 2011-09-...
2009 May 24
0
malloc() in the core
...next several years, and second
because filesystems like ext2 have metadata which is more logically
cached on the filesystem block level):
static struct cache_struct cache_head, cache[MAX_CACHE_ENTRIES];
static uint8_t cache_data[65536];
static int cache_block_size;
static int cache_entries;
void cache_init(int block_size)
{
struct cache_struct *prev, *cur;
uint8_t *data = cache_data;
int i;
cache_block_size = block_size;
cache_entries = sizeof cache_data / block_size;
if (cache_entries > MAX_CACHE_ENTRIES)
cache_entries = MAX_CACHE_ENTRIES;
cache_head.prev = &ca...
2013 Nov 21
0
[PATCH] FSUUID for ext2 filesystem
...nt ext2_fs_init(struct fs_info *fs)
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_inf...
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...eate mode 100644 core/include/multifs.h
create mode 100644 core/multifs.c
diff --git a/core/fs/cache.c b/core/fs/cache.c
index 3b21fc2..b8ed8c2 100644
--- a/core/fs/cache.c
+++ b/core/fs/cache.c
@@ -16,7 +16,7 @@
* implementation since the block(cluster) size in FAT is a bit big.
*
*/
-void cache_init(struct device *dev, int block_size_shift)
+__export void cache_init(struct device *dev, int block_size_shift)
{
struct cache *prev, *cur;
char *data = dev->cache_data;
diff --git a/core/fs/diskio.c b/core/fs/diskio.c
index 7d95d67..466b6a8 100644
--- a/core/fs/diskio.c
+++ b/core/fs/d...
2015 Jul 22
13
[PULL 0/8] MultiFS suppport for BIOS and EFI
So last week I was wondering if XFS was still working -- even with its
last on-disk structure changes -- and it _suprisingly_ worked as
expected. Right, now I can finally get rid of GRUB and use Syslinux to
boot my Linux on EFI from a rootfs with xfs. Shit, I have two
partitions (the first one being the required ESP) so there is no way to
access the other partitions since because Syslinux does not
2013 Nov 19
2
[PATCH] Add filesystem UUID to SYSAPPEND for FAT
...+778,12 @@ static int vfat_fs_init(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)...
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
...printf("MultiFS: No valid file system found!\n");
+ goto free_dev;
+ }
+
+ /* add fs_info into hdd queue */
+ if (add_fs(fsp, hdd, partition - 1))
+ goto free_dev;
+
+ /* initialize the cache */
+ if (fsp->fs_dev && fsp->fs_dev->cache_data)
+ cache_init(fsp->fs_dev, blk_shift);
+
+ /* start out in the root directory */
+ if (fsp->fs_ops->iget_root) {
+ fsp->root = fsp->fs_ops->iget_root(fsp);
+ fsp->cwd = get_inode(fsp->root);
+ }
+
+ return fsp;
+free_dev:
+ free(dev->disk);
+ free(dev-&g...
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...sb_info *) set_ufs_info(&sb, ufs_type);
+ fs->sector_shift = disk->sector_shift;
+ fs->sector_size = disk->sector_size;
+ fs->block_shift = sb.block_shift;
+ fs->block_size = sb.block_size;
+
+ /* Initialize the cache, and force a clean on block zero */
+ cache_init(fs->fs_dev, sb.block_shift);
+ cs = _get_cache_block(fs->fs_dev, 0);
+ memset(cs->data, 0, fs->block_size);
+ cache_lock_block(cs);
+
+ /* For debug purposes */
+ //ufs_checking(fs);
+
+ //return -1;
+ return fs->block_shift;
+}
+
+const struct fs_ops ufs_fs_ops...
2013 Jul 12
1
[PATCH 001/001] core/fs: Add support to Unix File system 1/2.
...sb_info *) set_ufs_info(&sb, ufs_type);
+ fs->sector_shift = disk->sector_shift;
+ fs->sector_size = disk->sector_size;
+ fs->block_shift = sb.block_shift;
+ fs->block_size = sb.block_size;
+
+ /* Initialize the cache, and force a clean on block zero */
+ cache_init(fs->fs_dev, sb.block_shift);
+ cs = _get_cache_block(fs->fs_dev, 0);
+ memset(cs->data, 0, fs->block_size);
+ cache_lock_block(cs);
+
+ /* For debug purposes */
+ //ufs_checking(fs);
+
+ //return -1;
+ return fs->block_shift;
+}
+
+const struct fs_ops ufs_fs_ops...
2017 Oct 12
0
[ANNOUNCE] nftables 0.8 release
...ect reference expression
src: add support for stateful object maps
src: support for stateful object monitoring
mnl: use nftnl_nlmsg_build_hdr()
tests: shell: cover cache flush on flush ruleset
netlink: don't bail out on dump errors
rule: check for errors from cache_init_objects() for stateful objects
tests: shell: validate set size
include: refresh linux/netfilter/nf_tables.h
tests: shell: remove nft_set_bitmap on each run
include: add tcpopt.h to Makefile.am
evaluate: store byteorder for set keys
netlink: store set byteorder in...
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
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 Aug 20
13
[PATCH 00/12] Multidisk support
Hello,
the following patches should get multidisk access working.
The syntax accepted is the following:
(hdx,y)/path/to/file
where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk.
the other accepted syntax is using MBR's 32 bits disk signature so for example:
(mbr:0x12345678,2)/foo/bar
would address
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...block_shift %u blocksize 0x%lX (%lu)", info->block_shift,
+ info->blocksize, info->blocksize);
+
+ xfs_debug("rootino 0x%llX (%llu)", info->rootino, info->rootino);
+
+ BLOCK_SHIFT(fs) = info->block_shift;
+ BLOCK_SIZE(fs) = info->blocksize;
+
+ cache_init(fs->fs_dev, BLOCK_SHIFT(fs));
+
+ XFS_INFO(fs)->dirleafblk = xfs_dir2_db_to_da(fs, XFS_DIR2_LEAF_FIRSTDB(fs));
+
+ return BLOCK_SHIFT(fs);
+
+out:
+ return -1;
+}
+
+const struct fs_ops xfs_fs_ops = {
+ .fs_name = "xfs",
+ .fs_flags = FS_USEMEM | FS_THISIND,
+ .f...