From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 12 Apr 2021 10:59:19 -0400 From: Vivek Goyal Message-ID: <20210412145919.GE1184147@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Virtio-fs] Query about fuse ->sync_fs and virtiofs List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miklos Szeredi , virtio-fs-list Cc: Linux fsdevel mailing list , Robert Krawitz Hi Miklos, Robert Krawitz drew attention to the fact that fuse does not seem to have a ->sync_fs implementation. That probably means that in case of virtiofs, upon sync()/syncfs(), host cache will not be written back to disk. And that's not something people expect. I read somewhere that fuse did not implement ->sync_fs because file server might not be trusted and it could block sync(). In case of virtiofs, file server is trusted entity (w.r.t guest kernel), so it probably should be ok to implement ->sync_fs atleast for virtiofs? Was looking for your thoughts on this before I look into implementing it. Thanks Vivek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30B51C433ED for ; Mon, 12 Apr 2021 14:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 032266128C for ; Mon, 12 Apr 2021 14:59:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238789AbhDLO7p (ORCPT ); Mon, 12 Apr 2021 10:59:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45188 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237526AbhDLO7o (ORCPT ); Mon, 12 Apr 2021 10:59:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618239566; 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; bh=rcBbpi/wLA7kr8xf4pgFDYrl6w+cpuLGr7hp8o+h5Bk=; b=AmXr+tBZES+niuKTlYnMpm0BSneCQ9cXauq5ob79RY039qijw/abDEmKI+PMWgxm6YxroT RTYPvt8LSvkuIemFD1S1TBni2trVjI4rbb5jkFisSU2493+lG3kS0AvxOYPP+mvPE4QwkI sf/qQrjBYTM+2aNrL+QjhkqroAaey6g= 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-20-BsZMSZSqPKyiMq4KHM8J4A-1; Mon, 12 Apr 2021 10:59:24 -0400 X-MC-Unique: BsZMSZSqPKyiMq4KHM8J4A-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 36A6E83DD21; Mon, 12 Apr 2021 14:59:23 +0000 (UTC) Received: from horse.redhat.com (ovpn-113-141.rdu2.redhat.com [10.10.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id A52B110023AF; Mon, 12 Apr 2021 14:59:19 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 11ABF22054F; Mon, 12 Apr 2021 10:59:19 -0400 (EDT) Date: Mon, 12 Apr 2021 10:59:19 -0400 From: Vivek Goyal To: Miklos Szeredi , virtio-fs-list Cc: "Dr. David Alan Gilbert" , Greg Kurz , Linux fsdevel mailing list , Robert Krawitz Subject: Query about fuse ->sync_fs and virtiofs Message-ID: <20210412145919.GE1184147@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi Miklos, Robert Krawitz drew attention to the fact that fuse does not seem to have a ->sync_fs implementation. That probably means that in case of virtiofs, upon sync()/syncfs(), host cache will not be written back to disk. And that's not something people expect. I read somewhere that fuse did not implement ->sync_fs because file server might not be trusted and it could block sync(). In case of virtiofs, file server is trusted entity (w.r.t guest kernel), so it probably should be ok to implement ->sync_fs atleast for virtiofs? Was looking for your thoughts on this before I look into implementing it. Thanks Vivek