From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web09.4993.1608158781209237643 for ; Wed, 16 Dec 2020 14:46:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PgppbbdZ; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608158780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ix3K0YRJ4W1hDiEMl+lIk+aqHPvFqzXKBQvWNM24fD4=; b=PgppbbdZ7X7NMAej/QjLW9cbGMdfic9+mqcY6mbeQK3urGScEvH9SDy/Q75rJs+sKbnLBR 7V5E7qOTLGncKOkSLbQAu364a7uF3av/SzLaRArPc2WqEter9edFGct00uPsqaTdrl5Hky SGFWjb9fM2ZCBoMf5JgJzNEt3XYNfkg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-ghPLVSt8Nh28W0J2m9nyuw-1; Wed, 16 Dec 2020 17:46:15 -0500 X-MC-Unique: ghPLVSt8Nh28W0J2m9nyuw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BC1710054FF; Wed, 16 Dec 2020 22:46:14 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-152.ams2.redhat.com [10.36.114.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C62110013C0; Wed, 16 Dec 2020 22:46:09 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io, virtio-fs@redhat.com, lersek@redhat.com Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2 PATCH 45/48] OvmfPkg/VirtioFsDxe: add helper for determining file size update Date: Wed, 16 Dec 2020 22:11:22 +0100 Message-Id: <20201216211125.19496-46-lersek@redhat.com> In-Reply-To: <20201216211125.19496-1-lersek@redhat.com> References: <20201216211125.19496-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 QWRkIHRoZSBWaXJ0aW9Gc0dldEZ1c2VTaXplVXBkYXRlKCkgZnVuY3Rpb24sIGZvciBkZXRlcm1p bmluZyB3aGV0aGVyIGFuCkVGSV9GSUxFX1BST1RPQ09MLlNldEluZm8oKSBpbnZvY2F0aW9uIHJl cXVlc3RzIGEgZmlsZSBzaXplIHVwZGF0ZS4KCkNjOiBBcmQgQmllc2hldXZlbCA8YXJkLmJpZXNo ZXV2ZWxAYXJtLmNvbT4KQ2M6IEpvcmRhbiBKdXN0ZW4gPGpvcmRhbi5sLmp1c3RlbkBpbnRlbC5j b20+CkNjOiBQaGlsaXBwZSBNYXRoaWV1LURhdWTDqSA8cGhpbG1kQHJlZGhhdC5jb20+ClJlZjog aHR0cHM6Ly9idWd6aWxsYS50aWFub2NvcmUub3JnL3Nob3dfYnVnLmNnaT9pZD0zMDk3ClNpZ25l ZC1vZmYtYnk6IExhc3psbyBFcnNlayA8bGVyc2VrQHJlZGhhdC5jb20+Ci0tLQogT3ZtZlBrZy9W aXJ0aW9Gc0R4ZS9WaXJ0aW9Gc0R4ZS5oIHwgIDggKysrKwogT3ZtZlB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