appropriately.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Joerg Roedel <j...@8bytes.org>
CC: "K. Y. Srinivasan" <k
On 02/19/2016 02:25 PM, Andrey Smetanin wrote:
Pass the return code from kvm_emulate_hypercall on to the caller,
in order to allow it to indicate to the userspace that
the hypercall has to be handled there.
Also adjust all the existing code paths to return 1 to make sure the
hypercall isn't
Currently we do not support Hyper-V hypercall continuation
so reject it.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Joerg Roedel <
lls
https://jira.sw.ru/browse/PSBM-44419
Andrey Smetanin (5):
ms/kvm/x86: Rename Hyper-V long spin wait hypercall
ms/drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header
ms/kvm/x86: Pass return code of kvm_emulate_hypercall
ms/kvm/x86: Reject Hyper-V hypercall continuation
ms/
VMBus hypercall codes inside Hyper-V UAPI header will
be used by QEMU to implement VMBus host devices support.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Acked-by: K. Y. Srinivasan <k...@microsoft.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapo
off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Joerg Roedel <j...@8bytes.org>
CC: "K. Y. Srinivasan" <k...@microsoft.com>
CC: Haiya
Rename HV_X64_HV_NOTIFY_LONG_SPIN_WAIT by HVCALL_NOTIFY_LONG_SPIN_WAIT,
so the name is more consistent with the other hypercalls.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Pa
appropriately.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Joerg Roedel <j...@8bytes.org>
CC: "K. Y. Srinivasan" <k
Use is_64_bit_mode() helper'
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
On 02/10/2016 06:17 PM, Andrey Smetanin wrote:
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
d
o,
Virtuozzo Linux Kernel Team
On 02/10/2016 06:17 PM, Andrey Smetanin wrote:
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index
HV_X64_MSR_RESET msr is used by Hyper-V based Windows guest
to reset guest VM by hypervisor.
Necessary to support loading of winhv.sys in guest, which in turn is
required to support Windows VMBus.
ms commit e516cebb4f2b2057a5a421fea589079502acfff6.
Signed-off-by: Andrey Smetanin <asm
vcpu task.
Necessary to support loading of winhv.sys in guest, which in turn is
required to support Windows VMBus.
ms commit 9eec50b8bbe1535c440a1ee88c1958f78fc55957.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off
This struct is required for Hyper-V SynIC timers implementation inside KVM
and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
Hyper-V UAPI header.
ms commit - 5b423efe11e822e092e8c911a6bad17eadf718eb.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Acked
:
* added KVM_EXIT_HYPERV types and structs notes into docs
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 8102d69..a8160d2 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@
The loop(for) inside irqfd_update() is unnecessary
because any other value for irq_entry.type will just trigger
schedule_work(>inject) in irqfd_wakeup.
ms commit 351dc6477cd35136ce4668401b1b1332a62908a8.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman K
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 625223b..5828875 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x
This struct is required for Hyper-V SynIC timers implementation inside KVM
and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
Hyper-V UAPI header.
ms commit - c71acc4c74dddeeede69fdd4f0b1a124f9df.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
CC
PERV_SYNIC and KVM_IRQ_ROUTING_HV_SINT notes into
docs
Changes v2:
* do not use posted interrupts for Hyper-V SynIC AutoEOI vectors
* add Hyper-V SynIC vectors into EOI exit bitmap
* Hyper-V SyniIC SINT msr write logic simplified
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <r
This constant is required for Hyper-V SynIC timers MSR's
support by userspace(QEMU).
ms commit - 4f39bcfd1c132522380138a323f9af7902766301.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Acked-by: K. Y. Srinivasan <k...@microsoft.com>
Reviewed-by: Roman Kagan <rka...@vi
Any other irq routing types (MSI, S390_ADAPTER, upcoming Hyper-V
SynIC) map one-to-one to GSI.
ms commit f33143d80907602deb1b96db42da93507ed03b31.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off-by: Denis
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 32d8d00..1467ba1 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x
Moved Hyper-V synic contants from guest Hyper-V drivers private
header into x86 arch uapi Hyper-V header.
Added Hyper-V synic msr's flags into x86 arch uapi Hyper-V header.
ms commit c75efa974e013640496620f26f0b532cb5cb17f9.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Re
on the module parameter and CPU
capability, and consulted whenever an APICv-specific action is
performed.
ms commit - d62caabb41f33d96333f9ef15e09cd26e1c12760.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off-by: Denis
This will be used in future to start Hyper-V SynIC timer
in several places by one logic in one function.
ms commit - f808495da56f28e94c6448125158f1175009fcfc.
Changes v2:
* drop stimer->count == 0 check inside stimer_start()
* comment stimer_start() assumptions
Signed-off-by: Andrey Smeta
c9a5eccac1abf50649949f15754a7635f263a1ff.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
CC: Vitaly Kuznetsov <vkuzn...@redhat.com>
CC: "K. Y. Srinivasan" <k...@microsoft.com>
CC:
The function stimer_stop() is called in one place
so remove the function and replace it's call by function
content.
ms commit - 019b9781ccd667d4160f3636c8735e3baa08.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gle
QEMU zero-inits Hyper-V SynIC vectors. We should allow that,
and don't reject zero values if set by the host.
ms commit - 7be58a6488a9d36886d9423a1ed54fe104c7b182.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gle
3.1):
"It is not permitted to set the SINTx field to zero for an
enabled timer. If attempted, the timer will be
marked disabled (that is, bit 0 cleared) immediately."
ms commit - 23a3b201fd187f1e7af573b3794c3c5ebf7d2c06.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Revie
Factor out kvm_notify_acked_gsi() helper to iterate over EOI listeners
and notify those matching the given gsi.
It will be reused in the upcoming Hyper-V SynIC implementation.
ms commit ba1aefcd6db5536d3eb3ca3ce7bd6786960140ea.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Re
e timer then never fires.
The patch fixes such situation by not stopping Hyper-V SynIC timer
at all, because it's safe to restart it without stop in vcpu context
and timer callback always returns HRTIMER_NORESTART.
ms commit - 481d2bcc8454a44811db2bb68ac216fc6c5a23db.
Signed-off-by: Andre
.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: "K. Y. Srinivasan" <k...@microsoft.com>
CC: Haiyang Zhang <haiya...
ms commit - 0ae80384b257b0a1ffa4e5d9eab2eb559bb063c5.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: "K. Y. Srinivasan" <
Trace the following Hyper SynIC events:
* set msr
* set sint irq
* ack sint
* sint irq eoi
ms commit - 18659a9cb1885d00dd428f8857f7f628e54a45ee.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com&g
Trace the following Hyper SynIC timers events:
* periodic timer start
* one-shot timer start
* timer callback
* timer expiration and message delivery result
* timer config setup
* timer count setup
* timer cleanup
ms commit - ac3e5fcae8ca658e7dcc3fdcd50af7e4779f58c1.
Signed-off-by: Andrey
enum hv_message_type inside struct hv_message, hv_post_message
is not size portable. Replace enum by u32.
ms commit - 7797dcf63f11b6e1d34822daf2317223d0f4ad46.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...
.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Roman Kagan <rka...@virtuozzo.com>
CC: Denis V. Lunev <d...@openvz.org>
CC: qemu-d
d is
shortened until the timer catches up) will be implemented later.
ms commit - 1f4b34f825e8cef6f493d06b46605384785b3d16.
Changes v2:
* Use remainder to calculate periodic timer expiration time
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtu
This helper will be used also in Hyper-V SynIC timers implementation.
ms commit - 93bf4172481c4b2a8544c83a687946252563edd0.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Pa
commit 11c4b1ca719eaaa5ca6fe0e80bb009f3f2012fd2.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Gleb Natapov <g...@kerne
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 1467ba1..8102d69 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hy
This rearrangement places functions declarations together
according to their functionality, so future additions
will be simplier.
ms commit - e18eaeed2b056094a5626288d47ceefc740c90e5.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozz
to be processed after KVM_REQ_CLOCK_UPDATE).
ms commit - f3b138c5d89a1f74a2b46adaa1067aea9a7e3cbb.
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com&
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
---
arch/x86/kvm/hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 5828875..32d8d00 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -
patches contains:
* Hyper-V RESET, VP_INDEX, VP_RUNTIME msr's support
* Hyper-V synthetic interrupt controller(SynIC)
* Hyper-V SynIC timers
https://jira.sw.ru/browse/PSBM-32435
Andrey Smetanin (36):
kvm/x86: Coding style fixes
kvm/x86: Vcpu based page access routines usage
kvm/x86: get
ms commit - e83d58874ba1de74c13d3c6b05f95a023c860d25
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack <peterhorny...@google.com>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Gleb Natapov
From: Anup Patel
Currently, we don't have an exit reason to notify user space about
a system-level event (for e.g. system reset or shutdown) triggered
by the VCPU. This patch adds exit reason KVM_EXIT_SYSTEM_EVENT for
this purpose. We can also inform user space about the
Added kvm Hyper-V context hv crash variables as storage
of Hyper-V crash msrs.
ms commit - e7d9513b60e87f62e41090fa3a26eca796924346
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack <peterhorny...
Added Hyper-V crash msrs values - HV_X64_MSR_CRASH*.
ms commit - a88464a8b0ffb2f8dfb69d3ab982169578b50f22
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack <peterhorny...@google.com>
CC: Pa
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack <peterhorny...@google.com>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Gleb Natapov <g...@kernel.org>
Signed-off-by: Paol
is to provide functionality equal to pvpanic device without
QEMU guest agent for Windows.
The idea is borrowed from Linux HyperV bus driver and validated against
Windows 2k12.
Andrey Smetanin (6):
kvm: add hyper-v crash msrs values
kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c file
kvm
vcpu_debug is useful macro like kvm_debug but additionally
includes vcpu context inside output.
ms commit - ee86dbc6e327062396748162b95309388c19faab
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack
x86.c
to hyperv.c.
ms commit - e83d58874ba1de74c13d3c6b05f95a023c860d25
Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Peter Hornyack <peterhorny...@google.com>
CC: Paolo Bonzini <pbonz...@redhat.com
pvd header m_DiskInUse field extended to store additinal
SIGNATURE_DISK_CLOSED_V21 value(will be used by backup software).
Disk in use checks replaced by pvd_header_is_disk_in_use().
https://jira.sw.ru/browse/PSBM-33882
Signed-off-by: Andrey Smetanin asmeta...@virtuozzo.com
---
drivers/block
When I created support of discard requests, process_bio_queue is
called from ploop_thread. So I use ploop_quiesceploop_relax for
synchronization. Now it is called from ploop_make_request too,
so my synchronization doesn't work any more.
The race was added by
After diff-ploop-add-a-separate-queue-for-discard-bio-s, ploop_thread()
skips processing previously queued discard bio-s if any discard bio is
already under processing (fbd-fbd_dbl is not empty).
ploop_wait() must take care about such a case, otherwise a busyloop may
happen: ploop_thread()
ploop_io_images_size is a global counter supposed to be total sum of io-size
for all io structs. However, actual size of image can be used by userspace.
E.g. when userspace grows lower delta for merge operartion. This means that
by the time ploop_dio_close() is called, actual size may differ
Memory leak (4 bytes) in the ploop_getdevice_ioc function.
217401 +static int ploop_getdevice_ioc(unsigned long arg)
217402 +{
217403 + int err;
217404 + int index = 0;
217405 + struct rb_node *n;
217406 +
The way how we kept ploop_io_images_size up-to-date (should be always
equal to total number of bytes of all loaded image files) was very prone
to errors: first delta loaded kept actual io-size, then backup delta was
initialized with io-size=0; since then, if first delta was unloaded before
the
In case of sync requests coming through allocate-new-block path, it is
incorrect to delay wakeup of fsync-thread. Sync request should always
be processed as soon as possible.
https://jira.sw.ru/browse/PSBM-22381
Signed-off-by: Maxim Patlasov mpatla...@parallels.com
---
Reading from unallocated blocks returns zeroes =
we can safely skip writes of zeroes to unallocated blocks.
As a lot of tests do dd if=/dev/zero ..., this optimization is valuable.
Feature enabled, test results:
[root@p2 ~]# echo 1 /sys/block/ploop37803/ptune/check_zeros
[root@p2 ~]# dd
map_release() are not atomic, because it calls atomic_read
and atomic_dec_and_test. Looks like it was designed to be
called under plo-lock.
https://jira.sw.ru/browse/PSBM-23905
Signed-off-by: Andrey Vagin ava...@openvz.org
Acked-by: Maxim Patlasov mpatla...@parallels.com
---
customer created an online backup = backup.tib file. Most probably the
.tib file is inconsistent and in order to correctly access data inside
we need to replay the journal.
= We have to provide to container a bundle of .tib file (read-only) and
a tiny read-writeable ploop delta - journal
Before merge, we move top-delta to a temporary plo-trans_map list. Since
then, it's not present in the main plo-map list anymore. If merge failed,
we must put it back to plo-map. Otherwise the delta will be lost forever
(visible in /sys/block/ploop*/pdelta/*, but not accessible from ploop).
Signed-off-by: Dmitry Monakhov dmonak...@openvz.org
---
drivers/block/ploop/sysfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/ploop/sysfs.c b/drivers/block/ploop/sysfs.c
index 3ef53ac..07a4829 100644
--- a/drivers/block/ploop/sysfs.c
+++ b/drivers/block/ploop/sysfs.c
@@
People complain that it's not always obvious why an app in CT gets
-ENOSPC while there remains some space on host filesystem.
The patch adds time ratelimited printk about disk full condition.
Maximal rate is 1 per hour.
https://bugzilla.openvz.org/show_bug.cgi?id=3045
Signed-off-by: Maxim
When I created support of discard requests, process_bio_queue is
called from ploop_thread. So I use ploop_quiesceploop_relax for
synchronization. Now it is called from ploop_make_request too,
so my synchronization doesn't work any more.
The race was added by
previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin asmeta
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
of nullified blocks. This patch does
it by marking preq via PLOOP_REQ_FORCE_FUA flag.
https://jira.sw.ru/browse/PSBM-31969
Signed-off-by: Andrey Smetanin asmeta...@parallels.com
Acked-by: Andrew Vagin ava...@parallels.com
---
drivers/block/ploop/map.c | 10 +++---
1 file changed, 7 insertions
Umounting ploop device if inner fs is still mounted on it leads to
numerous complains in kernel logs like:
VFS: Busy inodes after unmount. sb = 880108987000, fs type = ext4, sb count
= 2, sb-s_root = /
and is not what user expected. The patch adds some protection from dummy
userspace
We have not implemented the support of sparce files yet. Let's at least
print a message more descriptive than common:
[ 3460.838071] ploop_set_error=-22 on ploop44006
Changed in v2:
- used ploop_msg_once for reporting partially uninitialized extent
https://jira.sw.ru/browse/PSBM-20770
iblk stands for image-file block number. Its size is the same as u32. The size
of 'sector' is the same as long. While converting the former to the latter
like this: sec = iblk shift, we must always cast 'iblk' to long. And we
actually do in most cases. The patch fixes a place in io_direct module
Avoid 512-bytes reads/writes. They were used by 'expanded' format module
to get and save format header. Let's use 4K reads/writes instead.
Customer's problem:
[root@pcstest10 ~]# ploop mount /vz3/test.hdd
add delta dev=/dev/ploop19025 img=/vz3/test.hdd (rw)
Can't add image /vz3/test.hdd:
Ploop uses -read_page and -write_page methods of pio_direct to read/write
index table. These operations are rare and usually someone is blocked on them.
Let's give them a priority by setting SYNCIO flag.
Signed-off-by: Maxim Patlasov mpatla...@parallels.com
---
drivers/block/ploop/io_direct.c |
The patch shows number of opened instances of ploop-device (plo-open_count)
in /sys/block/ploopN/pstate/open_count. This will allow userspace to decide
whether a ploop-device is used by someone (e.g. backup) by scanning the
open_count for all ploop-devices.
https://jira.sw.ru/browse/PSBM-24754
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
we MUST wait for writeback to finish before file-f_op-fsync.
https://jira.sw.ru/browse/PSBM-18049
Signed-off-by: Dmitry Monakhov dmonak...@openvz.org
Acked-by: Maxim V. Patlasov mpatla...@parallels.com
---
drivers/block/ploop/io_direct.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
Return error if userspace attepmts to grow block device above limits
imposed by ploop1 formats.
https://jira.sw.ru/browse/PSBM-21027
Signed-off-by: Maxim Patlasov mpatla...@parallels.com
---
drivers/block/ploop/fmt_ploop1.c | 4
drivers/block/ploop/ploop1_image.h | 13 +
2
ploop_tracker_init() may acquire current alloc_head only after quiescing
ploop. Otherwise a race is possible:
1) we acuire an alloc_head:
e.end = (u64)ploop_top_delta(plo)-io.alloc_head (plo-cluster_log + 9);
2) then the alloc_head is advanced due to submit_alloc writes
3) we turn write
Based on crash analysis, one of extents from ploop em-tree is bad:
883fe6230ae0
start = 19380224
end = 19447808
block_start = 0
refs = {
counter = 1
}
ploop never calculates em-block_start other than by direct assigning:
em-block_start = fi_extent.fe_physical 9;
The patch
Spurious complains were triggered by fiemap-ahead logic of pio_direct module.
Fix it by suppressing complains if fiemap behind EOF failed. Also print
more details about a hole.
Signed-off-by: Maxim Patlasov mpatla...@parallels.com
Acked-by: Andrew Vagin ava...@parallels.com
---
The first thing dio_submit_alloc() does is incrementing io-alloc_head. In case
of errors it doesn't roll back io-alloc_head becuase ploop will go to
aborted state anyway and any write requests will fail immediately.
But there is one exception: in case of ENOSPC, dio_submit_alloc() must
decrement
There is a check_zero feature allowing to skip zero writes if image-block
is not allocated yet for given preq-req_cluster. But this means that inner-fs
will hope to read zero from that range afterwards. Hence, while allocating
the image-block we *must* zero it. We always do so in submit_alloc, but
Signed-off-by: Andrey Smetanin asmeta...@virtuozzo.com
---
drivers/block/ploop/dev.c | 14 --
drivers/block/ploop/freeblks.c | 4 +++-
include/linux/ploop/compat.h | 6 +-
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/block/ploop/dev.c b/drivers
After diff-ploop-add-a-separate-queue-for-discard-bio-s, ploop_thread()
skips processing previously queued discard bio-s if any discard bio is
already under processing (fbd-fbd_dbl is not empty).
ploop_wait() must take care about such a case, otherwise a busyloop may
happen: ploop_thread()
to mark req to FLUSH previously written(without FUA) data.
Performance:
Overall(includes EXT4 resize upto 16T) resize performance degradated by -5% of
time.
https://jira.sw.ru/browse/PSBM-31222
https://jira.sw.ru/browse/PSBM-31225
https://jira.sw.ru/browse/PSBM-31321
Signed-off-by: Andrey Smetanin
-by: Andrey Smetanin asmeta...@virtuozzo.com
---
drivers/block/ploop/dev.c| 32 +++-
drivers/block/ploop/fmt_ploop1.c | 2 +-
drivers/block/ploop/io_direct.c | 20 ++--
drivers/block/ploop/io_kaio.c| 16
drivers/block/ploop
dio_fsync_thread must call filemap_fdatawrite() before file-f_op-fsync().
Otherwise:
8,06 82 0.003095587 12328 D WS 441706496 + 512 [ploop19054]
8,06 83 0.003103726 12328 D WS 441707008 + 512 [ploop19054]
8,06 84 0.003108627 12328 D WS
(no logic changes) port for RHEL7 of Andrew Vagin
original patch (RHEL6).
Signed-off-by: Andrew Vagin ava...@openvz.org
Signed-off-by: Andrey Smetanin asmeta...@odin.com
---
drivers/block/ploop/dev.c | 54 ++
drivers/block/ploop/freeblks.c | 5
drivers
93 matches
Mail list logo