From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.4883.1608157899824662842 for ; Wed, 16 Dec 2020 14:31:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qc/rSqKi; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608157899; 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=foKovO55M0yVd97FkvXH9HBFSz6MzSnKS7q1hpgA6so=; b=Qc/rSqKiK08WvDxlxWc/lP4J7Z+KDF4sT4OnlU22LF389Ou5Ou8XecG3yumyeoCEdkiFH0 FJaK/R2I4WTpXvcoVRg6rqzFj6S0f0QgcKF4YcUwel/RV20CcqwjYbQB6HuTDOmQOlKtys MhSSc4LSyV4quwSYCT41toYX2QkadL0= 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-520-uOoMrRvrMPC2yu5bpKVxNg-1; Wed, 16 Dec 2020 17:31:35 -0500 X-MC-Unique: uOoMrRvrMPC2yu5bpKVxNg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFD52800D62; Wed, 16 Dec 2020 22:31:33 +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 2B7C960C15; Wed, 16 Dec 2020 22:31:28 +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 38/48] OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_WRITE Date: Wed, 16 Dec 2020 22:11:15 +0100 Message-Id: <20201216211125.19496-39-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.79 on 10.5.11.12 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 QWRkIHRoZSBWaXJ0aW9Gc0Z1c2VXcml0ZSgpIGZ1bmN0aW9uLCBmb3Igc2VuZGluZyB0aGUgRlVT RV9XUklURSBjb21tYW5kCnRvIHRoZSBWaXJ0aW8gRmlsZXN5c3RlbSBkZXZpY2UuCgooRm9yIGF2 b2lkaW5nIG92ZXJzaXplZCBGVVNFX1dSSVRFIGNvbW1hbmRzLCBzYXZlIHRoZSBtYXhpbXVtIHdy aXRlIGJ1ZmZlcgpzaXplIHRoYXQgaXMgYWR2ZXJ0aXplZCBieSB0aGUgRlVTRSBzZXJ2ZXIsIGlu IHRoZSBzZXNzaW9uIGluaXQgY29kZS4pCgpDYzogQXJkIEJpZXNoZXV2ZWwgPGFyZC5iaWVzaGV1 dmVsQGFybS5jb20+CkNjOiBKb3JkYW4gSnVzdGVuIDxqb3JkYW4ubC5qdXN0ZW5AaW50ZWwuY29t PgpDYzogUGhpbGlwcGUgTWF0aGlldS1EYXVkw6kgPHBoaWxtZEByZWRoYXQuY29tPgpSZWY6IGh0 dHBzOi8vYnVnemlsbGEudGlhbm9jb3JlLm9yZy9zaG93X2J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VmlydGlvRnNJbml0KCkgcmV0dXJucyBzdWNj ZXNzZnVsbHkgYW5kDQogICBiZWZvcmUgVmlydGlvRnNVbmluaXQoKSBpcyBjYWxsZWQuDQogDQog ICBAcGFyYW1baW4sb3V0XSBWaXJ0aW9GcyAgVGhlIFZpcnRpbyBGaWxlc3lzdGVtIGRldmljZSB0 byBzZW5kIHRoZSBGVVNFX0lOSVQNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0 IHRvLiBUaGUgRlVTRSByZXF1ZXN0IGNvdW50ZXINCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAiVmlydGlvRnMtPlJlcXVlc3RJZCIgaXMgc2V0IHRvIDEgb24gb3V0cHV0Lg0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICJWaXJ0aW9Gcy0+UmVxdWVzdElkIiBpcyBzZXQgdG8gMSBvbiBv dXRwdXQuIFRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heGltdW0gd3JpdGUgYnVm ZmVyIHNpemUgZXhwb3NlZCBpbiB0aGUgRlVTRV9JTklUDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgcmVzcG9uc2UgaXMgc2F2ZWQgaW4gIlZpcnRpb0ZzLT5NYXhXcml0ZSIsIG9uDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0Lg0KIA0KICAgQHJldHZhbCBFRklfU1VDQ0VT UyAgICAgIFRoZSBGVVNFIHNlc3Npb24gaGFzIGJlZW4gc3RhcnRlZC4NCiANCiAgIEByZXR2YWwg RUZJX1VOU1VQUE9SVEVEICBGVVNFIGludGVyZmFjZSB2ZXJzaW9uIG9yIGZlYXR1cmUgbmVnb3Rp YXRpb24NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWlsZWQuDQogDQogICBAcmV0dXJu ICAgICAgICAgICAgICAgICAgVGhlICJlcnJubyIgdmFsdWUgbWFwcGVkIHRvIGFuIEVGSV9TVEFU VVMgY29kZSwg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UgYmVlbiBpbmNyZW1lbnRlZC4NCisNCisgIEBw YXJhbVtpbl0gTm9kZUlkICAgICAgICBUaGUgaW5vZGUgbnVtYmVyIG9mIHRoZSByZWd1bGFyIGZp bGUgdG8gd3JpdGUgdG8uDQorDQorICBAcGFyYW1baW5dIEZ1c2VIYW5kbGUgICAgVGhlIG9wZW4g aGFuZGxlIHRvIHRoZSByZWd1bGFyIGZpbGUgdG8gd3JpdGUgdG8uDQorDQorICBAcGFyYW1baW5d IE9mZnNldCAgICAgICAgVGhlIGFic29sdXRlIGZpbGUgcG9zaXRpb24gYXQgd2hpY2ggdG8gc3Rh cnQNCisgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0aW5nLg0KKw0KKyAgQHBhcmFtW2lu LG91dF0gU2l6ZSAgICAgIE9uIGlucHV0LCB0aGUgbnVtYmVyIG9mIGJ5dGVzIHRvIHdyaXRlLiBP bg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NmdWwgcmV0dXJuLCB0aGUgbnVt YmVyIG9mIGJ5dGVzIGFjdHVhbGx5DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdHRl biwgd2hpY2ggbWF5IGJlIHNtYWxsZXIgdGhhbiB0aGUgdmFsdWUgb24NCisgICAgICAgICAgICAg ICAgICAgICAgICAgICBpbnB1dC4NCisNCisgIEBwYXJhbVtpbl0gRGF0YSAgICAgICAgICBUaGUg YnVmZmVyIHRvIHdyaXRlIHRvIHRoZSByZWd1bGFyIGZpbGUuDQorDQorICBAcmV0dmFsIEVGSV9T VUNDRVNTICAgICAgICAgIFdyaXRlIHN1Y2Nlc3NmdWwuIFRoZSBjYWxsZXIgaXMgcmVzcG9uc2li bGUgZm9yDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNraW5nIFNpemUgdG8g bGVhcm4gdGhlIGFjdHVhbCBieXRlIGNvdW50DQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHRyYW5zZmVycmVkLg0KKw0KKyAgQHJldHZhbCBFRklfQkFEX0JVRkZFUl9TSVpFICBPbiBp bnB1dCwgU2l6ZSBpcyBsYXJnZXIgdGhhbg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAiVmlydGlvRnMtPk1heFdyaXRlIi4NCisNCisgIEByZXR1cm4gICAgICAgICAgICAgICAgICAg ICAgVGhlICJlcnJubyIgdmFsdWUgbWFwcGVkIHRvIGFuIEVGSV9TVEFUVVMgY29kZSwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgdGhlIFZpcnRpbyBGaWxlc3lzdGVtIGRldmlj ZSBleHBsaWNpdGx5DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcG9ydGVkIGFu IGVycm9yLg0KKw0KKyAgQHJldHVybiAgICAgICAgICAgICAgICAgICAgICBFcnJvciBjb2RlcyBw cm9wYWdhdGVkIGZyb20NCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmlydGlvRnNT Z0xpc3RzVmFsaWRhdGUoKSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmlydGlv RnNGdXNlTmV3UmVxdWVzdCgpLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWaXJ0 aW9Gc1NnTGlzdHNTdWJtaXQoKSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmly dGlvRnNGdXNlQ2hlY2tSZXNwb25zZSgpLg0KKyoqLw0KK0VGSV9TVEFUVVMNCitWaXJ0aW9Gc0Z1 c2VXcml0ZSAoDQorICBJTiBPVVQgVklSVElPX0ZTICpWaXJ0aW9GcywNCisgIElOICAgICBVSU5U NjQgICAgTm9kZUlkLA0KKyAgSU4gICAgIFVJTlQ2NCAgICBGdXNlSGFuZGxlLA0KKyAgSU4gICAg IFVJTlQ2NCAgICBPZmZzZXQsDQorICBJTiBPVVQgVUlOVDMyICAgICpTaXplLA0KKyAgSU4gICAg IFZPSUQgICAgICAqRG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