Re: [patch] [RFC] move 'struct page' into its own header

From: Christoph Hellwig (hch_at_infradead.org)
Date: 12/16/04

  • Next message: Rico Tudor: "Re: 3TB disk hassles"
    Date:	Thu, 16 Dec 2004 22:25:13 +0000
    To: Dave Hansen <haveblue@us.ibm.com>
    
    

    On Thu, Dec 16, 2004 at 02:04:15PM -0800, Dave Hansen wrote:
    >
    > There are currently 24 places in the tree where struct page is
    > predeclared. However, a good number of these places also have to
    > do some kind of arithmetic on it, and end up using macros because
    > static inlines wouldn't have the type fully definied at
    > compile-time.
    >
    > But, in reality, struct page has very few dependencies on outside
    > macros or functions, and doesn't really need to be a part of the
    > header include mess which surrounds many of the VM headers.
    >
    > So, put 'struct page' into structpage.h, along with a nasty comment
    > telling everyone to keep their grubby mitts out of the file.
    >
    > Now, we can use static inlines for almost any 'struct page'
    > operations with no problems, and get rid of many of the
    > predeclarations.

    What about calling it page.h? structfoo.h sounds like a really strange
    name. And while you're at it page-flags.h should probably be merged into
    it.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Rico Tudor: "Re: 3TB disk hassles"

    Relevant Pages

    • [2.6 patch] drivers/char/drm/: small cleanups
      ... every file should #include the header with the prototypes ... struct class_device_attribute attr; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch] [RFC] move struct page into its own header
      ... But, in reality, struct page has very few dependencies on outside ... header include mess which surrounds many of the VM headers. ... predeclarations. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch 2/15] fs/logfs/logfs_abi.h
      ... * Public header for logfs. ... * I0_BLOCKS is the number of direct block pointer in each inode. ... * remaining five pointers are for indirect pointers, ... +struct logfs_disk_super { ...
      (Linux-Kernel)
    • [Patch 02/18] include/linux/logfs.h
      ... * Public header for logfs. ... Later the inode size was doubled and there are now ... * remaining five pointers are for indirect pointers, ... +struct logfs_disk_super { ...
      (Linux-Kernel)
    • [PATCH 2/3] add open iscsi netlink interface to iscsi transport class
      ... * iSCSI Kernel/User Interface Events ... +struct iscsi_stats_custom { ... * iSCSI Template Message Header ... +/* Command Response PDU flags */ ...
      (Linux-Kernel)