Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4526046pxb; Tue, 31 Aug 2021 07:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCBuEBGqyCxDNOXTTomKwt4inuOodLKB4Vw6xE7fr5JnxpDmKNZQJEvoEhkmUP4fGtoDUH X-Received: by 2002:a92:cf07:: with SMTP id c7mr19890280ilo.291.1630419366749; Tue, 31 Aug 2021 07:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630419366; cv=none; d=google.com; s=arc-20160816; b=RhM/Ur4UrFQmc9VtyRfixQoNGEFnNu/F+VC3DKTtmu3Psv3JkvLWBryxZL1sZfh1Ij gkB56NPHO6fYji8Sg5br0tRzoZABsM3pZNYP9GjekKejCtHpU9ov3sC+0n+ETjPM8/Ix WDjk2cdz5mYgYHsNYJC/YvTGsOUNaCXPlhZ6ZN14mCXZLZMTF2qXk4YWYKy4IyudFiRz 3veN5Hzq3HxRxlSyNGiIz+VP26vuEHqIj1muBL22ykBdynA5azFEuk9Df4qP7tsvqwPY KBbTbzpcuiQ9iTB5SEl3wPPLhWpuINU6dfMqFIn/rjms6+uV3FmB2GLFMaEw902cB5R0 06dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k0VPE2oBIT4XXr0WSgIMYofrB1J1TyHP1ldvCdNXeu0=; b=lkA96HFxO00CHrEJbo+yTCyYE9dQxTQy267ikrwRacKfio86TTXTpEprUp4b2G2rKA rjTISQ56/kD+/K8bEz7atc0qTOjpa5hpPTGf7TCsUfeRL1om3OojO66Alb2BIn8R1R9W xSv+6jSiB6SBww47l6cEZto1RwzHwliHJ7mhPO9eruIuQv/ULAIkRFga2GmgOC9rJjuh HJ8EYyrbUNwMlrMvr59ffxld4NgyLp6xkSDh45w8u8guVFzdjczNABZupRpip9CrURC/ /PxP/oJaFZlTUIjVaHNic0XfpPmfmSa36nS5Xkc8w5Bwfhz7oIhcRIkc2JfR4Gf+lTqA toaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hg60LYdD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si22070096jau.60.2021.08.31.07.15.53; Tue, 31 Aug 2021 07:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hg60LYdD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235779AbhHaOQD (ORCPT + 99 others); Tue, 31 Aug 2021 10:16:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235634AbhHaOQB (ORCPT ); Tue, 31 Aug 2021 10:16:01 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6917C061575 for ; Tue, 31 Aug 2021 07:15:05 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id l10so4624509lfg.4 for ; Tue, 31 Aug 2021 07:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k0VPE2oBIT4XXr0WSgIMYofrB1J1TyHP1ldvCdNXeu0=; b=hg60LYdDgiunYjiUgUnVQYc8wFxUswdeZmkPB7Pm51eOA1dO0HsNbnP0xxnnV1QmJD OTUz3vyXddjL4N2FmxkaTaYwiTfqeFeTQaYhf5Yq5bf5dQjF/d2lwhinEUZORB10W+Yk 3NhzXldAbrhljQM/qky+5gAHSv6pn/engfcwslDjqREEmwle5TIWYMWUADbjBJHkWvgU n+UdMa/jdhR5dFoDnighDdUsnpU5eqaC0SqAKGmODkZfLaUkcJ8go5v4d7CEv+vG/9Gf LFWnZA/kth34vVzl0tWEtzL+Qqv3M5uhbxCnX0zbQ8y9cziiWyOJUgENKMh2ghI09DQr osqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k0VPE2oBIT4XXr0WSgIMYofrB1J1TyHP1ldvCdNXeu0=; b=F6ULl6Hp9ofdxP+KomSrNvCqHBX8gHiXeGt2ue0Wm4dcFQkP04uLwTOFoCzzdx2h8u Ec9JmwJfgvOG99hhFHCiJS/9fQrgHRktwSjBoOWGuuEzXt3AZHbNRHXQZKmgUOhjcle+ 2pPvFRUaDwEXf5oUIX2ZmVf7EUwhTe+WEz5JWxcWFjuvBsnmhGtq9gqltQlHm3JAajDA IJZFfH0QmRdHyPpgCG/oN2NI4iW7lHqwt6SxevmNGqFgcX6IJoYUBNMePqpH2hOuuoMW yYRhfDs548oudYsJUCRzcx9QLe8lMkHOoCe9OiKuNONJiUd9mJKKofODvShYJOwgtN2/ 2dIw== X-Gm-Message-State: AOAM532xfakR4gYTSAnagVpf3t8GULV1MHfi5rtAzFz/dcYb2Nunobe9 Tb06U/qHcd78T97j4zkM/Ks= X-Received: by 2002:ac2:5b9e:: with SMTP id o30mr21242688lfn.400.1630419303631; Tue, 31 Aug 2021 07:15:03 -0700 (PDT) Received: from kari-VirtualBox.telewell.oy (85-23-89-224.bb.dnainternet.fi. [85.23.89.224]) by smtp.gmail.com with ESMTPSA id i30sm2202187ljb.48.2021.08.31.07.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 07:15:03 -0700 (PDT) From: Kari Argillander To: Konstantin Komarov , ntfs3@lists.linux.dev Cc: Kari Argillander , linux-kernel@vger.kernel.org Subject: [PATCH 2/7] fs/ntfs3: Add missing headers and forward declarations to ntfs_fs.h Date: Tue, 31 Aug 2021 17:14:29 +0300 Message-Id: <20210831141434.975175-3-kari.argillander@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210831141434.975175-1-kari.argillander@gmail.com> References: <20210831141434.975175-1-kari.argillander@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We do not have headers at all in this file. We should have them so that not every .c file needs to include all of the stuff which this file need for building. This way we can remove some headers from other files and get better picture what is needed. This can save some compilation time. And this can help if we sometimes want to separate this one big header. Also use forward declarations for structs and enums when it not included straight with include and it is used in function declarations input. This will prevent possible compiler warning: xxx declared inside parameter list will not be visible outside of this definition or declaration Here is list which I made when parsing this. There is not necessarily all example from this header file, but this just proofs we need it. SECTOR_SHIFT sb_bread(), put_bh put_page() struct inode (Just struct ntfs_inode need it) kunmap(), kmap() cpu_to_leXX() ALIGN kvfree() struct mutex, mutex_(un/try)lock() PageError() read_mapping_page() struct rb_root struct rw_semaphore krfree(), kzalloc() memset() struct timespec64 uXX, __leXX kuid_t, kgid_t do_div() PAGE_SIZE "debug.h" ntfs_err() (Just one entry. Maybe we can drop this) "ntfs.h" Do you even ask? Signed-off-by: Kari Argillander --- fs/ntfs3/ntfs_fs.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index 64ef92e16363..a39055cf9822 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -9,6 +9,37 @@ #ifndef _LINUX_NTFS3_NTFS_FS_H #define _LINUX_NTFS3_NTFS_FS_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "debug.h" +#include "ntfs.h" + +struct dentry; +struct fiemap_extent_info; +struct user_namespace; +struct page; +struct writeback_control; +enum utf16_endian; + + #define MINUS_ONE_T ((size_t)(-1)) /* Biggest MFT / smallest cluster */ #define MAXIMUM_BYTES_PER_MFT 4096 -- 2.25.1