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.web12.5082.1608158652539132251 for ; Wed, 16 Dec 2020 14:44:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iN5Pv82L; 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=1608158651; 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=wn2cltxyZZE2GEadPKg34U8tB+TXHwrNADI7xhy25u8=; b=iN5Pv82Lidf+rmm7HEMTGqqbu9r9vp40IgRUR+Sh/SBLT3DIxtHJrAAoirb3rVCDG6dtPF J1nuSrwPZdrPrjQpBPzR/9PL8ZpotBC9ZmAAqbmfwSRTj5sl6/xsM3M5/ny0qFwaFNSSxd Kim4WKyH086r5IQASlmlDVg92sOm58g= 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-261-s4poW6tuPAqI_9iaqKkCHQ-1; Wed, 16 Dec 2020 17:44:10 -0500 X-MC-Unique: s4poW6tuPAqI_9iaqKkCHQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A983410054FF; Wed, 16 Dec 2020 22:44:08 +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 1D7A85D9C0; Wed, 16 Dec 2020 22:44:00 +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 44/48] OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_SETATTR Date: Wed, 16 Dec 2020 22:11:21 +0100 Message-Id: <20201216211125.19496-45-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.14 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 QWRkIHRoZSBWaXJ0aW9Gc0Z1c2VTZXRBdHRyKCkgZnVuY3Rpb24sIGZvciBzZW5kaW5nIHRoZSBG VVNFX1NFVEFUVFIKY29tbWFuZCB0byB0aGUgVmlydGlvIEZpbGVzeXN0ZW0gZGV2aWNlLgoKQ2M6 IEFyZCBCaWVzaGV1dmVsIDxhcmQuYmllc2hldXZlbEBhcm0uY29tPgpDYzogSm9yZGFuIEp1c3Rl biA8am9yZGFuLmwuanVzdGVuQGludGVsLmNvbT4KQ2M6IFBoaWxpcHBlIE1hdGhpZXUtRGF1ZMOp IDxwaGlsbWRAcmVkaGF0LmNvbT4KUmVmOiBodHRwczovL2J1Z3ppbGxhLnRpYW5vY29yZS5vcmcv c2hvd19idWcuY2dpP2lkPTMwOTcKU2lnbmVkLW9mZi1ieTogTGFzemxvIEVyc2VrIDxsZXJzZWtA cmVkaGF0LmNvbT4KLS0tCiBPdm1mUGtnL0luY2x1ZGUvSW5kdXN0cnlTdGFuZGFyZC9WaXJ0aW9G cy5oIHwgIDM1ICsrKy0KIE92bWZQa2cvVmlydGlvRnNEeGUvV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XSBT aXplICAgICAgICAgIFRoZSBuZXcgc2l6ZSB0byBzZXQgZm9yIHRoZSByZWd1bGFyIGZpbGUuIElm IE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlbiB0aGUgZmlsZSBzaXplIHdp bGwgbm90IGJlIGNoYW5nZWQuIElmIE5vZGVJZA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg IHJlZmVycyB0byBhIGRpcmVjdG9yeSwgdGhlbiB0aGUgY2FsbGVyIGlzDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgcmVzcG9uc2libGUgZm9yIHBhc3NpbmcgTlVMTCBhcyBTaXplLg0KKw0K KyAgQHBhcmFtW2luXSBBdGltZSAgICAgICAgIFRoZSBuZXcgbGFzdCBhY2Nlc3MgdGltZSB0byBz ZXQgZm9yIHRoZSByZWd1bGFyIGZpbGUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICBvciBk aXJlY3RvcnkgKHNlY29uZHMgc2luY2UgdGhlIEVwb2NoKS4gSWYgTlVMTCwNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICB0aGVuIHRoZSBsYXN0IGFjY2VzcyB0aW1lIGlzIG5vdCBjaGFuZ2Vk Lg0KKw0KKyAgQHBhcmFtW2luXSBNdGltZSAgICAgICAgIFRoZSBuZXcgbGFzdCBtb2RpZmljYXRp b24gdGltZSB0byBzZXQgZm9yIHRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ3Vs YXIgZmlsZSBvciBkaXJlY3RvcnkgKHNlY29uZHMgc2luY2UgdGhlIEVwb2NoKS4NCisgICAgICAg ICAgICAgICAgICAgICAgICAgICBJZiBOVUxMLCB0aGVuIHRoZSBsYXN0IG1vZGlmaWNhdGlvbiB0 aW1lIGlzIG5vdA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZWQuDQorDQorICBA cGFyYW1baW5dIE1vZGUgICAgICAgICAgVGhlIG5ldyBmaWxlIG1vZGUgYml0c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