[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130907173243.GD13318@ZenIV.linux.org.uk>
Date: Sat, 7 Sep 2013 18:32:43 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Waiman Long <Waiman.Long@...com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Chandramouleeswaran, Aswin" <aswin@...com>,
"Norton, Scott J" <scott.norton@...com>,
George Spelvin <linux@...izon.com>,
John Stoffel <john@...ffel.org>, Sage Weil <sage@...tank.com>,
Ian Kent <raven@...maw.net>
Subject: Re: [PATCH v3 1/1] dcache: Translating dentry into pathname without
taking rename_lock
On Sat, Sep 07, 2013 at 04:01:10AM +0100, Al Viro wrote:
> * plain seqretry loop (d_lookup(), is_subdir(), autofs4_getpath(),
> ceph_misc_build_path(), [cifs] build_path_from_dentry(), nfs_path(),
_mds_, actually - sorry.
> [audit] handle_path())
> * try seqretry once, then switch to write_seqlock() (the things
> that got unified into d_walk())
> * try seqretry three times, then switch to write_seqlock() (d_path()
> and friends)
> * several pure write_seqlock() users (d_move(), d_set_mounted(),
> d_materialize_unique())
BTW, autofs4_getpath() looks really odd:
static int autofs4_getpath(struct autofs_sb_info *sbi,
struct dentry *dentry, char **name)
and *name is never modified in it. Why not simply pass it by value?
Moreover, I'm not sure I understand what do we need sbi->fs_lock in
there. Other than that, it's very close to dentry_path() (well, that
and different calling conventions). Ian?
ceph_mds_build_path() is similar, but it does kmalloc to store the result
and grabs ->d_lock for ->d_name protection. This one, BTW, is much more
likely to get stalls - it ends up doing kmalloc on each attempt (after
having calculated the current length). Bugger if I understand what's wrong
with simply grabbing a page and doing that once - before everything else...
build_path_from_dentry() - same story, might very well have been the source
of ceph_mds_build_path().
nfs_path() - not far from open-coded dentry_path() with some postprocessing,
uses ->d_lock for ->d_name protection.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists