search for: do_fstrim

Displaying 20 results from an estimated 44 matches for "do_fstrim".

2016 Aug 12
4
[PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).
...s can do since fstrim is such a complex topic interacting with all filesystem and storage layers. --- v2v/v2v.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index e221f29..8365aae 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -397,11 +397,7 @@ and do_fstrim g inspect = if mounted then ( try g#fstrim "/" with G.Error msg -> - (* Only emit this warning when debugging, because otherwise - * it causes distress (RHBZ#1168144). - *) - if verbose () then - warning (f_&quot...
2016 Aug 12
2
Re: [PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).
...layers. > > --- > > v2v/v2v.ml | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > diff --git a/v2v/v2v.ml b/v2v/v2v.ml > > index e221f29..8365aae 100644 > > --- a/v2v/v2v.ml > > +++ b/v2v/v2v.ml > > @@ -397,11 +397,7 @@ and do_fstrim g inspect = > > if mounted then ( > > try g#fstrim "/" > > with G.Error msg -> > > - (* Only emit this warning when debugging, because otherwise > > - * it causes distress (RHBZ#1168144). > > - *)...
2015 Oct 20
1
[PATCH v3 09/13] v2v: drop redundant umount_all() and shutdown()
umount_all() and shutdown() are performed by guestfs automatically on close(), so drop explicit calls to them right before close(). Also umount_all() in the middle of processing doesn't look justified so drop it, too. (The only step following it is do_fstrim() which does mounting/umounting on its own). Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- v2v/v2v.ml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index cc36422..c28905d 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -87,8 +87,6 @@ let rec main () =...
2016 Apr 26
4
v2v: Remove --no-trim, --vmtype options and other fixes.
The first two patches implement the change discussed here: https://www.redhat.com/archives/libguestfs/2016-April/msg00178.html The third patch fixes the mapping of inspection data to OVF VmType which was inherited directly from old virt-v2v and had never been changed. It had a number of problems. The fourth patch is only slightly related to the others. It adds an extra slow test to ensure that
2023 Mar 07
1
[V2V PATCH v2 3/5] convert: introduce "block_driver" convert option
...rec convert dir options source = (* Conversion. *) let guestcaps = do_convert g source inspect i_firmware - options.keep_serial_console options.static_ips in + options.block_driver options.keep_serial_console options.static_ips in g#umount_all (); @@ -221,7 +222,8 @@ and do_fstrim g inspect = ) fses (* Conversion. *) -and do_convert g source inspect i_firmware keep_serial_console interfaces = +and do_convert g source inspect i_firmware + block_driver keep_serial_console interfaces = (match inspect.i_product_name with | "unknown" ->...
2023 Mar 10
1
[V2V PATCH v3 3/6] convert: introduce "block_driver" convert option
...rec convert dir options source = (* Conversion. *) let guestcaps = do_convert g source inspect i_firmware - options.keep_serial_console options.static_ips in + options.block_driver options.keep_serial_console options.static_ips in g#umount_all (); @@ -221,7 +222,8 @@ and do_fstrim g inspect = ) fses (* Conversion. *) -and do_convert g source inspect i_firmware keep_serial_console interfaces = +and do_convert g source inspect i_firmware + block_driver keep_serial_console interfaces = (match inspect.i_product_name with | "unknown" ->...
2016 Aug 05
0
[PATCH 2/4] daemon: fstrim: Turn "discard operation is not supported" into ENOTSUP.
...where it prints this specific error message, turn that into errno ENOTSUP. --- daemon/fstrim.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon/fstrim.c b/daemon/fstrim.c index 1ad3630..527acfd 100644 --- a/daemon/fstrim.c +++ b/daemon/fstrim.c @@ -105,7 +105,13 @@ do_fstrim (const char *path, r = commandv (&out, &err, argv); if (r == -1) { - reply_with_error ("%s", err); + /* If the error is about the kernel operation not being supported + * for this filesystem type, then return errno ENOTSUP here. + */ + if (strstr (err, &qu...
2016 Aug 12
0
[PATCH 2/2] v2v: Add -o discard option when fstrimming.
...virt-sparsify --in-place does, and that utility has been tested a lot more in regards to trimming. --- v2v/v2v.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 8365aae..8ae3dec 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -393,7 +393,10 @@ and do_fstrim g inspect = List.iter ( fun dev -> g#umount_all (); - let mounted = try g#mount dev "/"; true with G.Error _ -> false in + let mounted = + try g#mount_options "discard" dev "/"; true + with G.Error _ -> false in +...
2016 Aug 12
0
Re: [PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).
...interacting with all filesystem and storage layers. > --- > v2v/v2v.ml | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/v2v/v2v.ml b/v2v/v2v.ml > index e221f29..8365aae 100644 > --- a/v2v/v2v.ml > +++ b/v2v/v2v.ml > @@ -397,11 +397,7 @@ and do_fstrim g inspect = > if mounted then ( > try g#fstrim "/" > with G.Error msg -> > - (* Only emit this warning when debugging, because otherwise > - * it causes distress (RHBZ#1168144). > - *) > - if verbose ()...
2016 Aug 15
0
Re: [PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).
...v/v2v.ml | 6 +----- > > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > > > diff --git a/v2v/v2v.ml b/v2v/v2v.ml > > > index e221f29..8365aae 100644 > > > --- a/v2v/v2v.ml > > > +++ b/v2v/v2v.ml > > > @@ -397,11 +397,7 @@ and do_fstrim g inspect = > > > if mounted then ( > > > try g#fstrim "/" > > > with G.Error msg -> > > > - (* Only emit this warning when debugging, because otherwise > > > - * it causes distress (RHBZ#1168144)....
2015 Nov 10
3
[PATCH] v2v: Make the interface between cmdline.ml and v2v.ml
I'm interested to hear opinions on whether this makes the code clearer, or not. This is virt-v2v, but many other virt-* tools work the same way, and analogous changes could be made. Currently when command line argument parsing is done in 'cmdline.ml' the list of parsed parameters is passed to the main program in a very long tuple. Each parameter is strongly typed, but not named (so
2015 Aug 11
41
[PATCH v2 00/17] v2v: add --in-place mode
This series is a second attempt to add a mode of virt-v2v operation where it leaves the config and disk image conversion, rollback on errors, registering with the destination hypervisor, etc. to a third-party toolset, and performs only tuning of the guest OS to run in the KVM-based hypervisor. The first 14 patches are just refactoring and rearrangement of the code, factoring the implementation
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...in + let keep_serial_console = + if not in_place then output#keep_serial_console + else true in let guestcaps = do_convert g inspect source keep_serial_console in if no_trim <> ["*"] && (do_copy || debug_overlays) then ( @@ -906,9 +928,14 @@ let main () = do_fstrim g no_trim inspect; ); - message (f_"Closing the overlay"); + message (f_"Closing the %s") guestfs_kind; g#close (); + if in_place then ( + message (f_"Finishing off"); + exit 0 + ); + let target_firmware = get_target_firmware inspect guestcaps so...
2015 Aug 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
...py || debug_overlays) then ( (* Doing fstrim on all the filesystems reduces the transfer size * because unused blocks are marked in the overlay and thus do * not have to be copied. *) message (f_"Mapping filesystem data to avoid copying unused and blank areas"); do_fstrim g no_trim inspect; ); message (f_"Closing the %s") guestfs_kind; g#close (); if in_place then ( message (f_"Finishing off"); exit 0 ); let target_firmware = get_target_firmware inspect guestcaps source output in let target_buses = target_bus_assignment s...
2016 Aug 05
6
[PATCH 0/4] sparsify: Warn instead of error if a filesystem cannot be fstrimmed.
Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1364347
2023 Mar 06
2
[PATCH v2v] convert: Allow preferred block driver to be specified on the command line
This is just an outline patch, only compile tested. It doesn't make changes to virt-v2v-in-place, but those would be the same as made in v2v/v2v.ml. It reuses the existing Types.guestcaps_block_type which is a bit ugly but fairly practical. I've made the change to the documentation, but it needs a test. Rich.
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...rial_console + | In_place -> true + ) in let guestcaps = do_convert g inspect source keep_serial_console in if no_trim <> ["*"] && (do_copy || debug_overlays) then ( @@ -86,29 +111,34 @@ let rec main () = do_fstrim g no_trim inspect; ); - message (f_"Closing the overlay"); + message (f_"Closing the %s") guestfs_kind; g#close (); - let target_firmware = get_target_firmware inspect guestcaps source output in + (match conversion_mode with + | In_place -> () + | Copying (o...
2015 Aug 27
2
Re: [PATCH v2 15/17] v2v: add --in-place mode
On Tue, Aug 11, 2015 at 08:00:34PM +0300, Roman Kagan wrote: > + let overlays = > + if not in_place then create_overlays source.s_disks > + else [] in > + let targets = > + if not in_place then init_targets overlays source output output_format > + else [] in This doesn't solve the problem I raised before which is that overlays and targets should never be empty
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...printf "%s%!" (string_of_guestcaps guestcaps); guestcaps in (* Did we manage to install virtio drivers? *) @@ -306,7 +306,7 @@ let rec main () = * not have to be copied. *) msg (f_"Mapping filesystem data to avoid copying unused and blank areas"); - do_fstrim ~verbose g no_trim inspect; + do_fstrim g no_trim inspect; ); msg (f_"Closing the overlay"); @@ -332,7 +332,7 @@ let rec main () = fun i t -> msg (f_"Copying disk %d/%d to %s (%s)") (i+1) nr_disks t.target_file t.target_format; -...
2018 Aug 23
0
[PATCH v4] v2v: Add --print-estimate option to print copy size estimate.
...ze + | Some {pr} -> + pr "%Ld\n" estimated_size + ); + exit 0 + ); + message (f_"Assigning disks to buses"); let target_buses = Target_bus_assignment.target_bus_assignment source guestcaps in @@ -487,8 +505,6 @@ and do_fstrim g inspect = * sdb final estimate size = 3 - (3*1.35/4) = 1.9875 GB *) and estimate_target_size mpstats overlays = - let sum = List.fold_left (+^) 0L in - (* (1) *) let fs_total_size = sum ( diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index e6f08d1e6..a92ae9f88 100644 --- a...