From owner-freebsd-hackers@freebsd.org Sat Apr 3 07:43:46 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C3545C2A2D for ; Sat, 3 Apr 2021 07:43:46 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC87567VHz3LnJ for ; Sat, 3 Apr 2021 07:43:45 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id D02C35C2D8E; Sat, 3 Apr 2021 07:43:45 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE8A85C2F8E for ; Sat, 3 Apr 2021 07:43:45 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC8750LLMz3LwG for ; Sat, 3 Apr 2021 07:43:44 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id d12so10332238lfv.11 for ; Sat, 03 Apr 2021 00:43:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FS1ATyTkrPrGYs3u6eCMBNhNwmjlr9J87eMedVzIaL0=; b=kIEMXp+nAwdmF9ezL9vQoEbA3hYEYcbbiz9CHcwJpSLzrcNZFkm9JFpjvlX+KU0Hbg dCii5yRPGPdkBEx+yDSGl/vpP4ycVlrxZgLRlvIkOgzscB+pe/gySP2mgnAZB0KAq9Tk clj8Nnt85TiVB/BRmEk5bJjSq+OWeVP/8U4N7an/wOkJeJtE3xAHhwEGvIZBdtRluSHv qqRH+34H/Us2abv7KFelI7OPaJ91swbJ+/DULPEqRHGB+fnNK1JsaReo/zFjb1stTIZa YgO7SFQPNTLwSsN6Q6CE/0h7spASGbD4kpeZgM8C0nT42zzrdSxl03dkIwG/pvYQqyzw 5WdA== X-Gm-Message-State: AOAM530trxZC4DgjFJ4goKee5mKHts+pLPVNa1Bap4IBktvJSjzAEfPY 7L06lM+dsSCvf8zbPRLaxsHjnmStKtZQbg== X-Google-Smtp-Source: ABdhPJzueiPYEzOTniF7jpQQfvdCp4OTysJYqbP90yqN8XxtSqTQW+U98vTEezDspd2P7c0dxKMJkA== X-Received: by 2002:ac2:41c4:: with SMTP id d4mr10733899lfi.334.1617435822646; Sat, 03 Apr 2021 00:43:42 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id b34sm1146841ljf.137.2021.04.03.00.43.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Apr 2021 00:43:42 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id u9so7597222ljd.11 for ; Sat, 03 Apr 2021 00:43:42 -0700 (PDT) X-Received: by 2002:a2e:8881:: with SMTP id k1mr10214610lji.441.1617435822188; Sat, 03 Apr 2021 00:43:42 -0700 (PDT) MIME-Version: 1.0 References: <20210327131011.e16291cac86475e75a33812c@FreeBSD.org> <20210330181402.GM14975@funkthat.com> In-Reply-To: From: Gleb Popov Date: Sat, 3 Apr 2021 10:43:16 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: RFC: possible issue with kqueue To: Damjan Jovanovic , Rozhuk Ivan Cc: hackers@freebsd.org X-Rspamd-Queue-Id: 4FC8750LLMz3LwG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.46 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.46:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.46:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.46:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.46:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2021 07:43:46 -0000 On Wed, Mar 31, 2021 at 8:46 AM Damjan Jovanovic wrote: > On Tue, Mar 30, 2021 at 8:14 PM John-Mark Gurney wrote: > > > Emanuel Haupt wrote this message on Sat, Mar 27, 2021 at 13:10 +0100: > > > Can someone familiar with kqueue please comment on: > > > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024 > > > > Done: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024#c11 > > > > Looks like the user wasn't force unmounting the FS. There really > > isn't any problem w/ kqueue, as a normal unmount is expected to be > > refused while files are open. > > > > I guess there COULD be a new flag added to file descriptors that > > flag them as being able to be closed upon unmount. Then when an > > unmount happens and only these flagged files remain, they are closed > > allowing the fs to unmount. But this is a new feature and independent > > of kqueue. > > > > -- > > John-Mark Gurney Voice: +1 415 225 5579 > > > > > > > Linux's inotify avoids this problem by monitoring filesystem paths instead > of file descriptors, which also has the advantage of not contributing to > the open file limit. Can we do something like that? > The "O_PATH" flag support is being cooked in https://reviews.freebsd.org/D29323 , maybe it'd be possible to build something upon it. However, I was under the impression that the Linux advantage is the ability to set a single watch on a whole directory, while kqueue requires opening each file. On Sat, Apr 3, 2021 at 6:22 AM Rozhuk Ivan wrote: > > https://reviews.freebsd.org/D19690 > > I do not finish this. > Plan was: implement this and catch unmount notify in my FAM, that in > glib20. > Hum, but I do see mount/unmount events in devd on CURRENT!