From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933021AbcCTCDf (ORCPT ); Sat, 19 Mar 2016 22:03:35 -0400 Received: from mail-ig0-f193.google.com ([209.85.213.193]:34955 "EHLO mail-ig0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932829AbcCTCD0 (ORCPT ); Sat, 19 Mar 2016 22:03:26 -0400 MIME-Version: 1.0 In-Reply-To: <20160320015511.GZ17997@ZenIV.linux.org.uk> References: <20160120195957.GV6033@dastard> <20160120204449.GC12249@kvack.org> <20160120214546.GX6033@dastard> <20160123043922.GF6033@dastard> <20160314171737.GK17923@kvack.org> <20160320012610.GX17997@ZenIV.linux.org.uk> <20160320015511.GZ17997@ZenIV.linux.org.uk> Date: Sat, 19 Mar 2016 19:03:25 -0700 X-Google-Sender-Auth: suwkhDinClMTHV4NddWvcx_jpRY Message-ID: Subject: Re: aio openat Re: [PATCH 07/13] aio: enabled thread based async fsync From: Linus Torvalds To: Al Viro Cc: Benjamin LaHaise , Dave Chinner , Andrew Morton , linux-fsdevel , Linux API , Linux Kernel Mailing List , linux-aio@kvack.org, linux-mm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 19, 2016 at 6:55 PM, Al Viro wrote: > > What would make unlazy_walk() fail? And if it succeeds, you are not > in RCU mode anymore *without* restarting from scratch... I don't see your point. You don't want to be in RCU mode any more. You want to either succeed or fail with ECHILD/ESTALE. Then, in the failure case, you go to the thread. What I meant by restarting was the restart that do_filp_open() does, and there it just restarts with "op->lookup_flags", which has RCU_LOOKUP still set, so it would just try to do the RCU lookup again. But I actually notice now that Ben actually disabled that restart if LOOKUP_RCU was set, so that ends up not even happening. Anyway, I'm not saying it's polished and pretty. I think the changes to do_filp_open() are a bit silly, and the code should just use path_openat() directly. Possibly using a new helper (ie perhaps just introduce a "rcu_filp_openat()" thing). But from a design perspective, I think this all looks fine. Linus