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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A9FFC282EC for ; Thu, 6 Mar 2025 12:42:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5087C280004; Thu, 6 Mar 2025 07:42:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B8FA280001; Thu, 6 Mar 2025 07:42:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 357E1280004; Thu, 6 Mar 2025 07:42:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 109D5280001 for ; Thu, 6 Mar 2025 07:42:11 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 27DE81A1482 for ; Thu, 6 Mar 2025 12:42:12 +0000 (UTC) X-FDA: 83191088904.25.0B70997 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by imf21.hostedemail.com (Postfix) with ESMTP id 2C1BC1C000F for ; Thu, 6 Mar 2025 12:42:09 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=WqGG3Pt2; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of jackmanb@google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=jackmanb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741264930; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9MRAkaS5reseLkYqY2aSknQ7KzyTvAIpY7HWZEUr9kQ=; b=TLDHk1KfxUaq5xy9NO1jEvxK4LiP40VTFVlhs6FLufMDaCQiPbN93KLi/XZ658aDf2wbEG CY7osp/vrmknfvn/DsJAXzcKiKHANXa7Pd750peFgzK9OBp3ZuW1Pn4zP5f3WQMv9EhCQl U4itKgKlIyCJyUn+Ja2fy7akDhILwNY= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=WqGG3Pt2; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of jackmanb@google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=jackmanb@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741264930; a=rsa-sha256; cv=none; b=UjJzPbxXzUcvc/K6+l7HUemoBF6cSoOjLZ2Jl07HSU91C15mLpO4wl9TFkYN0tiXDxZ5gb NvAG7GbbAORJGiYl6JIpXMzmJPBcplRBGllMYs89G1vqV2C5susIlYuaPdK88AWduTo4j+ n6k52DwGEr/kDUEDhpxyEGWNXY6zLyE= Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-43bca0048c3so38895e9.1 for ; Thu, 06 Mar 2025 04:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1741264928; x=1741869728; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9MRAkaS5reseLkYqY2aSknQ7KzyTvAIpY7HWZEUr9kQ=; b=WqGG3Pt2+TM4s1rDQ/tShCH0Yo4brekhwZXjYelO8aF7BRvcby/cmcqI1OO3R57EKb EG6aTSdbWws54aPkXyooRNMmc9fDu6KPrhJdzeUkS/cMLIrpWEsKYr3RGBODP6T4Vgzl 7FYHGOWvQoWKh9Zr/1/LrKt0l5bC6cOcElYdFGkOWtciYvmngiVKr2RGK3KtCSa1J1Pw xWBHxLuQxb7ybdYsSE0dhGre5lO4i/Khb+ZfNHGG6J7ivlCFFCyeQ2iGzpnt7YX33Xcv S3w+qlv5plUydo7txmMTt3zFh+oCfMRuhaglKqku8uJt2wXmIeYiIyOzeb/1NAzgUe6V 1wxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741264928; x=1741869728; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9MRAkaS5reseLkYqY2aSknQ7KzyTvAIpY7HWZEUr9kQ=; b=wFCoxjIw5pZY47stSTQ5gqzrEE0zONTZ8GTIKuEAssZMpKo+X7fy5RMHHTOdtInOq7 hGSqtPPqkxvA5NqSQohmGtNVRTcCgljVNxS4mfwfU1Zzgo7a6GngnXRQDKEpKPGiqYd8 Zlvo4MyVFMZRtRtFVS/E63yiXKXsqqVB6Hfl+25A3+HBZAvoCKJeeRX8QxmOTxiQcln2 DpzFdZah5+jYvD0vmJWcj0UqqXtj3zcmOOP+6UT6OxykgXl+8YApnUf7CY+oOfEIZoA1 5a/zffsV8wXPxm/EIYf3ZbwhMOfI9JSABcf0OThIokERBjmhvAgszf3A7KdCbje6xn74 f/Sw== X-Forwarded-Encrypted: i=1; AJvYcCX5XCRb51+PYYyvWqW630EPiDXIekBdMPsStpYesF215tyffgYu8uW4w3cLhRUJ+1v2yZ8J44Ns6w==@kvack.org X-Gm-Message-State: AOJu0YzuBOK3nSfV5mR6GT8pMkOC+6N6ax7tk4ue+Sz0cBZBHynroYe+ 7ejPk8SgBELDM8uiW02HjkDtbeMCrr/FAxx2Or98zNTbrX96kK7HHSeOcQAiMQ== X-Gm-Gg: ASbGncsdiwRFEoOI8wNsmRVxlpoVp9qtnjtwXfihhLt9+cM38WmtsZn75KLfdfhhXMU PlSGj06iEJa1wO4cK4E95sfXHl2bx9x2T6oVgzZ7b4ZjU2QIM5+lRkVFPruk+T12QCzJiPP4np+ 33fw7DYZxWeCG6yLePggWduzQAQKSx9zmETfcp4y+eWB3V9Ck7w5kfLsJRWzN3cdV1zu8IQziFX DDUnzIXICBZPyqXQ3+09mxYodAFFOERJIeHhB6OcCtTXY3Tgj90xa+dJy8ECkrkeM9CZr3BbHl7 B+BYFqiYnWNDhunegzyzaje61/h4sCADjAhJuAf0Usvbgwq42ZOftJ3KtQOHGsqR0cgoVp+kLRT 3ui7v X-Google-Smtp-Source: AGHT+IGmNXAcbrIiTndMd8TKLO7wDtMCWMyWdNa1KQz3K3QIoj6wzvoQxrplVkDQaNapk/ITigBdow== X-Received: by 2002:a05:600c:54c7:b0:43b:c396:7405 with SMTP id 5b1f17b1804b1-43bdce18c53mr947115e9.7.1741264928259; Thu, 06 Mar 2025 04:42:08 -0800 (PST) Received: from google.com (44.232.78.34.bc.googleusercontent.com. [34.78.232.44]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfba888sm1984885f8f.16.2025.03.06.04.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Mar 2025 04:42:07 -0800 (PST) Date: Thu, 6 Mar 2025 12:42:03 +0000 From: Brendan Jackman To: David Hildenbrand Cc: Lorenzo Stoakes , Andrew Morton , Shuah Khan , Dev Jain , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems Message-ID: References: <20250228-mm-selftests-v3-0-958e3b6f0203@google.com> <20250228-mm-selftests-v3-8-958e3b6f0203@google.com> <08023d47-dcf4-4efb-bf13-5aef3c6dca14@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08023d47-dcf4-4efb-bf13-5aef3c6dca14@redhat.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2C1BC1C000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IFFRO1ClINa7SENEu9WO1GYKIOA5r5LlPBGEtM1Vtq0N4YXP9HiXpbpaa2hDgfOXPMkFHoc/xWFS17waYmFYjVkWr/tkrxP9XUk0LBPH/geG+C+Hi/NWcN/g6498J+pJAUd9OodnppO8/BnVHpP910OIBiPaPTixhI6PaE5X7YsvcP2DwHtt27mA37qTUDMtz8H+YIhnqdTcubwzJpDecsnOGQX/q+a42+6IbMP/cNo0E3xlK6V81mkgsjXz4W8fyxSn2vNmGx6W3eEce4F0ne+QLazyLEjjb5fEWgix4rSm6uAGrPqh7tGe6W6xhgbuQ0rptvVjmpZuQ7JpSkWD1lVjSKwX3VCwjLWNWEZ9a4up0DRh0qX4LYBQzyBufF8etPqmCM7rL8qOWk2ug== X-Bogosity: Ham, tests=bogofilter, spamicity=0.182331, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Mar 06, 2025 at 10:28:09AM +0100, David Hildenbrand wrote: > On 28.02.25 17:54, Brendan Jackman wrote: > > Some filesystems don't support funtract()ing unlinked files. They return > > ENOENT. In that case, skip the test. > > > > That's not documented in the man page, so is this a bug of these > filesystems? Um... unlink(2) does say: If the name was the last link to a file but any processes still have the file open, the file will remain in existence until the last file descriptor referring to it is closed. And POSIX says If one or more processes have the file open when the last link is removed, the link shall be removed before unlink() returns, but the removal of the file contents shall be postponed until all references to the file are closed I didn't call it a bug in the commit message because my impression was always that filesystem semantics are broadly determined by vibes. But looking at the above I do feel more confident that the "unlink isn't delete" thing is actually a pretty solid expectation. > What are examples for these weird filesystems? My experience of the issue is with 9pfs. broonie reported on #mm that NFS can display similar issues but I haven't hit it myself. > As we have the fstype available, we could instead simply reject more > filesystems earlier. See fs_is_unknown(). Oh. I didn't know this was so easy, I thought that checking the filesystem type would require some awful walk to find the mountpoint and join it against the mount list. (Now I think about it, I should have recorded this rationale in the commit message, so you could easily see my bogus reasoning). If there's a syscall to just say "what FS is this file on please?" we should just do that and explicitly denylist the systems that are known to have issues. I will just do 9pfs for now. Maybe we can log warning if the error shows up on systems that aren't listed, then if someone does run into it on NFS they should get a strong clue about what the problem is. Thanks!