Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5026354pxu; Thu, 10 Dec 2020 11:02:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBTcOjPF1JVRKAHZnsbqesOKGoC58ahPeonfftQt+Uo076kdM/vm+kH+6bNtvtyDmPVk9D X-Received: by 2002:a7b:ce0f:: with SMTP id m15mr9589373wmc.56.1607626946317; Thu, 10 Dec 2020 11:02:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607626946; cv=none; d=google.com; s=arc-20160816; b=iC9/FkfD8+NpF/pl3Bx/ZmVaOS6jsZ9QbWgrm1Jz5OlZw2VMXiz+zKRL4zolm2m2cX WbIKbRTg/fr13JBqVQF4u0I7xawa+sny+SVPE0qYBfZ+NeucN9KXBVpqOIFkE1eMgBMj S7FbRIvMKZyLlZXhw5wmSREEPTwzp9+wmi4K0Svho/B/Wtk27K57ANILNOJXh62akasG L9SPe7x3EFl5cnyoEnPahjilH3jHKYmXsGobRgXT7PJfCy0mnMqlRlpzMl6pKfU+/Zns jWEFgH/BvrtU7uslfd0UNkTZfVnLMrAvupd0a8dtxhKA2LElJz11J5pfV/WJkvpoi+ou iUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BhQhWVHS9WJ7RClXHrmMk9OlxviP3JR/Irk+gjc31gc=; b=K7jy2le+tB8LQ3nZEDGdYwvOFCfgGS7qnujrc+7swanNFOn94wypDZ/HIqkC6B1hSX D4HGKJuKu1JmDneYhBkc1mIbw4WgxQ45/o4ArqBcNMrmCRRr5KE8TrsdebO76Bq5z9gH FoaAjp50bH1rrjEDHS6qNC6tcdd7M5s9sKVZDTr93ZqOBUe3JowYzqNSrA9scGRhSGgk Kj7jhUQJ6vqATPhlo+KAUzkhiWSOIu0NUfNm8zGJxn6Tn+MjYplDM1kRakuc/wb1Xr8d 2BKXH0B70SxubFVxnpayWzMq2cmiZrUwcV541cAUIPudDCgtFatXLpo+O2Laq9GWp4Xy upMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=W6qlnGM8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si3335381edj.99.2020.12.10.11.01.57; Thu, 10 Dec 2020 11:02:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=W6qlnGM8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390799AbgLJS5O (ORCPT + 99 others); Thu, 10 Dec 2020 13:57:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393188AbgLJS46 (ORCPT ); Thu, 10 Dec 2020 13:56:58 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DC8AC0613D6 for ; Thu, 10 Dec 2020 10:56:17 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id a12so9760387lfl.6 for ; Thu, 10 Dec 2020 10:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BhQhWVHS9WJ7RClXHrmMk9OlxviP3JR/Irk+gjc31gc=; b=W6qlnGM8IOaEbAQLPDYX4opICBemo1Pvp2vQqXdKZN63cwRm/l9uPsqayXYeCjJUR8 hMMQnjzcZBnIMraD951VYQv8Y4mVhieZNxavaXLyCdxl1dmtMuFde4AguhqVwOFlX4y9 r7+gvnBEA4cyhttfb60lQlOnSd0tgt8o+HX4E= 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=BhQhWVHS9WJ7RClXHrmMk9OlxviP3JR/Irk+gjc31gc=; b=OoeY4IIeQUC0wcukfCiouEzHbs5MRBTSQ0FGllCyyP4GghmCE8jLHVj/PPSpYBfB/d 276GG344TPOEWQxU8SxccGS2FDM9WIGlzuOVtpjbJibLPjnYBhyxxiNOUVgIQF+3KXWC Zyw2EQsyMqDfqkz4mTz68PQXb75p3IXlGtqxs2q744Gd3haHTofvIc9beUsIJM+tsYwt KAcvb+9okogbBNsZsz9vpZZEV03fIQaLQ6aLOMyNba/edoA+UqGRPNn+lI5QxNB+aXOx 3oaUrb7XxSppggdf3PGBL9aN5w2hBiIkcwBuGtOcw+LPWYGn1M9o30IFXjxFfhMn8SpF 9Uwg== X-Gm-Message-State: AOAM531LvLtwHD/gx3ZbRcuVhaxS+wCS6JHeL8JWn+CwpOCvna4UZ+cM xLloYjsjWTesvrSQXRagZQpQrjY3879tOw== X-Received: by 2002:a19:500e:: with SMTP id e14mr3581844lfb.415.1607626575668; Thu, 10 Dec 2020 10:56:15 -0800 (PST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id m20sm698501ljo.42.2020.12.10.10.56.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 10:56:14 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id f24so7848784ljk.13 for ; Thu, 10 Dec 2020 10:56:14 -0800 (PST) X-Received: by 2002:a2e:9b13:: with SMTP id u19mr3459663lji.48.1607626574116; Thu, 10 Dec 2020 10:56:14 -0800 (PST) MIME-Version: 1.0 References: <6535286b-2532-dc86-3c6e-1b1e9bce358f@kernel.dk> <4bcf3012-a4ad-ac2d-e70b-17f17441eea9@kernel.dk> <87f88614-3045-89bb-8051-b545f5b1180a@kernel.dk> In-Reply-To: From: Linus Torvalds Date: Thu, 10 Dec 2020 10:55:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: namei.c LOOKUP_NONBLOCK (was "Re: [GIT PULL] io_uring fixes for 5.10-rc") To: Jens Axboe Cc: Al Viro , io-uring , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 10, 2020 at 9:32 AM Jens Axboe wrote: > > Here's a potentially better attempt - basically we allow LOOKUP_NONBLOCK > with LOOKUP_RCU, and if we end up dropping LOOKUP_RCU, then we generally > return -EAGAIN if LOOKUP_NONBLOCK is set as we can no longer guarantee > that we won't block. Looks sane to me. I don't love the "__unlazy_walk vs unlazy_walk" naming - I think it needs to be more clear about what the difference is, but I think the basic patch looks sane, and looks about as big as I would have expected it to be. But yes, I'll leave it to Al. And if we do this - and I think we should - I'd also love to see a new flag in 'struct open_how' to openat2(), even if it's only to enable tests. RESOLVE_NONBLOCK? Linus