Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp828187pxb; Thu, 2 Sep 2021 16:30:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWnpul/lhlmEXqPhXcRfQtr5pWs4n5TboXtKevLTa/QpIwJL0g8iUah61jIY3mWoGQhxla X-Received: by 2002:aa7:d303:: with SMTP id p3mr870865edq.184.1630625431720; Thu, 02 Sep 2021 16:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630625431; cv=none; d=google.com; s=arc-20160816; b=OA51JxImiM8T+fKbCJtlUC0OoL2j9vPm4pjLJclzne1a+g5TdBlW9W2/yU+luk31D7 11ndjLWmxC8Moc4djwby1/btGT7kQhrGwLa9MVWiGbwzQWTcY+loAM5Dwfe8BpMCk0W8 IyAhFBsisTaRBpXKzABQ+0gYWGmMo+OBHW4LG6JG0tVfkCYbhr48bb20pMcRr7amQR5j jVZHaGKNKQxJF/JglxVN8yrZf9BLWIr5CCGwIDy1iPFutajEFdy/jQPvNDv8T/H2SaGl czbG55agqcY0NVF4MadpsHsw/I+HL1G4cL7hw8ExjyiMK8EDgYOskaVS3Pwog/+cZMuy H0bg== 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=6NUPPlGVIg641VNyfch/SHNe6LbpC9+97GZHbHZOmtE=; b=ZFurLp467xF9YwZDofGPhtbugwuVTLQvcHXL4c1CSGgUw8ekcJtIrH2ng5EXsx7/6i zsPJKW318PfFxbVs/4t6IlyGkFjvvEkODc6IeRVOoaFVygzJ+uIgcHoaURCXwKrQP+pJ xfQsTGAOkTf7tmu5qHiyeRsQ9UFxyB8uNTaSq8HnRF+7W6Y2oMQMTR2DRhtp+9Di3ePD IrcN+zfXxYDaHXOZF3sdj2E/3EtwEsjxL6aQl8SiLt4voDjCvOaEbiYsnQ4+7TOU9HCS 9NQa8zwe1y1CmRalqXi4kgykqiQOhcn8T3NtpQXroqT4y/htr2zsAXsOwao1oJ0V/zA7 6AyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Cq+HKI5t; 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 ka11si3681620ejc.367.2021.09.02.16.30.07; Thu, 02 Sep 2021 16:30:31 -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=20210112 header.b=Cq+HKI5t; 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 S1346139AbhIBQQu (ORCPT + 99 others); Thu, 2 Sep 2021 12:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346183AbhIBQQk (ORCPT ); Thu, 2 Sep 2021 12:16:40 -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 53BBCC061760 for ; Thu, 2 Sep 2021 09:15:41 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id t19so5435015lfe.13 for ; Thu, 02 Sep 2021 09:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6NUPPlGVIg641VNyfch/SHNe6LbpC9+97GZHbHZOmtE=; b=Cq+HKI5t8ztXnwTUmcz4mW9vC0YduW5fwIgc0kdk9QUDxWUmsC6PLN1oZCffa+olD8 HpZ1UMCK+nynKzJ1ZYVyOifjOY7o8zFHCx7oNJvxtlNm2vUwNGQ3Fu8XFGv6SlvBl1pd nNdyA/9AJ4GkK8mlbveF84WlxrdtDESJvnygt4wJ1WozIDpIwpyyUiXfr7c1e2RXwKeU /7V74FXxmdD5Da/oQkuTORasoahkdmkQsYNMMVxzweL1umTT2g1mCxEc8UEHGcKHvUxC Qck5GwusZnEgd6pF8lPUYlvjl/9hWm9nDoInBSq6E9rzqCKXvaFnMrCOeSBOG0wW60sf kXAw== 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=6NUPPlGVIg641VNyfch/SHNe6LbpC9+97GZHbHZOmtE=; b=auhX+TcAwiY4vU91c2+pkGAZP0IRhiEwvRJAuZgqPe6J66KwLIF1HX/gz/uKxb0M2S 5gxua7SkTIz3uKhK6Y7TdgXbKuVMiOQkvWhxXFbUSvRfBdeFedV/H0jwo8USc1JbaTsJ v2Wo3FIvuaz1Q8OasYKSAQBEh4sQzky8rKXjwQHAL6KF/1dofzRfBpE/EMyDL2VM6O4m UBSTach0x3Kjg/pi9436IWmhA6aj9vPUStfPlNVv5qcjrvUFAFzUXe63nq2g6ivIyF/O HjVE8VAJTmIHni/kozDnBl3VKgFl+TFztjo4Gax4/JDqSq6vLovpnAHhN6uCVcMmw49t GF1g== X-Gm-Message-State: AOAM531PzCEgT6dkUAdu5dkerpfWcLyvKuImvUgdGVmbYt36FhYiQCJ+ hKRU6oiNydtpz+c4uoK3fL4= X-Received: by 2002:a05:6512:dc:: with SMTP id c28mr3178424lfp.251.1630599339663; Thu, 02 Sep 2021 09:15:39 -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 m7sm267811ljj.58.2021.09.02.09.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 09:15:39 -0700 (PDT) From: Kari Argillander To: Konstantin Komarov , ntfs3@lists.linux.dev Cc: Kari Argillander , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/8] fs/ntfs3: Add missing headers and forward declarations to ntfs_fs.h Date: Thu, 2 Sep 2021 19:15:23 +0300 Message-Id: <20210902161528.6262-4-kari.argillander@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210902161528.6262-1-kari.argillander@gmail.com> References: <20210902161528.6262-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 97e682ebcfb9..149d60e29728 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