linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/9] File descriptor hot-unplug support
@ 2009-04-11 12:01 Eric W. Biederman
  2009-04-11 12:03 ` [RFC][PATCH 1/9] mm: Introduce remap_file_mappings Eric W. Biederman
                   ` (11 more replies)
  0 siblings, 12 replies; 99+ messages in thread
From: Eric W. Biederman @ 2009-04-11 12:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-pci, linux-mm, linux-fsdevel, Al Viro,
	Hugh Dickins, Tejun Heo, Alexey Dobriyan, Linus Torvalds,
	Alan Cox, Greg Kroah-Hartman


A couple of weeks ago I found myself looking at the uio, seeing that
it does not support pci hot-unplug, and thinking "Great yet another
implementation of hotunplug logic that needs to be added".

I decided to see what it would take to add a generic implementation of
the code we have for supporting hot unplugging devices in sysfs, proc,
sysctl, tty_io, and now almost in the tun driver.

Not long after I touched the tun driver and made it safe to delete the
network device while still holding it's file descriptor open I someone
else touch the code adding a different feature and my careful work
went up in flames.  Which brought home another point at the best of it
this is ultimately complex tricky code that subsystems should not need
to worry about.

What makes this even more interesting is that in the presence of pci
hot-unplug it looks like most subsystems and most devices will have to
deal with the issue one way or another.

This infrastructure could also be used to implement sys_revoke and
when I could not think of a better name I have drawn on that.

The following changes draw on and generalize the work in tty_io sysfs,
proc, and sysctl and move it into the vfs level.  Where the basic
primitives are running faster, and the solution more general.

The work is not complete.  I have only fully converted proc.  And
there are more places in the vfs that need to be touched.  But it is
close enough the code works in practice and all of the core challenges
should have been solved, and the design should be clear.

 Documentation/filesystems/vfs.txt |    4 +
 drivers/char/pty.c                |    2 +-
 drivers/char/tty_io.c             |    2 +-
 fs/Makefile                       |    2 +-
 fs/compat.c                       |   31 +++-
 fs/fcntl.c                        |   32 +++--
 fs/file_table.c                   |  189 ++++++++++++++++++---
 fs/inode.c                        |    1 +
 fs/ioctl.c                        |   39 +++--
 fs/locks.c                        |   81 +++++++--
 fs/open.c                         |   32 +++-
 fs/proc/generic.c                 |  100 ++++--------
 fs/proc/inode.c                   |  339 +------------------------------------
 fs/proc/internal.h                |    2 +
 fs/proc/root.c                    |    2 +-
 fs/read_write.c                   |  143 ++++++++++++----
 fs/readdir.c                      |   14 ++-
 fs/revoked_file.c                 |  181 ++++++++++++++++++++
 fs/select.c                       |   17 ++-
 fs/super.c                        |   49 +++---
 fs/sysfs/bin.c                    |  193 +---------------------
 include/linux/fs.h                |   31 +++-
 include/linux/mm.h                |    3 +
 include/linux/proc_fs.h           |    4 -
 mm/memory.c                       |   96 +++++++++++
 25 files changed, 841 insertions(+), 748 deletions(-)

Eric

^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2009-06-10  6:05 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-11 12:01 [RFC][PATCH 0/9] File descriptor hot-unplug support Eric W. Biederman
2009-04-11 12:03 ` [RFC][PATCH 1/9] mm: Introduce remap_file_mappings Eric W. Biederman
2009-04-11 12:05 ` [RFC][PATCH 2/9] mm: Implement generic support for revoking a mapping Eric W. Biederman
2009-04-11 12:06 ` [RFC][PATCH 3/9] sysfs: Use remap_file_mappings Eric W. Biederman
2009-04-11 12:07 ` [RFC][PATCH 4/9] vfs: Generalize the file_list Eric W. Biederman
2009-04-11 12:08 ` [RFC][PATCH 5/9] vfs: Introduce basic infrastructure for revoking a file Eric W. Biederman
2009-04-14 22:12   ` Jonathan Corbet
2009-04-15  2:55     ` Eric W. Biederman
2009-04-11 12:10 ` [RFC][PATCH 6/9] vfs: Utilize fops_read_lock where appropriate Eric W. Biederman
2009-04-11 12:11 ` [RFC][PATCH 7/9] vfs: Optimize fops_read_lock Eric W. Biederman
2009-04-11 12:13 ` [RFC][PATCH 8/9] vfs: Implement generic revoked file operations Eric W. Biederman
2009-04-12 18:56   ` Jamie Lokier
2009-04-12 20:04     ` Eric W. Biederman
2009-04-12 20:31       ` Jamie Lokier
2009-04-12 21:53         ` Eric W. Biederman
2009-04-12 20:54       ` Eric W. Biederman
2009-04-12 21:02         ` Jamie Lokier
2009-04-12 23:06           ` Eric W. Biederman
2009-04-11 12:14 ` [RFC][PATCH 9/9] proc: Use the generic vfs revoke facility that now exists Eric W. Biederman
2009-04-11 15:58 ` [RFC][PATCH 0/9] File descriptor hot-unplug support Al Viro
2009-04-11 16:49   ` Eric W. Biederman
2009-04-11 16:56     ` Al Viro
2009-04-11 23:57       ` Eric W. Biederman
2009-04-12 20:21       ` Eric W. Biederman
2009-04-14  3:16 ` Tejun Heo
2009-04-14  7:39   ` Eric W. Biederman
2009-04-14  7:45     ` Tejun Heo
2009-04-14  8:27       ` Eric W. Biederman
2009-04-14  8:49         ` Tejun Heo
2009-04-14 15:07         ` Jamie Lokier
2009-04-14 19:09           ` Eric W. Biederman
2009-06-01 21:45 ` [PATCH 0/23] File descriptor hot-unplug support v2 Eric W. Biederman
2009-06-01 21:50   ` [PATCH 01/23] mm: Introduce revoke_file_mappings Eric W. Biederman
2009-06-01 22:25     ` Andrew Morton
2009-06-02  0:12       ` Eric W. Biederman
2009-06-01 21:50   ` [PATCH 02/23] vfs: Implement unpoll_file Eric W. Biederman
2009-06-06  8:08     ` Al Viro
2009-06-01 21:50   ` [PATCH 03/23] vfs: Generalize the file_list Eric W. Biederman
2009-06-02  7:06     ` Nick Piggin
2009-06-05 19:33       ` Eric W. Biederman
2009-06-09 10:38         ` Nick Piggin
2009-06-09 18:38           ` Eric W. Biederman
2009-06-10  6:05             ` Nick Piggin
2009-06-01 21:50   ` [PATCH 04/23] vfs: Introduce infrastructure for revoking a file Eric W. Biederman
2009-06-02  5:16     ` Pekka Enberg
2009-06-02  6:51       ` Eric W. Biederman
2009-06-02  7:08         ` Pekka Enberg
2009-06-02  7:14     ` Nick Piggin
2009-06-02 17:06       ` Linus Torvalds
2009-06-02 20:52         ` Eric W. Biederman
2009-06-03  6:37           ` Nick Piggin
2009-06-02 22:56       ` Eric W. Biederman
2009-06-03  6:38         ` Nick Piggin
2009-06-05  9:03     ` Miklos Szeredi
2009-06-05 19:06       ` Eric W. Biederman
2009-06-01 21:50   ` [PATCH 05/23] vfs: Teach lseek to use file_hotplug_lock Eric W. Biederman
2009-06-01 21:50   ` [PATCH 06/23] vfs: Teach read/write to use file_hotplug_read_lock Eric W. Biederman
2009-06-01 21:50   ` [PATCH 07/23] vfs: Teach sendfile,splice,tee,and vmsplice to use file_hotplug_lock Eric W. Biederman
2009-06-03 23:39     ` Badari Pulavarty
2009-06-05 19:37       ` Eric W. Biederman
2009-06-01 21:50   ` [PATCH 08/23] vfs: Teach readdir " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 09/23] vfs: Teach poll and select " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 10/23] vfs: Teach do_path_lookup " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 11/23] mm: Teach mmap " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 12/23] vfs: Teach fcntl " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 13/23] vfs: Teach ioctl " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 14/23] vfs: Teach flock " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 15/23] vfs: Teach fallocate, and filp_close " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 16/23] vfs: Teach fstatfs, fstatfs64, ftruncate, fchdir, fchmod, fchown " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 17/23] proc: Teach /proc/<pid>/fd " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 18/23] vfs: Teach epoll " Eric W. Biederman
2009-06-02 16:51     ` Davide Libenzi
2009-06-02 21:23       ` Eric W. Biederman
2009-06-02 21:52         ` Davide Libenzi
2009-06-02 22:51           ` Eric W. Biederman
2009-06-03 14:57             ` Davide Libenzi
2009-06-03 20:53               ` Eric W. Biederman
2009-06-04  0:50                 ` Davide Libenzi
2009-06-04  1:42                   ` Eric W. Biederman
2009-06-01 21:50   ` [PATCH 19/23] eventpoll: Fix comment Eric W. Biederman
2009-06-01 21:50   ` [PATCH 20/23] vfs: Teach aio to use file_hotplug_lock Eric W. Biederman
2009-06-01 21:50   ` [PATCH 21/23] vfs: Teach fsync " Eric W. Biederman
2009-06-01 21:50   ` [PATCH 22/23] vfs: Teach fadvice to file_hotplug_lock Eric W. Biederman
2009-06-01 21:50   ` [PATCH 23/23] vfs: Teach readahead to use the file_hotplug_lock Eric W. Biederman
2009-06-03 23:25     ` Badari Pulavarty
2009-06-06  8:03   ` [PATCH 0/23] File descriptor hot-unplug support v2 Al Viro
2009-06-08  9:41     ` Miklos Szeredi
2009-06-08 10:24       ` Jamie Lokier
2009-06-08 16:29       ` Al Viro
2009-06-08 16:44         ` Miklos Szeredi
2009-06-08 17:50           ` Al Viro
2009-06-08 18:01             ` Linus Torvalds
2009-06-08 18:50               ` Al Viro
2009-06-08 19:18                 ` Linus Torvalds
2009-06-09  6:42                   ` Eric W. Biederman
2009-06-09 10:52                     ` Nick Piggin
2009-06-09  5:50             ` Miklos Szeredi
2009-06-09  6:31               ` Eric W. Biederman
2009-06-09  6:22     ` Eric W. Biederman

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).