linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/44] NFS: Create NFS Modules
@ 2012-01-13 20:10 bjschuma
  2012-01-13 20:10 ` [PATCH 01/44] NFS: ifndef guard internal.h bjschuma
                   ` (43 more replies)
  0 siblings, 44 replies; 51+ messages in thread
From: bjschuma @ 2012-01-13 20:10 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs, Bryan Schumaker

From: Bryan Schumaker <bjschuma@netapp.com>

This patch series turns NFS v2, v3 and v4 into loadable kernel modules that
need to be loaded before using.  This should eventually help clean up all of
the NFS code by giving us a chance to remove most of the ifdefs that check
for CONFIG_NFS_V3 and CONFIG_NFS_V4.

I move as much code as I needed to get everything to compile, so removing
all the ifdefs will still require a bit more work.  I'm hoping that this is
a good start, however.  Whenever I created a new file with copy and pasted
code I copied the copyright line from the original file.  If somebody else
has the copyright let me know and I'll change the copyright line in a future
version of these patches.

Parts of NFS 4.1 are still compiled into the generic client but other parts
have migrated into the nfs4.ko module.  Therefore, to use v4.1 you will need
to run `modprobe nfs4`.

Patch Map
---------
- Patches 01 and 02 do basic preparations
- Patch 03 make NFS v2 a Kconfig option
- Patch 04 adds in the NFS version registering framework
- Patches 05 - 07 turn NFS v2 into a loadable module, note that v2 is directly
  compiled into nfs.ko until patch 07.
- Patches 08 - 12 do the setup and conversion of v3 into a loadable module
  with updates to the v2 module happening in patch 08.  v3 isn't a module until
  patch 12.
- Patch 13 is a small cleanup patch to remove code that is no longer used once
  v2 and v3 are turned into modules.
- Patch 14 - 44 do the necessary preperations and conversion of v4 into a
  kernel module.  Updates to the v2 and v3 modules happen througout the
  preparation patches.  v4 is moved into its own subdirectory in patch 14
  and I gradually move code over throughout the rest of the patches to avoid
  a huge "copy everything at once" patch.  v4 is still compiled into nfs.ko
  until patch 44 is applied.

Is there a `git diff` shortcut for moving a large chunk of code from one file
to another?  Patch 37 and 41 move #ifdef CONFIG_NFS_V4 blocks into the nfs4/
subdirectory, but so much needed to be moved to keep everything bisectable
that both patches are 1300+ lines.  The patches leading up to both of these
do the necessary work so I could cut and paste code without having to do much
else to get it to compile.

I use a function pointer set in an nfs_subversion structure to determine if
a v2, v3, or v4 implementation should be called in various places.  Most of
these function pointers had to be addid in places where NFS v4 did something
slighly differently.  I would eventually like to see if any of the function
pointers can be removed by defining new nfs4 functions in any of the nfs4
structures (file_system_type, super_operations, inode_operations, ...).

Comments and suggestions are appreciated.  Thanks!

- Bryan


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

end of thread, other threads:[~2012-01-14  0:55 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 20:10 [PATCH 00/44] NFS: Create NFS Modules bjschuma
2012-01-13 20:10 ` [PATCH 01/44] NFS: ifndef guard internal.h bjschuma
2012-01-13 20:10 ` [PATCH 02/44] NFS: Relocate the stat_to_errno() function bjschuma
2012-01-13 20:10 ` [PATCH 03/44] NFS: Make v2 configurable bjschuma
2012-01-13 20:10 ` [PATCH 04/44] NFS: Add version registering framework bjschuma
2012-01-13 20:10 ` [PATCH 05/44] NFS: Move v2 to new subdirectory bjschuma
2012-01-13 20:10 ` [PATCH 06/44] NFS: Export symbols needed by a v2 module bjschuma
2012-01-13 20:10 ` [PATCH 07/44] NFS: Convert NFS v2 into a module bjschuma
2012-01-13 20:10 ` [PATCH 08/44] NFS: Created custom init_aclclient() functions bjschuma
2012-01-13 20:10 ` [PATCH 09/44] NFS: Move v3 to its own subdirectory bjschuma
2012-01-13 20:10 ` [PATCH 10/44] NFS: Export symbols needed by a v3 module bjschuma
2012-01-13 20:10 ` [PATCH 11/44] NFS: Switch to using the IS_ENABLED macro for CONFIG_NFS_V3 bjschuma
2012-01-13 20:10 ` [PATCH 12/44] NFS: Convert NFS v3 into a module bjschuma
2012-01-13 20:10 ` [PATCH 13/44] NFS: Remove unused code bjschuma
2012-01-13 20:10 ` [PATCH 14/44] NFS: Move v4 to its own subdirectory bjschuma
2012-01-13 20:10 ` [PATCH 15/44] NFS: Move init_aclclient() into the v4 subdirectory bjschuma
2012-01-13 20:10 ` [PATCH 16/44] NFS: Create a version-specific do_submount() function bjschuma
2012-01-13 20:10 ` [PATCH 17/44] NFS: Added in a custom do_clone_mount() function bjschuma
2012-01-13 20:10 ` [PATCH 18/44] NFS: Give versions a custom have_delegation() function bjschuma
2012-01-13 20:10 ` [PATCH 19/44] NFS: Give versions a custom have_delegated_attributes() function bjschuma
2012-01-13 20:10 ` [PATCH 20/44] NFS: Give versions a custom return_delegation() function bjschuma
2012-01-13 20:10 ` [PATCH 21/44] NFS: Add a function to run when shutting down a client bjschuma
2012-01-13 20:10 ` [PATCH 22/44] NFS: Split nfs_fs_mount() into two functions bjschuma
2012-01-13 20:10 ` [PATCH 23/44] NFS: Create a custom try_mount() function for each version bjschuma
2012-01-13 20:10 ` [PATCH 24/44] NFS: Create a separate valadet_text_mount_data() function bjschuma
2012-01-13 20:10 ` [PATCH 25/44] NFS: Create a custom validate_mount_data() function bjschuma
2012-01-13 20:10 ` [PATCH 26/44] NFS: Create an idr_lock to protect the cb_idr bjschuma
2012-01-13 20:10 ` [PATCH 27/44] NFS: Create a custom alloc_client() function bjschuma
2012-01-13 20:10 ` [PATCH 28/44] NFS: Create a custom put_client() function bjschuma
2012-01-13 20:10 ` [PATCH 29/44] NFS: Create the nfs4/module.c file bjschuma
2012-01-13 20:10 ` [PATCH 30/44] NFS: Move over NFS v4 sysctls bjschuma
2012-01-13 20:10 ` [PATCH 31/44] NFS: Move v4 getroot code to the v4 directory bjschuma
2012-01-13 20:10 ` [PATCH 32/44] NFS: Move a v4 block from inode.c bjschuma
2012-01-13 20:10 ` [PATCH 33/44] NFS: Move over the v4_file_operations structure bjschuma
2012-01-13 20:10 ` [PATCH 34/44] NFS: Move v4-only functions from dir.c bjschuma
2012-01-13 20:10 ` [PATCH 35/44] NFS: Register the v4 filesystem type from nfs4/module.c bjschuma
2012-01-13 20:10 ` [PATCH 36/44] NFS: Export functions from super.c bjschuma
2012-01-13 20:10 ` [PATCH 37/44] NFS: Move v4 super code to the nfs4/ directory bjschuma
2012-01-13 20:10 ` [PATCH 38/44] NFS: Only initialize pnfs in the v4.x case bjschuma
2012-01-13 20:10 ` [PATCH 39/44] NFS: Create accessor functions for the nfs_client_list() bjschuma
2012-01-13 20:10 ` [PATCH 40/44] NFS: Export functions from client.c bjschuma
2012-01-13 20:10 ` [PATCH 41/44] NFS: Move v4 client.c code to nfs4/client.c bjschuma
2012-01-13 20:10 ` [PATCH 42/44] NFS: Switch to using IS_ENABLED macro for CONFIG_NFS_V4 bjschuma
2012-01-13 20:10 ` [PATCH 43/44] NFS: Export functions needed by a v4 module bjschuma
2012-01-13 20:48   ` Chuck Lever
2012-01-13 21:05     ` Bryan Schumaker
2012-01-13 21:12       ` Bryan Schumaker
2012-01-13 21:25         ` Chuck Lever
2012-01-13 21:36           ` Bryan Schumaker
2012-01-14  0:55       ` NeilBrown
2012-01-13 20:10 ` [PATCH 44/44] NFS: Convert NFS v4 into a module bjschuma

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