From: Tejun Heo <tj@kernel.org>
To: gregkh@linuxfoundation.org
Cc: kay@vrfy.org, linux-kernel@vger.kernel.org,
ebiederm@xmission.com, bhelgaas@google.com
Subject: Subject: [PATCHSET driver-core-next] sysfs: separate out kernfs, part #1
Date: Thu, 24 Oct 2013 11:49:06 -0400 [thread overview]
Message-ID: <1382629780-10006-1-git-send-email-tj@kernel.org> (raw)
Hello,
This patchset contains 34 patches to separate out core sysfs features
into kernfs. kernfs exclusively deals with sysfs_dirent, which will
be later renamed to kernfs_node, and kernfs_ops. sysfs becomes a
wrapping layer over sysfs which interfaces kobject and
[bin_]attribute.
The goal of these changes is to allow other users to make use of the
core features of sysfs instead of rolling their own pseudo filesystem
implementation which usually fails to deal with issues with file
shutdowns, locking separation from vfs layer and so on. This patchset
refactors sysfs and separates out most core functionalities to kernfs;
however, the mount code hasn't been updated yet and it can't be used
by other users yet. The patchset is pretty big already and the two
steps can be separated relatively well, so I think this is a good
split point.
This patchset shouldn't introduce any behavior differences and
contains the following 34 patches.
0001-sysfs-merge-sysfs_elem_bin_attr-into-sysfs_elem_attr.patch
0002-sysfs-honor-bin_attr.attr.ignore_lockdep.patch
0003-sysfs-remove-unused-sysfs_get_dentry-prototype.patch
0004-sysfs-move-sysfs_hash_and_remove-to-fs-sysfs-dir.c.patch
0005-sysfs-separate-out-dup-filename-warning-into-a-separ.patch
0006-sysfs-make-__sysfs_add_one-fail-if-the-parent-isn-t-.patch
0007-sysfs-kernfs-add-skeletons-for-kernfs.patch
0008-sysfs-kernfs-introduce-kernfs_remove-_by_name-_ns.patch
0009-sysfs-kernfs-introduce-kernfs_create_link.patch
0010-sysfs-kernfs-introduce-kernfs_rename-_ns.patch
0011-sysfs-kernfs-introduce-kernfs_setattr.patch
0012-sysfs-kernfs-replace-sysfs_dirent-s_dir.kobj-and-s_a.patch
0013-sysfs-kernfs-introduce-kernfs_create_dir-_ns.patch
0014-sysfs-kernfs-prepare-read-path-for-kernfs.patch
0015-sysfs-kernfs-prepare-write-path-for-kernfs.patch
0016-sysfs-kernfs-prepare-llseek-path-for-kernfs.patch
0017-sysfs-kernfs-prepare-mmap-path-for-kernfs.patch
0018-sysfs-kernfs-prepare-open-release-poll-paths-for-ker.patch
0019-sysfs-kernfs-move-sysfs_open_file-to-include-linux-k.patch
0020-sysfs-kernfs-introduce-kernfs_ops.patch
0021-sysfs-kernfs-add-sysfs_dirent-s_attr.size.patch
0022-sysfs-kernfs-remove-SYSFS_KOBJ_BIN_ATTR.patch
0023-sysfs-kernfs-introduce-kernfs_create_file-_ns.patch
0024-sysfs-kernfs-remove-sysfs_add_one.patch
0025-sysfs-kernfs-add-kernfs_ops-seq_-start-next-stop.patch
0026-sysfs-kernfs-introduce-kernfs_notify.patch
0027-sysfs-kernfs-reorganize-SYSFS_-constants.patch
0028-sysfs-kernfs-revamp-sysfs_dirent-active_ref-lockdep-.patch
0029-sysfs-kernfs-introduce-kernfs-_find_and-_get-and-ke.patch
0030-sysfs-kernfs-move-internal-decls-to-fs-kernfs-kernfs.patch
0031-sysfs-kernfs-move-inode-code-to-fs-kernfs-inode.c.patch
0032-sysfs-kernfs-move-dir-core-code-to-fs-kernfs-dir.c.patch
0033-sysfs-kernfs-move-file-core-code-to-fs-kernfs-file.c.patch
0034-sysfs-kernfs-move-symlink-core-code-to-fs-kernfs-sym.patch
0001-0006 are prep patches.
0007 preps fs/kernfs/ directory with skeleton files.
0008-0029 refactor various code paths so that all externally visible
interfaces are split to core kernfs interface which deals with
sysfs_dirent and kernfs_ops and sysfs wrapping it to provide the
existing interface.
0030-0034 move kernfs part of the implementation under fs/kernfs.
This patchset is on top of
driver-core-next 0cba7de7f6cd ("input: gameport: convert bus code to use dev_groups")
+ [1] sysfs: fix sysfs_write_file for bin file
While this patchset doesn't depend on it, it probably would be a good
idea to apply the fix for devm.kmalloc bug before applying these as
that bug makes bisecting quite painful.
diffstat follows. Thanks.
fs/Makefile | 2 +-
fs/kernfs/Makefile | 5 +
fs/kernfs/dir.c | 978 ++++++++++++++++++++++++++++++++++++++++++++
fs/kernfs/file.c | 800 ++++++++++++++++++++++++++++++++++++
fs/kernfs/inode.c | 336 +++++++++++++++
fs/kernfs/kernfs-internal.h | 157 +++++++
fs/kernfs/symlink.c | 147 +++++++
fs/sysfs/Makefile | 2 +-
fs/sysfs/dir.c | 965 +------------------------------------------
fs/sysfs/file.c | 914 ++++++++---------------------------------
fs/sysfs/group.c | 59 +--
fs/sysfs/inode.c | 357 ----------------
fs/sysfs/mount.c | 14 -
fs/sysfs/symlink.c | 156 +------
fs/sysfs/sysfs.h | 208 +---------
include/linux/kernfs.h | 185 +++++++++
include/linux/sysfs.h | 43 +-
17 files changed, 2871 insertions(+), 2457 deletions(-)
create mode 100644 fs/kernfs/Makefile
create mode 100644 fs/kernfs/dir.c
create mode 100644 fs/kernfs/file.c
create mode 100644 fs/kernfs/inode.c
create mode 100644 fs/kernfs/kernfs-internal.h
create mode 100644 fs/kernfs/symlink.c
delete mode 100644 fs/sysfs/inode.c
create mode 100644 include/linux/kernfs.h
--
tejun
[1] http://thread.gmane.org/gmane.linux.kernel/1584113
next reply other threads:[~2013-10-24 15:49 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 15:49 Tejun Heo [this message]
2013-10-24 15:49 ` [PATCH 01/34] sysfs: merge sysfs_elem_bin_attr into sysfs_elem_attr Tejun Heo
2013-10-24 15:49 ` [PATCH 02/34] sysfs: honor bin_attr.attr.ignore_lockdep Tejun Heo
2013-10-24 15:49 ` [PATCH 03/34] sysfs: remove unused sysfs_get_dentry() prototype Tejun Heo
2013-10-24 15:49 ` [PATCH 04/34] sysfs: move sysfs_hash_and_remove() to fs/sysfs/dir.c Tejun Heo
2013-10-24 15:49 ` [PATCH 05/34] sysfs: separate out dup filename warning into a separate function Tejun Heo
2013-10-24 15:49 ` [PATCH 06/34] sysfs: make __sysfs_add_one() fail if the parent isn't a directory Tejun Heo
2013-10-24 15:49 ` [PATCH 07/34] sysfs, kernfs: add skeletons for kernfs Tejun Heo
2013-10-24 15:49 ` [PATCH 08/34] sysfs, kernfs: introduce kernfs_remove[_by_name[_ns]]() Tejun Heo
2013-10-24 15:49 ` [PATCH 09/34] sysfs, kernfs: introduce kernfs_create_link() Tejun Heo
2013-10-24 15:49 ` [PATCH 10/34] sysfs, kernfs: introduce kernfs_rename[_ns]() Tejun Heo
2013-10-24 15:49 ` [PATCH 11/34] sysfs, kernfs: introduce kernfs_setattr() Tejun Heo
2013-10-24 15:49 ` [PATCH 12/34] sysfs, kernfs: replace sysfs_dirent->s_dir.kobj and ->s_attr.[bin_]attr with ->priv Tejun Heo
2013-10-24 15:49 ` [PATCH 13/34] sysfs, kernfs: introduce kernfs_create_dir[_ns]() Tejun Heo
2013-10-24 15:49 ` [PATCH 14/34] sysfs, kernfs: prepare read path for kernfs Tejun Heo
2013-10-26 11:32 ` Pavel Machek
2013-10-27 11:30 ` Tejun Heo
2013-10-28 13:03 ` [PATCH v2 " Tejun Heo
2013-10-28 16:33 ` [PATCH v3 " Tejun Heo
2013-10-24 15:49 ` [PATCH 15/34] sysfs, kernfs: prepare write " Tejun Heo
2013-10-24 15:49 ` [PATCH 16/34] sysfs, kernfs: prepare llseek " Tejun Heo
2013-10-24 15:49 ` [PATCH 17/34] sysfs, kernfs: prepare mmap " Tejun Heo
2013-10-24 15:49 ` [PATCH 18/34] sysfs, kernfs: prepare open, release, poll paths " Tejun Heo
2013-10-24 15:49 ` [PATCH 19/34] sysfs, kernfs: move sysfs_open_file to include/linux/kernfs.h Tejun Heo
2013-10-24 15:49 ` [PATCH 20/34] sysfs, kernfs: introduce kernfs_ops Tejun Heo
2013-10-24 15:49 ` [PATCH 21/34] sysfs, kernfs: add sysfs_dirent->s_attr.size Tejun Heo
2013-10-24 15:49 ` [PATCH 22/34] sysfs, kernfs: remove SYSFS_KOBJ_BIN_ATTR Tejun Heo
2013-10-24 15:49 ` [PATCH 23/34] sysfs, kernfs: introduce kernfs_create_file[_ns]() Tejun Heo
2013-10-24 15:49 ` [PATCH 24/34] sysfs, kernfs: remove sysfs_add_one() Tejun Heo
2013-10-24 15:49 ` [PATCH 25/34] sysfs, kernfs: add kernfs_ops->seq_{start|next|stop}() Tejun Heo
2013-10-28 13:04 ` [PATCH v2 " Tejun Heo
2013-10-24 15:49 ` [PATCH 26/34] sysfs, kernfs: introduce kernfs_notify() Tejun Heo
2013-10-24 15:49 ` [PATCH 27/34] sysfs, kernfs: reorganize SYSFS_* constants Tejun Heo
2013-10-24 15:49 ` [PATCH 28/34] sysfs, kernfs: revamp sysfs_dirent active_ref lockdep annotation Tejun Heo
2013-10-24 15:49 ` [PATCH 29/34] sysfs, kernfs: introduce kernfs[_find_and]_get() and kernfs_put() Tejun Heo
2013-10-24 15:49 ` [PATCH 30/34] sysfs, kernfs: move internal decls to fs/kernfs/kernfs-internal.h Tejun Heo
2013-10-24 15:49 ` [PATCH 31/34] sysfs, kernfs: move inode code to fs/kernfs/inode.c Tejun Heo
2013-10-24 15:49 ` [PATCH 32/34] sysfs, kernfs: move dir core code to fs/kernfs/dir.c Tejun Heo
2013-10-24 15:49 ` [PATCH 33/34] sysfs, kernfs: move file core code to fs/kernfs/file.c Tejun Heo
2013-10-28 13:04 ` [PATCH v2 " Tejun Heo
2013-10-28 16:34 ` [PATCH v3 " Tejun Heo
2013-10-24 15:49 ` [PATCH 34/34] sysfs, kernfs: move symlink core code to fs/kernfs/symlink.c Tejun Heo
2013-10-28 13:06 ` Subject: [PATCHSET driver-core-next] sysfs: separate out kernfs, part #1 Tejun Heo
2013-10-28 16:35 ` Tejun Heo
2013-10-29 22:29 ` Greg KH
2013-10-30 14:41 ` Tejun Heo
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=1382629780-10006-1-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=bhelgaas@google.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
/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).