Displaying 20 results from an estimated 24 matches for "fs_dev".
Did you mean:
fsl_dev
2016 Feb 05
3
[PATCH] inspect: get windows drive letters for GPT disks.
...lob)
+{
+ CLEANUP_FREE_STRING_LIST char **fses = NULL;
+ size_t i;
+
+ fses = guestfs_list_filesystems (g);
+ if (fses == NULL)
+ return NULL;
+
+ for (i = 0; fses[i] != NULL; i += 2) {
+ CLEANUP_FREE char *fs_guid = NULL;
+ CLEANUP_FREE char *blob_guid = NULL;
+ CLEANUP_FREE char *fs_dev = NULL;
+
+ fs_dev = guestfs_canonical_device_name (g, fses[i]);
+
+ if (fs_dev == NULL)
+ continue;
+
+ int partnum = guestfs_part_to_partnum (g, fs_dev);
+ CLEANUP_FREE char *device = guestfs_part_to_dev (g, fs_dev);
+ CLEANUP_FREE char *type = guestfs_part_get_parttype (g,...
2012 Mar 08
3
[PATCH 0/3] kinit: Allow mount options
This patch series allows user-specified mount commands to be
sent in via kernel command line ("kinit_mount=...") or via
an embedded /etc/fstab file.
The first patch is a cleanup of a patch sent last November
by San Mehat (http://web.archiveorange.com/archive/v/EazJNBMORV2U7E0coh5h);
the next two are small improvements or bug fixes.
2013 Dec 26
0
[PATCH] core: Avoid initializing the cache more than once
...initialized */
return &dev;
}
diff --git a/core/fs/fs.c b/core/fs/fs.c
index 8c1feea..d6da8a5 100644
--- a/core/fs/fs.c
+++ b/core/fs/fs.c
@@ -422,8 +422,9 @@ void fs_init(const struct fs_ops **ops, void *priv)
}
this_fs = &fs;
- /* initialize the cache */
- if (fs.fs_dev && fs.fs_dev->cache_data)
+ /* initialize the cache only if it wasn't already initialized
+ * by the fs driver */
+ if (fs.fs_dev && fs.fs_dev->cache_data && !fs.fs_dev->cache_init)
cache_init(fs.fs_dev, blk_shift);
/* start out in the...
2016 Feb 05
0
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...filesystems here? If you're
trying to get the list of partitions, then guestfs_list_partitions is
what you should be calling.
> + for (i = 0; fses[i] != NULL; i += 2) {
> + CLEANUP_FREE char *fs_guid = NULL;
> + CLEANUP_FREE char *blob_guid = NULL;
> + CLEANUP_FREE char *fs_dev = NULL;
> +
> + fs_dev = guestfs_canonical_device_name (g, fses[i]);
> +
> + if (fs_dev == NULL)
> + continue;
> +
> + int partnum = guestfs_part_to_partnum (g, fs_dev);
Need to check that partnum != -1 and do something.
> + CLEANUP_FREE char *device =...
2016 Feb 05
1
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...ice. If that's a problem, please let me
know and I'll change it to follow what map_registry_blob does.
> > + for (i = 0; fses[i] != NULL; i += 2) {
> > + CLEANUP_FREE char *fs_guid = NULL;
> > + CLEANUP_FREE char *blob_guid = NULL;
> > + CLEANUP_FREE char *fs_dev = NULL;
> > +
> > + fs_dev = guestfs_canonical_device_name (g, fses[i]);
> > +
> > + if (fs_dev == NULL)
> > + continue;
> > +
> > + int partnum = guestfs_part_to_partnum (g, fs_dev);
>
> Need to check that partnum != -1 and do somet...
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
...'/';
+ fsp->cwd_name[1] = '\0';
+
+ ops = p_ops;
+ while ((blk_shift < 0) && *ops) {
+ /* set up the fs stucture */
+ fsp->fs_ops = *ops;
+
+ /*
+ * This boldly assumes that we don't mix FS_NODEV filesystems
+ * with FS_DEV filesystems...
+ */
+ if (fsp->fs_ops->fs_flags & FS_NODEV) {
+ fsp->fs_dev = NULL;
+ } else {
+ if (!dev) {
+ dev = device_init(private);
+ if (!dev)
+ goto bail;
+ }
+ fsp->fs_dev = dev;
+ }
+ /* invoke the fs-speci...
2013 Nov 21
0
[PATCH] FSUUID for ext2 filesystem
...ruct 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_info *fs)
+{
+...
2012 Aug 02
2
[PATCH] add additional checks to ext2 loader
...ions(-)
diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
index bddde8d..8f0f2a4 100644
--- a/core/fs/ext2/ext2.c
+++ b/core/fs/ext2/ext2.c
@@ -139,6 +139,8 @@ ext2_get_inode(struct fs_info *fs, int inr)
block_off = inode_offset % EXT2_INODES_PER_BLOCK(fs);
data = get_cache(fs->fs_dev, block_num);
+ if (!data)
+ return NULL;
return (const struct ext2_inode *)
(data + block_off * EXT2_SB(fs)->s_inode_size);
@@ -164,7 +166,7 @@ static struct inode *ext2_iget_by_inr(struct fs_info *fs, uint32_t inr)
struct inode *inode;
e_inode = ext2_get_inode(fs, inr);...
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
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...<< 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 * shft_per_blk);
+ return 0;
+ }
+
+ blk = get_cache(fs->fs_dev, frag_to_blk(fs, start));
+ index = (block >> (levels * shft_per_blk)) & mask_per_blk;
+ start = get_blkaddr(blk, index, UFS_SB(fs)->addr_shift);
+ }
+
+ return scan_set_nblocks(blk, index, UFS_SB(fs)->addr_shift,
+ addr_count - index, nblocks);
+}
+
+/*
+ * Handle the t...
2013 Jul 12
1
[PATCH 001/001] core/fs: Add support to Unix File system 1/2.
...<< 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 * shft_per_blk);
+ return 0;
+ }
+
+ blk = get_cache(fs->fs_dev, frag_to_blk(fs, start));
+ index = (block >> (levels * shft_per_blk)) & mask_per_blk;
+ start = get_blkaddr(blk, index, UFS_SB(fs)->addr_shift);
+ }
+
+ return scan_set_nblocks(blk, index, UFS_SB(fs)->addr_shift,
+ addr_count - index, nblocks);
+}
+
+/*
+ * Handle the t...
2017 Aug 27
1
[PATCH] ext4: Fix 64bit feature
...- "
"block_group = %d, groups_count = %d",
group_num, sbi->s_groups_count);
-
return NULL;
}
@@ -49,8 +44,17 @@ ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
desc_block += sbi->s_first_data_block + 1;
- desc_data_block = get_cache(fs->fs_dev, desc_block);
- return &desc_data_block[desc_index];
+ p = get_cache(fs->fs_dev, desc_block);
+ return p + sbi->s_desc_size * desc_index;
+}
+
+/*
+ * get the group's descriptor of group_num
+ */
+static inline const struct ext2_group_desc *
+ext2_get_group_desc(struct fs_inf...
2019 Jun 09
2
[Bug 13991] New: rsync --delete --one-file-system skips deletes after crossing filesystems on destination.
...ot at arden-lt tmp]#
-----------------------
[OK it's not very good removing lost+found, but that's not the problem].
I think the problem is the code in delete_in_dir() in generator.c:
if (one_file_system) {
if (file->flags & FLAG_TOP_DIR)
filesystem_dev = *fs_dev;
else if (filesystem_dev != *fs_dev)
return;
}
As far as I can tell this is unnecessary. --one-file-system should only check
the source filesystems not the destination filesystems.
This code can cause worse problems too. I haven't figured out the simplest way
of demons...
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
...e it and/or
* modify it under the terms of the GNU General Public License as
@@ -331,7 +331,7 @@ out:
return NULL;
}
-static inline int xfs_read_superblock(struct fs_info *fs, xfs_sb_t *sb)
+static inline int xfs_read_sb(struct fs_info *fs, xfs_sb_t *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 faile...
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
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...+ p_ops = ops;
while ((blk_shift < 0) && *ops) {
/* set up the fs stucture */
@@ -420,7 +432,7 @@ void fs_init(const struct fs_ops **ops, void *priv)
while (1)
;
}
- this_fs = &fs;
+ root_fs = this_fs = &fs;
/* initialize the cache */
if (fs.fs_dev && fs.fs_dev->cache_data)
@@ -434,8 +446,8 @@ void fs_init(const struct fs_ops **ops, void *priv)
}
if (fs.fs_ops->chdir_start) {
- if (fs.fs_ops->chdir_start() < 0)
- printf("Failed to chdir to start directory\n");
+ if (fs.fs_ops->chdir_start()...
2009 Aug 13
3
DO NOT REPLY [Bug 6636] New: Deallocation of a pointer not malloced
...)
at generator.c:198
#5 0x0000b970 in delete_dir_contents (fname=0xbfffd118 "...", flags=4) at
generator.c:304
#6 0x0000bab8 in delete_item (fbuf=0xbfffd118 "...", mode=16832, flags=2) at
generator.c:179
#7 0x0000c2a8 in delete_in_dir (fbuf=0x4fdf88 "...", file=0x6,
fs_dev=0x11b05e0) at generator.c:536
#8 0x00011288 in generate_files (f_out=1, local_name=0x4aeb54 "...") at
generator.c:2245
#9 0x0001d004 in do_recv (f_in=0, f_out=1, local_name=0x0) at main.c:830
#10 0x0001da00 in start_server (f_in=0, f_out=1, argc=1, argv=0xbfffe444) at
main.c:940
#11 0x0...
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...size_t ret;
- buf = malloc(c * XFS_INFO(fs)->dirblksize);
+ buf = malloc(len);
if (!buf)
malloc_error("buffer memory");
+ memset(buf, 0, len);
- 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;
}
-...
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