[PATCH 0/3] fs: start to split up fs.h

Christian Brauner posted 3 patches 3 months ago
fs/Makefile                               |   2 +-
fs/{fs_types.c => fs_dirent.c}            |   2 +-
include/linux/fs.h                        | 526 +-----------------------------
include/linux/{fs_types.h => fs_dirent.h} |  11 +-
include/linux/fs_super.h                  | 233 +++++++++++++
include/linux/fs_super_types.h            | 335 +++++++++++++++++++
6 files changed, 578 insertions(+), 531 deletions(-)
[PATCH 0/3] fs: start to split up fs.h
Posted by Christian Brauner 3 months ago
Take first steps to split up fs.h. Add fs_super_types.h and fs_super.h
headers that contain the types and functions associated with super
blocks respectively.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
Christian Brauner (3):
      fs: rename fs_types.h to fs_dirent.h
      fs: add fs_super_types header
      fs: add fs_super.h header

 fs/Makefile                               |   2 +-
 fs/{fs_types.c => fs_dirent.c}            |   2 +-
 include/linux/fs.h                        | 526 +-----------------------------
 include/linux/{fs_types.h => fs_dirent.h} |  11 +-
 include/linux/fs_super.h                  | 233 +++++++++++++
 include/linux/fs_super_types.h            | 335 +++++++++++++++++++
 6 files changed, 578 insertions(+), 531 deletions(-)
---
base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
change-id: 20251104-work-fs-header-16f780a431c1
Re: [PATCH 0/3] fs: start to split up fs.h
Posted by Christoph Hellwig 3 months ago
On Tue, Nov 04, 2025 at 03:46:31PM +0100, Christian Brauner wrote:
> Take first steps to split up fs.h. Add fs_super_types.h and fs_super.h
> headers that contain the types and functions associated with super
> blocks respectively.

We have this nice concept called directories for namespace prefixes.
Why not include/linux/fs/*.h for all these split out bits?
Re: [PATCH 0/3] fs: start to split up fs.h
Posted by Christian Brauner 3 months ago
On Wed, Nov 05, 2025 at 04:55:34AM -0800, Christoph Hellwig wrote:
> On Tue, Nov 04, 2025 at 03:46:31PM +0100, Christian Brauner wrote:
> > Take first steps to split up fs.h. Add fs_super_types.h and fs_super.h
> > headers that contain the types and functions associated with super
> > blocks respectively.
> 
> We have this nice concept called directories for namespace prefixes.
> Why not include/linux/fs/*.h for all these split out bits?

Sure, fine by me. Some do it differently. For example, mm has mm_* too.
But yeah, the fs/ layout is fine.
Re: [PATCH 0/3] fs: start to split up fs.h
Posted by Christian Brauner 3 months ago
On Wed, Nov 05, 2025 at 02:13:32PM +0100, Christian Brauner wrote:
> On Wed, Nov 05, 2025 at 04:55:34AM -0800, Christoph Hellwig wrote:
> > On Tue, Nov 04, 2025 at 03:46:31PM +0100, Christian Brauner wrote:
> > > Take first steps to split up fs.h. Add fs_super_types.h and fs_super.h
> > > headers that contain the types and functions associated with super
> > > blocks respectively.
> > 
> > We have this nice concept called directories for namespace prefixes.
> > Why not include/linux/fs/*.h for all these split out bits?
> 
> Sure, fine by me. Some do it differently. For example, mm has mm_* too.
> But yeah, the fs/ layout is fine.

/me raises eye-brows:

blk-cgroup.h          blkdev.h              blk-mq.h              blktrace_api.h
blk-crypto.h          blk-integrity.h       blkpg.h               blk_types.h
blk-crypto-profile.h  blk-mq-dma.h          blk-pm.h

What sort of mix-and-match bonanza have you got going on over there?