Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19638171rwd; Wed, 28 Jun 2023 12:00:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hTDyQmjdSzF8TdWm27ZB04+PwdyVEXZIDTJeQxzCJoYhhYTpiCaPjPl8OpKRGwNU9z/uP X-Received: by 2002:a05:6a20:918d:b0:127:b4d:551e with SMTP id v13-20020a056a20918d00b001270b4d551emr9648354pzd.13.1687978852688; Wed, 28 Jun 2023 12:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687978852; cv=none; d=google.com; s=arc-20160816; b=eriF6sGKWN6LsA7AchqkLnbEI7qjTcXbo/LlFLUrwMzLtSa56lN2xyqlLNiyVoPP2N G0nfRMCVizOtoYAnzsVHUf3G38KbSgx0FczhHXvzjAEB+7eBdtH+Joa3pRA+yV3oN4pk k564Hr2vyHe7eXz7UbVsa+EmFWAnens8PLsN6NSG/ZXSk5/ukyEyDg+hFVPWDSSVPnhB gZfTfiVbsbUzd42fhcysloMcypD/0fsEQhOXdFdvYO4gPtrs9x/E8MQW2Bk5LmHPw9CT W46RDzfyjMlWtgGi4d800mnlUGrVk3XhgNw7bxXMqcuxITk4+Cfubv9daxXB+nw4CReV 9zXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SRkyhHGm2Z88qo61/U6qqGYPf7P0wtSLvipq7QDtnHs=; fh=HT3aOvBIDTey0KF6PDCplF4/bEDBks7vrrY4iebwgdM=; b=TciMgtqNMbDz6yzxrtum/1t8mXH+wNb9qJO1QnnURkQbNxG/IDH94XHvCZZp4U95aa nrsrIPrWVZx+aUDddj13ZmDFPt1KAv7F0SfqFhD8E80BH2BN9heCwVehX4tRl/HuM9hU XKsW6M3t81NGqcATQgyzM1QHXjDqGQK5hlsUnTCE8odYpslZUpc1jrIfE7VQoDpj8lmz yqlI5j0XQbN8eG09/BMuve0vDnP90geR6i/1qSWJ3Rbi49dq0avs3lUFtaNzvHaUEMR8 a2f3AlFP5BiyEcqa0p3gekbAa3EZoo/7LSxwr5PYeODTkLcnUzd3CZfKj9GOetSYKlqn Bxsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="YEn/HOy3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a655189000000b00534866eb2c2si9466042pgq.835.2023.06.28.12.00.39; Wed, 28 Jun 2023 12:00:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="YEn/HOy3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231838AbjF1S4u (ORCPT + 99 others); Wed, 28 Jun 2023 14:56:50 -0400 Received: from 139-28-40-42.artus.net.pl ([139.28.40.42]:57848 "EHLO tarta.nabijaczleweli.xyz" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S232925AbjF1Syd (ORCPT ); Wed, 28 Jun 2023 14:54:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687978469; bh=407huGS784lSIw/L/pvQpXD2aAp/xkHCUK2qKZHT5AE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YEn/HOy3ZICA3+l2IV3469bYHERBi4TAUqhwAP5q1X9kuMYuFl6u5EsvMWMGtX7o5 6jxJaBZ/fPxHj4GhcApIPQW+ZAqy3oxDP6fXoam5bNZwO7RdS5e5U1TWySlLCV1DTk VHC009Ftk8NQKDYPkiNDcL822ueIhvD/LrSqKR+i3DBNQxNGqkBTMXZv2B1GAEgCDm JmxCJlHXbFYghbWj4nBuNrEVV4wG/Q952nG6HgbGrHaaQuqcgo+VNyzRDGMdb50R0V v0/d3Gb087RhRKnFzRSZVVRpIY10Lr5UVuyqMSlc1ns1HWfvzpxbDw5yXDGWhqdo4T s49yhejK8BWTg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id C0BB410F4; Wed, 28 Jun 2023 20:54:29 +0200 (CEST) Date: Wed, 28 Jun 2023 20:54:28 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Jan Kara Cc: Amir Goldstein , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Chung-Chiang Cheng , ltp@lists.linux.it Subject: Re: [PATCH v4 0/3] fanotify accounting for fs/splice.c Message-ID: References: <20230628113853.2b67fic5nvlisx3r@quack3> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="t22ubltek2za4lgw" Content-Disposition: inline In-Reply-To: <20230628113853.2b67fic5nvlisx3r@quack3> User-Agent: NeoMutt/20230517 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --t22ubltek2za4lgw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Wed, Jun 28, 2023 at 01:38:53PM +0200, Jan Kara wrote: > On Tue 27-06-23 22:50:46, Ahelenia Ziemia=C5=84ska wrote: > > Always generate modify out, access in for splice; > > this gets automatically merged with no ugly special cases. > >=20 > > No changes to 2/3 or 3/3. > Thanks for the patches Ahelena! The code looks fine to me but to be honest > I still have one unresolved question so let me think about it loud here f= or > documentation purposes :). Do we want fsnotify (any filesystem > notification framework like inotify or fanotify) to actually generate > events on FIFOs? FIFOs are virtual objects and are not part of the > filesystem as such (well, the inode itself and the name is), hence > *filesystem* notification framework does not seem like a great fit to wat= ch > for changes or accesses there. And if we say "yes" for FIFOs, then why not > AF_UNIX sockets? Where do we draw the line? And is it all worth the > trouble? As a relative outsider (I haven't used inotify before this, and have not been subjected to it or its peripheries before), I interpreted inotify as being the Correct solution for: 1. stuff you can find in a normal (non-/dev, you don't want to touch devices) filesystem traversal 2. stuff you can open where, going down the list in inode(7): S_IFSOCK can't open S_IFLNK can't open S_IFREG yes! S_IFBLK it's a device S_IFDIR yes! S_IFCHR it's a device S_IFIFO yes! It appears that I'm not the only one who's interpreted it that way, especially since neither regular files nor pipes are pollable. (Though, under that same categorisation, I wouldn't be surprised if anonymous pipes had been refused, for example, since those are conventionally unnameable.) To this end, I'd say we're leaving the line precisely where it was drawn before, even if by accident. > I understand the convenience of inotify working on FIFOs for the "tail -f" > usecase but then wouldn't this better be fixed in tail(1) itself by using > epoll(7) for FIFOs which, as I've noted in my other reply, does not have > the problem that poll(2) has when there are no writers? Yes, epoll in ET mode returns POLLHUP only once, but you /also/ need the inotify anyway for regular files, which epoll refuses (and, with -F, you may want both epoll for a pipe and inotify for the directory it's contained in). Is it possible to do? yes. Is it more annoying than just having pipes report when they were written to? very much so. inotify actually working(*) is presumably why coreutils tail doesn't use epoll =E2=80=92 inotify already provides all required events(*), you can us= e the same code for regular files and fifos, and with one fewer level of indirection: there's just no need(*). (*: except with a magic syscall only I use apparently) --t22ubltek2za4lgw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmScgeQACgkQvP0LAY0m WPFU0hAAsQQgDTXFQBzqm2D+2vh1lcuz9TJUyJydbOgXaLC1qP/QtcPSCisL6n9k URhk3SzQ9X5zVbXsxdjp3vPvPKOa9AETM7XcgDfuFbYAkG8EZ6/C9+oy9GvLfr+A fKF+yowqAEh1sE5+JuqO6RGoQ00ZIGnK/umNQ0Y3f+zbxyvIkOwCSvpM85FdJQKk 3SQcGPsvZeCxuWs48Ew3pEPt1KdRFd/09cqBWOak0rqD4X01PMiGi4NeOplayq1m T/zwX3mwdzWsWatYETmt+s+81prWz7ZX6QgEGT0iUnntZO6vS8yxT3ONCzePlRmY maXGjYmBQOcJonQk+6KzLYR58RCk21JScFuFLPi9fqURpXec7NdDtsS+LyUY6s92 iRb3Qzns6I/klxwjJ40xdgRFkiaOyrpgod+/J5SIlaImna3BQuM25PrYXnZHnXoW azbWHmIDifdx/ZVoJPjW1MctW21yzozQCyZgk8RQZRSGSkBAjo4+Q1ag+LyToQvj cei7qcWupecsQChCpDOOvK5gxGETeqHlEW/3Vtr83JjLdTlFxpyo+e4B2Jxlm8DL E19bxeY22W8Q/k23S3ihAwC/VlSqCn1jDvIVDnYrwBigfMilVA5vTqy3wWHIBIlJ E5G4NgcEOvHTPAcqHzOx6Lvw1y3CdAHAoE0eEktsRumxBfz/IhU= =f2tP -----END PGP SIGNATURE----- --t22ubltek2za4lgw--