Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1064688ybe; Wed, 4 Sep 2019 12:00:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt2tIAYiCmqpbzs+/vcTlz2zbXO/OmvEHviQLBYABWhTMwGmFRXnNy0skC/vg2tWtawAtY X-Received: by 2002:a17:902:424:: with SMTP id 33mr42638040ple.34.1567623646564; Wed, 04 Sep 2019 12:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567623646; cv=none; d=google.com; s=arc-20160816; b=f4fxY7ybSzbcc7BguSVINtWWuM+VfMJH3yPTRZ/9BxCFtPl63d5jMWFgL8rDUSQnvm Wk0vMwF7WJToPKo6yxco26VLZxIELD8y2RhPfVvT53OqQ+UXfMmtopt+j5HBVLOa/vOl ljO2JacyLC7WFUJ27KJSD1d36PKXxEyvhAEwKPrMIZyuTsLwvRHYMd+TrqtGwpgAuHu/ Myk96V0tdMulmGaa3XSVJUVSRV+LkN8Uad7rpsJLrCO0G7TTvW/1j8zrbIpq2EKnwi/0 MJgxu4GUDvADm1UiCNNMJt+YjnIIKlPR72UjkSgOLqVGVFtVvMEK0fqwePWdlSGnV1EC kwzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=/t5VuocUMBlzPtybo/yvo5LJ1+xZJB/CRL/KCkZ7mqs=; b=yjR1c4thSIrnVdQ+YmqjFjeGc56f9cpIvPU6v6gGNzOlmBl3gELzObrx+rTXLpkEG9 7WVnxzRBwQR4R2ouIOhVesGatUlYSj2iikGoV9P2yW0IxWJXRyf6oKArwOq/TWd9fllt eWT1KUfTxgmZrHTVpcELp37hdENNPOVqkOCLnhsrd7kLeMpYPrVzrVLuslmtnks18tGx eXFfJ9O5XIL+nyCCEZHj2+mX324ufAnpXPHtb4Uh63ynYybIKlbrWgTdC6m49FoZrb5e zkXFWbaTQoZgRuonohOsJW2RsEZvlY429/tvN4V30GZ+BfCE38ITW9T80/DdWWVzv/Cp Yn4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si10007969pfo.140.2019.09.04.12.00.28; Wed, 04 Sep 2019 12:00:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387903AbfIDS6t (ORCPT + 99 others); Wed, 4 Sep 2019 14:58:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47266 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387849AbfIDS6s (ORCPT ); Wed, 4 Sep 2019 14:58:48 -0400 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC6AC11A19 for ; Wed, 4 Sep 2019 18:58:47 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id z2so24234680qkf.2 for ; Wed, 04 Sep 2019 11:58:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/t5VuocUMBlzPtybo/yvo5LJ1+xZJB/CRL/KCkZ7mqs=; b=hVbmnQ+bMfUuq5eDC5kW7FqXK/v54AyEbN8AnbIaFVvH/LjfhB778WyipYjXzak9kl UP9WtoRzYiypel8AGY4T1Tq+HqDH0ps8lykgFcHgVSYV/0gKnG7Q33FQMiz6Z10vpuNE cSjznGSuL1Ry9ZX39PEFan3Dea7xUOabx9ZEVMxUzKIfpWB79hXqRsgn2y/klIZRjG0q tXOlYmjmIvy1mOZD2EdfH15EH2VI6LU989VVfaKOCDclhC+RYGJnRi6oenU2VuNRT0nc 31u1yY/mAbBWpLzIzfl1hefkRB5tqzhUCKil69L/yiVYKmGrGONu1veCaEqGX1xqTLE9 wIWg== X-Gm-Message-State: APjAAAWKjQvH7Sam84D6wp6UCoJPFtwi7OQz5gsKZcjuKEVm5rv2Isud XVzeHEfUrzNCTRSSnHM5SI59sTGFxOvkuztBVM/5R9fedDYJ2CneM0ZNTql+3StIDNhwDOHobT1 x0sazvoa+pV8w+YM5JosZAmjU X-Received: by 2002:aed:2538:: with SMTP id v53mr15724665qtc.383.1567623527125; Wed, 04 Sep 2019 11:58:47 -0700 (PDT) X-Received: by 2002:aed:2538:: with SMTP id v53mr15724648qtc.383.1567623526926; Wed, 04 Sep 2019 11:58:46 -0700 (PDT) Received: from redhat.com (bzq-79-176-40-226.red.bezeqint.net. [79.176.40.226]) by smtp.gmail.com with ESMTPSA id b1sm9712741qkk.8.2019.09.04.11.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 11:58:45 -0700 (PDT) Date: Wed, 4 Sep 2019 14:58:40 -0400 From: "Michael S. Tsirkin" To: Stefan Hajnoczi Cc: Miklos Szeredi , virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Vivek Goyal , "Dr. David Alan Gilbert" Subject: Re: [PATCH v4 15/16] virtio-fs: add virtiofs filesystem Message-ID: <20190904145656-mutt-send-email-mst@kernel.org> References: <20190903113640.7984-1-mszeredi@redhat.com> <20190903114203.8278-10-mszeredi@redhat.com> <20190903092222-mutt-send-email-mst@kernel.org> <20190904181630.GB26826@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904181630.GB26826@stefanha-x1.localdomain> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 07:16:30PM +0100, Stefan Hajnoczi wrote: > On Tue, Sep 03, 2019 at 09:55:49AM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 03, 2019 at 01:42:02PM +0200, Miklos Szeredi wrote: > > Endian-ness for fuse header also looks wrong. > [...] > > > +struct virtio_fs_forget { > > > + struct fuse_in_header ih; > > > + struct fuse_forget_in arg; > > > > These structures are all native endian. > > > > Passing them to host will make cross-endian setups painful to support, > > and hardware implementations impossible. > > > > How about converting everything to LE? > > The driver dictates the endianness of the FUSE protocol session. The > virtio-fs device specification states that the device looks at the first > request's fuse_in_header::opcode field to detect the guest endianness. > > If it sees FUSE_INIT in its native endianness then no byte-swapping is > necessary. If it sees FUSE_INIT in the opposite endianness then > byte-swapping is necessary on the device side. You are right. Pls ignore the comment. We need to reserve the byte-swapped FUSE_INIT to make sure future versions of fuse don't try to send that though. I sent a patch to that effect, let's see whether it gets accepted. -- MST