From: Greg KH <gregkh@linuxfoundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Steven Rostedt <rostedt@goodmis.org>,
yu kuai <yukuai3@huawei.com>,
rafael@kernel.org, oleg@redhat.com, mchehab+samsung@kernel.org,
corbet@lwn.net, tytso@mit.edu, jmorris@namei.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
zhengbin13@huawei.com, yi.zhang@huawei.com,
chenxiang66@hisilicon.com, xiexiuqi@huawei.com
Subject: Re: [RFC] simple_recursive_removal()
Date: Sat, 16 Nov 2019 13:04:16 +0100 [thread overview]
Message-ID: <20191116120416.GA446630@kroah.com> (raw)
In-Reply-To: <20191115221037.GW26530@ZenIV.linux.org.uk>
On Fri, Nov 15, 2019 at 10:10:37PM +0000, Al Viro wrote:
> On Fri, Nov 15, 2019 at 04:26:09PM -0500, Steven Rostedt wrote:
> > On Fri, 15 Nov 2019 21:18:20 +0000
> > Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > > OK... debugfs and tracefs definitely convert to that; so do, AFAICS,
> > > spufs and selinuxfs, and I wouldn't be surprised if it could be
> > > used in a few more places... securityfs, almost certainly qibfs,
> > > gadgetfs looks like it could make use of that. Maybe subrpc
> > > as well, but I'll need to look in details. configfs won't,
> > > unfortunately...
> >
> > Thanks Al for looking into this.
> >
> > I'll try to test it in tracefs, and see if anything breaks. But
> > probably wont get to it till next week.
>
> I'll probably throw that into #next.dcache - if nothing else,
> that cuts down on the size of patch converting d_subdirs/d_child
> from list to hlist...
>
> Need to get some sleep first, though - only 5 hours today, so
> I want to take another look at that thing tomorrow morning -
> I don't trust my ability to spot obvious bugs right now... ;-/
>
> Oh, well - that at least might finally push the old "kernel-side
> rm -rf done right" pile of half-baked patches into more useful
> state, probably superseding most of them.
Thanks for doing this. Sorry for the delay in getting back to this, was
on a long-haul flight...
Anyway, this looks sane to me. debugfs "should" not be having a file
added while a directory is being removed at the same time, but I really
can't guarantee that someone is trying to do something crazy like that.
So "heavy" locking is fine with me, this never has to be a "fast"
operation, it's much more important to get it "correct".
thanks,
greg k-h
next prev parent reply other threads:[~2019-11-16 12:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 3:27 [PATCH 0/3] fix potential infinite loop in debugfs_remove_recursive yu kuai
2019-11-15 3:27 ` [PATCH 1/3] dcache: add a new enum type for 'dentry_d_lock_class' yu kuai
2019-11-15 3:27 ` Greg KH
2019-11-15 4:12 ` Al Viro
2019-11-15 7:20 ` Greg KH
2019-11-15 10:08 ` yukuai (C)
2019-11-15 13:16 ` Al Viro
2019-11-15 13:38 ` Steven Rostedt
2019-11-15 13:39 ` Steven Rostedt
2019-11-15 13:48 ` Al Viro
2019-11-15 13:58 ` Steven Rostedt
2019-11-15 14:17 ` Al Viro
2019-11-15 17:54 ` Al Viro
2019-11-15 18:42 ` [RFC] simple_recursive_removal() Al Viro
2019-11-15 19:41 ` Al Viro
2019-11-15 21:18 ` Al Viro
2019-11-15 21:26 ` Steven Rostedt
2019-11-15 22:10 ` Al Viro
2019-11-16 12:04 ` Greg KH [this message]
2019-11-17 22:24 ` Al Viro
2019-11-18 6:37 ` Greg KH
2019-11-15 10:02 ` [PATCH 1/3] dcache: add a new enum type for 'dentry_d_lock_class' yukuai (C)
2019-11-15 3:27 ` [PATCH 2/3] fs/libfs.c: use 'spin_lock_nested' when taking 'd_lock' for dentry in simple_empty yu kuai
2019-11-15 3:27 ` [PATCH 3/3] debugfs: fix potential infinite loop in debugfs_remove_recursive yu kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191116120416.GA446630@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chenxiang66@hisilicon.com \
--cc=corbet@lwn.net \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=oleg@redhat.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=xiexiuqi@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
--cc=zhengbin13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).