From nobody Mon Feb 9 19:53:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646643734; cv=none; d=zohomail.com; s=zohoarc; b=FOd9nrE2H8ax6cPNxwOqhi/7uEXnfPMdhgLhYdMKeLbCYV6DZdF93A64LHtYcd7xZZezdZ8cIu0SaeMqvBozKQcS6+0kutQnDz6qSCOrek3vSpZvJStJ0kKo2umn992QqH9f7UtZbHJuDMiWNadsWTrZyhPlEp1alQpSOXG1+RA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646643734; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rNqWR2P7Pa3AkPY4/kMfYu8GdSa7K/YK40GQLzWChzY=; b=mG0KUGJtlKOWW3Kgx8vvCZGSQa5lSx9wJ4XW3c20gq0tQV5R0APIZm1Mhu8sNzEoIWvjCEFXqqTT5bB94k5WgKimDcWDe6gfFPYEBB0lGu7PFnOZRlCHe/xLX5ybv8Q9/ZpSBKZrQXIpvHWraSR+bPPRizH2nTuNFHeNLu9c9lo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1646643734580419.79104194312424; Mon, 7 Mar 2022 01:02:14 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-184-okvoy0voPpGUOt6zfr4ynw-1; Mon, 07 Mar 2022 04:01:29 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9A05802815; Mon, 7 Mar 2022 09:01:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6B8356D18E; Mon, 7 Mar 2022 09:01:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A6D6E1931BD5; Mon, 7 Mar 2022 09:01:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AD1621931BFC for ; Mon, 7 Mar 2022 09:01:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 76C1D1F470; Mon, 7 Mar 2022 09:01:22 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id F103D1F473 for ; Mon, 7 Mar 2022 09:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646643733; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rNqWR2P7Pa3AkPY4/kMfYu8GdSa7K/YK40GQLzWChzY=; b=O63/D66ns6MlMtu36kPQ78h+HOnrR9YfX1/XMw8Pft7UNJ/l+2P/WhPr1pJGNaJ+AJ8bBl 966PqYwdi7YGvSYpIDdLeiSxG8849AGcHzjVxbp3/SWIMiqIKvjDQ7Ya8SNG7qtTeHKuFX hSasqC4UKwk4SjiCv2ruNX81BzIxxe8= X-MC-Unique: okvoy0voPpGUOt6zfr4ynw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 15/17] lxc_fuse: Tell FUSE that /proc/meminfo is nonseekable Date: Mon, 7 Mar 2022 10:01:05 +0100 Message-Id: <6051c11a1a4506d43bccfcd9fbafc53ec2e9d782.1646643526.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646643736029100001 Content-Type: text/plain; charset="utf-8" If an app within a container wishes to read from /proc/meminfo from a different position than the beginning of the file, we can have FUSE keep track of all the lseek()-s and reflect them in @offset argument of read callback (lxcProcRead()). This is done by setting fuse_file_info::nonseekable. If we don't do this, then FUSE reports errors back the app that does lseek(). Signed-off-by: Michal Privoznik --- src/lxc/lxc_fuse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index 73d3ab1015..181b05b605 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -118,6 +118,7 @@ lxcProcOpen(const char *path, return -EACCES; =20 fi->direct_io =3D 1; + fi->nonseekable =3D 1; return 0; } =20 --=20 2.34.1