search for: nr_devices

Displaying 20 results from an estimated 40 matches for "nr_devices".

2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
...aemon/btrfs.c b/daemon/btrfs.c index ae2310b53..5f1e5d1d0 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -152,7 +152,7 @@ do_mkfs_btrfs (char *const *devices, int leafsize, const char *label, const char *metadata, int nodesize, int sectorsize) { - const size_t nr_devices = count_strings (devices); + const size_t nr_devices = guestfs_int_count_strings (devices); const size_t MAX_ARGS = nr_devices + 64; const char *argv[MAX_ARGS]; size_t i = 0, j; @@ -500,7 +500,7 @@ do_btrfs_subvolume_list (const mountable_t *fs) guestfs_int_btrfssubvolume_list *ret =...
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to https://bugzilla.redhat.com/1804207, in fact I believe this commit could be applied independently. It's a simple optimization. Rich.
2017 Jun 09
1
[PATCH] daemon: ldm: Use CLEANUP_FREE on list of static strings.
...devices’ API. --- daemon/ldm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/ldm.c b/daemon/ldm.c index 8ad2fb33b..7753b0d82 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -316,7 +316,7 @@ do_ldmtool_scan_devices (char * const * devices) { char **ret; size_t i, nr_devices; - CLEANUP_FREE_STRING_LIST const char **argv = NULL; + CLEANUP_FREE const char **argv = NULL; int r; CLEANUP_FREE char *out = NULL, *err = NULL; -- 2.13.0
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
...4a1 100644 --- a/daemon/devsparts.mli +++ b/daemon/devsparts.mli @@ -21,5 +21,6 @@ val list_partitions : unit -> string list val part_to_dev : string -> string val part_to_partnum : string -> int val is_whole_device : string -> bool +val is_partitioned_device : string -> bool val nr_devices : unit -> int val device_index : string -> int -- 2.9.5
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...(gb, g_gb, int, S_IRUGO); +module_param_named(gb, g_gb, int, 0444); MODULE_PARM_DESC(gb, "Size in GB"); static int g_bs = 512; -module_param_named(bs, g_bs, int, S_IRUGO); +module_param_named(bs, g_bs, int, 0444); MODULE_PARM_DESC(bs, "Block size (in bytes)"); static int nr_devices = 1; -module_param(nr_devices, int, S_IRUGO); +module_param(nr_devices, int, 0444); MODULE_PARM_DESC(nr_devices, "Number of devices to register"); static bool g_blocking; -module_param_named(blocking, g_blocking, bool, S_IRUGO); +module_param_named(blocking, g_blocking, bool, 0444);...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...(gb, g_gb, int, S_IRUGO); +module_param_named(gb, g_gb, int, 0444); MODULE_PARM_DESC(gb, "Size in GB"); static int g_bs = 512; -module_param_named(bs, g_bs, int, S_IRUGO); +module_param_named(bs, g_bs, int, 0444); MODULE_PARM_DESC(bs, "Block size (in bytes)"); static int nr_devices = 1; -module_param(nr_devices, int, S_IRUGO); +module_param(nr_devices, int, 0444); MODULE_PARM_DESC(nr_devices, "Number of devices to register"); static bool g_blocking; -module_param_named(blocking, g_blocking, bool, S_IRUGO); +module_param_named(blocking, g_blocking, bool, 0444);...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...4a1 100644 --- a/daemon/devsparts.mli +++ b/daemon/devsparts.mli @@ -21,5 +21,6 @@ val list_partitions : unit -> string list val part_to_dev : string -> string val part_to_partnum : string -> int val is_whole_device : string -> bool +val is_partitioned_device : string -> bool val nr_devices : unit -> int val device_index : string -> int diff --git a/daemon/listfs.ml b/daemon/listfs.ml index 370ffb4..1349ae0 100644 --- a/daemon/listfs.ml +++ b/daemon/listfs.ml @@ -25,39 +25,18 @@ let rec list_filesystems () = let has_ldm = Ldm.available () in let devices = Devsparts.list...
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html. v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html. v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
Instead of parsing 'parted' output OCaml implementation relies on the following facts: 1. The function is applicable for MBR partitions only (as noted in documentation and as function name suggests). 2. An attempt to call the function for non-MBR partition fails with "part_get_mbr_part_type can only be used on MBR Partitions" error and NULL is returned. 3. MBR partition table
2018 Jan 22
8
[RFC] Inconsistent output of guestfs_list_filesystems
Before I rush to change something I request your comments on the subject. Let me know what do you think and if it does make sense. The issue: guesfs_list_filesystems is inconsistent in its output. For, example, it filters out partitioned physical devices but doesn't do the same for MD devices. More over, according to its name and API documentation guestfs_list_filesystem should return
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...rk for guests that have a single block + * device. + * + * So the main task here is to make sure the assumptions above are + * true. + * + * XXX Use hints from virt-p2v if available. + * See also: https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3 + *) +and resolve_diskbyid part default = + let nr_devices = Devsparts.nr_devices () in + + (* If #devices isn't 1, give up trying to translate this fstab entry. *) + if nr_devices <> 1 then + default + else ( + (* Make the partition name and check it exists. *) + let dev = sprintf "/dev/sda%d" part in + if is_partition d...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...rk for guests that have a single block + * device. + * + * So the main task here is to make sure the assumptions above are + * true. + * + * XXX Use hints from virt-p2v if available. + * See also: https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3 + *) +and resolve_diskbyid part default = + let nr_devices = Devsparts.nr_devices () in + + (* If #devices isn't 1, give up trying to translate this fstab entry. *) + if nr_devices <> 1 then + default + else ( + (* Make the partition name and check it exists. *) + let dev = sprintf "/dev/sda%d" part in + if is_partition d...
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html I believe this addresses everything raised in comments on that patch series. Rich.
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...ndation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val list_devices : unit -> string list -val list_partitions : unit -> string list -val part_to_dev : string -> string -val part_to_partnum : string -> int -val is_whole_device : string -> bool -val nr_devices : unit -> int -val device_index : string -> int diff --git a/daemon/file.mli b/daemon/file.mli deleted file mode 100644 index 1e1631840..000000000 --- a/daemon/file.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* guestfs-inspection - * Copyright (C) 2009-2018 Red Hat Inc. - * - * This program is free...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...ndation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val list_devices : unit -> string list -val list_partitions : unit -> string list -val part_to_dev : string -> string -val part_to_partnum : string -> int -val is_whole_device : string -> bool -val nr_devices : unit -> int -val device_index : string -> int diff --git a/daemon/file.mli b/daemon/file.mli deleted file mode 100644 index 1e1631840..000000000 --- a/daemon/file.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* guestfs-inspection - * Copyright (C) 2009-2018 Red Hat Inc. - * - * This program is free...
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.