Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751434AbdIORLQ (ORCPT ); Fri, 15 Sep 2017 13:11:16 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36147 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbdIORLO (ORCPT ); Fri, 15 Sep 2017 13:11:14 -0400 X-Google-Smtp-Source: AOwi7QDJHle2d1yv1q050oRs6l4UmW2oayfUV0drGyvzzfg49P8QZVVieY99MlGiDd9Y8FpIpqj/aQ2wzWt+lDvz5RY= MIME-Version: 1.0 X-Originating-IP: [176.63.54.97] In-Reply-To: <20170915140734.GY5426@ZenIV.linux.org.uk> References: <20170915135805.GD19278@veci.piliscsaba.szeredi.hu> <20170915140734.GY5426@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Fri, 15 Sep 2017 19:11:12 +0200 Message-ID: Subject: Re: [experimental PATCH] ovl: get rid of d_real() To: Al Viro Cc: Linus Torvalds , Linux Kernel Mailing List , linux-fsdevel , "linux-unionfs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 878 Lines: 25 On Fri, Sep 15, 2017 at 4:07 PM, Al Viro wrote: > On Fri, Sep 15, 2017 at 03:58:05PM +0200, Miklos Szeredi wrote: >> And here's the prototype. Poof, d_real() is gone. >> >> It definitely has got problems, but just maybe it can be made better than the >> current mess. It *does* solve the ro-rw inconsistency for normal reads (not >> mmaps). > > ... and makes for mind-boggling amount of opening/closing the files on underlying > filesystem. Doing that on sodding ->read_iter() is simply wrong. I said it is a prototype. Caching the open files on the underlying fs would solve that. > And you are > using the wrong credentials for those opens, anyway - it should be creds of opener, > not reader. Actually it should be credentials of mounter, as is now done consistently across overlayfs. And a bunch of other issues, probably. Thanks, Miklos