[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pps5dr3f.fsf@tw-ebiederman.twitter.com>
Date: Thu, 19 Sep 2013 05:48:52 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Tejun Heo <tj@...nel.org>
Cc: gregkh@...uxfoundation.org, kay@...y.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET] sysfs: implement sysfs_remove()
Tejun Heo <tj@...nel.org> writes:
> Hello,
>
> Currently, there are multiple variants of internal sysfs removal
> functions and the directory removal behavior is a bit weird in that
> while it does remove the files contained immediately in the directory
> it wouldn't recurse into its subdirectories, even the group ones which
> belong to the same kobject.
There are two very big problems with this direction.
1) It violates the principle of least surprise. In particular it messes
up the mental model of people like Al Viro. Which can easily lead to
code breaking during routine maintenance because of unexpecte
semantics.
2) Recursive removal is not safe. There are very weird and somewhat
pathological cases where sysfs directories are removed out of order
aka parent before sibling, and (if my memory holds) recursive removal
takes this from a little bit ugly to actually breaking things.
For long term maintenance and simplicity I believe we will be in much
better shape if we take directory removal in the opposite direction, and
fix the small number of issues with the users and don't support any kind
of recursive removal.
Eric
--
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