From nobody Wed Mar 20 13:09:43 2024 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V087r0CgWz5FWZ4 for ; Wed, 20 Mar 2024 13:09:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V087q6C24z4r44 for ; Wed, 20 Mar 2024 13:09:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710940183; a=rsa-sha256; cv=none; b=HL43zyCsL6l1kLfVuPHwxJMXkFH9aX1kH0AgiQTxrIiy3Z00QItFasBASBAKZxDTI5WBBx IZd+WX3NHU9rMhY73DBHS9RWDhpccJIe25Iamb23Astdb4p5VpLmns0y9twkjMxwAjvVFI BpHhaie8M6itg034U01xqtJTU8PJZtEZgj8WmQiWohsy7lTyuQ3QhxPYH/YRNuxlYOjPnl RQ1V+yHO0Y4agT4YGltbnbOTOxPSnRNN5Gx0jv981cbQpvsIjvo6EfAbU2fl6Emxm7WeGk xbCBHdGnI02ftswni97ilel25yoZn7Sb7mNs0yrnuBkuV/ua4jXj3/LzZfnRIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710940183; h=from:from: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; bh=NS2nuWts946G/4qlaZa11f2roffC5VjgbKBvK+Uqyvs=; b=lmeJ81jgc8XAhbX3tH/FgkwCnoexa0K0cKcPCgNMd6qtM5HVVJan7s9ARO4/MWqjZUyBBx CMcSEfKlElziLSojb2poE/Cu7/zrRgE87GBs24bNV90ei7O69ye54Hv5i7D5OLHLPunPox HFEIHwqflGDvFQlbM3v82JYP0rkQdgg+mAKVeYsK3vNf9ci37LTde9yog62yX9NvtiTJEY WUepeg/jP5YoSPB3XT0wx5ziXt1kuLl9hP0cdAqxN5srd/nZixlqck5S/s9behs6w8xxs9 TrfHlHyRbLDZeU6yrhTMIL2/GiMCaDIWMtf3bv7GZaIeFB4GH+CCH4+bbWZoNA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V087q5WhNzs2Y for ; Wed, 20 Mar 2024 13:09:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 42KD9hdZ078250 for ; Wed, 20 Mar 2024 13:09:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 42KD9h3G078249 for fs@FreeBSD.org; Wed, 20 Mar 2024 13:09:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 277804] stat(2) on UFS volumes reports wrong st_dev (devid) when run through Linux compat layer Date: Wed, 20 Mar 2024 13:09:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: michaelo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277804 --- Comment #6 from Michael Osipov --- (In reply to John F. Carr from comment #5) John, this totally makes sense -- in fact that is the case: > $ stat -f %d / > 108 > $ stat -f %d /tmp > 110 > $ stat -f %d /var > 111 > $ stat -f %d /usr > 113 > $ stat -f %d /compat/linux/ > 165 > $ /compat/linux/bin/stat --format %d / > 108 > $ /compat/linux/bin/stat --format %d /tmp > 165 > $ /compat/linux/bin/stat --format %d /usr > 165 > $ /compat/linux/bin/stat --format %d /compat/linux > 165 > $ /compat/linux/bin/stat --format %d /usr/local > 161 > $ stat -f %d /usr/local > 161 man 4 linux says: > The path translation mechanism makes Linux processes look up file pa= ths > under emul_path (defaulting to /compat/linux) before /. For example, > when Linux process attempts to open /etc/passwd, it will really acce= ss > /compat/linux/etc/passwd, unless the latter does not exist. This is= used > to make sure Linux processes load Linux shared libraries instead of = their > similarly-named FreeBSD counterparts, and also to provide alternative > versions of certain other files and virtual file systems. with: > $ ll /compat/linux/ > total 25 > lrwxr-xr-x 1 root wheel 7 2018-04-11 06:59 bin@ -> usr/bin > dr-xr-xr-x 34 root wheel 512 2024-02-20 19:19 dev/ > drwxr-xr-x 25 root wheel 2560 2024-02-20 18:50 etc/ > lrwxr-xr-x 1 root wheel 7 2018-04-11 06:59 lib@ -> usr/lib > lrwxr-xr-x 1 root wheel 9 2018-04-11 06:59 lib64@ -> usr/lib64 > drwxr-xr-x 4 root wheel 512 2022-01-17 09:44 opt/ > dr-xr-xr-x 1 root wheel 0 2024-03-20 14:07 proc/ > lrwxr-xr-x 1 root wheel 8 2024-02-16 20:28 run@ -> /var/run > lrwxr-xr-x 1 root wheel 8 2018-04-11 06:59 sbin@ -> usr/sbin > drwxr-xr-x 2 root wheel 512 2024-01-30 15:39 srv/ > dr-xr-xr-x 1 root wheel 0 2024-03-20 14:07 sys/ > drwxrwxrwt 7 root wheel 512 2023-05-25 15:52 tmp/ > drwxr-xr-x 8 root wheel 512 2024-02-20 18:50 usr/ > drwxr-xr-x 16 root wheel 512 2024-02-20 18:50 var/ Thanks John, I didn't think about this. Although my report looks like bogus then, but how to go from here? Do docs = need improvement or something else or say "works as designed"? --=20 You are receiving this mail because: You are the assignee for the bug.=